Zentutorial
  • 首页
  • Zenscript
  • 简单运用
    • 局部变量
    • 尖括号调用
    • 工作台合成
      • 添加配方
      • 移除配方
      • Metadata
      • NBT
    • 熔炉配方
    • 矿物词典(Ore Dictionaries)
    • 物品名称修改
    • tooltips
      • 样式代码
    • 物品条件
    • 物品转换器
    • 掉落物
      • 打草掉落物
      • 生物掉落物
      • Dropt - 导言
        • Dropt - 方法速查
        • Dropt - 使用示例
    • 战利品表 : 导论
      • 战利品表修改(LootTableTweaker)
      • 战利品表修改(LootTweaker-基础)
    • 循环语句(foreach循环) / 普通数组
  • 高级运用
    • 概论
      • 基本类
      • ZenGetter
      • ZenSetter
      • ZenMethod(方法)
    • 常见错误
    • 基本运算
    • 数组与集合
    • 循环与遍历
    • 全局函数
    • Math包
    • if
    • in/has 操作符
    • 战利品表修改(LootTweaker-进阶)
    • 三元操作符
    • 预处理器
    • 全局和静态变量
    • 跨脚本引用
    • 关联数组(映射)
    • IItemStack类型的重新认识
    • IIngredient接口
    • IItemDefinition & IBlockDefinition
    • IData 类型
      • DataMap
    • 穷举与遍历
    • 自定义函数
    • 配方函数与配方事件
      • 配方函数
      • 配方事件
    • 事件概论
      • 一些忠告
    • ZenClass
  • ContentTweaker
    • ContentTweaker
    • 指令
    • 原版加工厂
      • 概论
      • 物品
      • 方块
      • 流体
      • 创造标签
      • 食物
    • 材料系统
      • 基础用法
        • 材料
        • 部件
        • 注册材料部件
        • 材料部件信息
      • 高级运用
        • 自定义部件类型
        • 注册自定义部件
        • 自定义材料部件信息
    • 高级运用
    • 更多鸡联动
    • 匠魂联动
      • 材料引导
        • 材料
        • 构建材料
      • 特性引导
        • 特性
        • 构建特性
        • 特性数据
      • 高级运用
  • 实战
    • 配方
      • 数据驱动合成修改
    • 事件
      • 修改方块掉落物
      • 禁止开创造
由 GitBook 提供支持
在本页
  • 导包
  • 方法一览
  • 原版箱子 LootTable 一览
  • 实例

这有帮助吗?

  1. 简单运用
  2. 战利品表 : 导论

战利品表修改(LootTableTweaker)

需要附属mod LootTableTweaker

上一页战利品表 : 导论下一页战利品表修改(LootTweaker-基础)

最后更新于1年前

这有帮助吗?

在阅读此页面前, 强烈建议先阅读 页面, 了解 LootTable 的相关原版概念.

其次, LootTweaker 和 LootTableTweaker 并不冲突, 且互相都有对方没有的功能, 实操时推荐两者都安装, 再根据自己的实际需求选用.

导包

import mods.ltt.LootTable;

方法一览

LootTable.removeTable("table"); // 移除指定的 LootTable
LootTable.removePool("table", "pool"); // 移除指定的随机池
LootTable.removeEntry("table", "pool", "entry"); // 移除指定的被抽出项
LootTable.removeItem("table", "pool", "itemid"); // 移除指定的物品
LootTable.removeModEntry("modid"); // 移除所有指定模组添加的被抽出项
LootTable.removeModItem("modid"); // 移除所有指定模组添加的物品
LootTable.removeModTable("modtable"); // 移除所有指定模组添加的 LootTable
LootTable.removeGlobalItem("itemid"); // 从所有 LootTable 中移除指定物品

原版箱子 LootTable 一览

"minecraft:chests/abandoned_mineshaft"
"minecraft:chests/desert_pyramid"
"minecraft:chests/end_city_treasure"
"minecraft:chests/igloo_chest"
"minecraft:chests/jungle_temple"
"minecraft:chests/jungle_temple_dispenser"
"minecraft:chests/nether_bridge"
"minecraft:chests/simple_dungeon"
"minecraft:chests/spawn_bonus_chest"
"minecraft:chests/stronghold_corridor"
"minecraft:chests/stronghold_crossing"
"minecraft:chests/stronghold_library"
"minecraft:chests/village_blacksmith"
"minecraft:chests/woodland_mansion"

实例

import crafttweaker.item.IItemStack;
import mods.ltt.LootTable;

// 移除沙漠神殿箱子的 LootTable
LootTable.removeTable("desert_pyramid");

// 移除末地城宝藏箱子的 LootTable 的 main 池.
LootTable.removePool("end_city_treasure", "main");

// 移除村庄铁匠铺箱子的 LootTable 的 main 池中的 minecraft:iron_ore 这一被抽出项
LootTable.removeEntry("minecraft:chests/village_blacksmith", "main", <minecraft:iron_ore>.id);

/*指定 LootTable "minecraft:chests/simple_dungeon" (小刷怪房箱子)
  选中此 LootTable 中的 "main" 池
  从此池中移除物品 "minecraft:iron" (为 IItemStack 调用 .id, 返回带 namespace 的物品名称)
*/
LootTable.removeItem("minecraft:chests/simple_dungeon", "main", <minecraft:iron>.id);

// 在所有 pool 中移除所有 ActuallyAdditons 添加的被抽出项
LootTable.removeModEntry("actuallyadditions");

// 在所有 pool 中移除所有 EnderIO 添加的物品
LootTable.removeModItem("enderio");

// 移除所有 GrowthCraft 添加的 LootTable
LootTable.removeModTable("growthcraft");

// 从所有 LootTable 中移除 minecraft:iron_sword 这一物品
LootTable.removeGlobalItem(<minecraft:iron_sword>.id);

是的, LootTableTweaker 无法添加 LootTable 或向任何 LootTable 中添加任何物品.

想要创建 LootTable 或向 LootTable 中添加物品, 请移步

LootTable : 导论
LootTweaker