
距离显示结果还剩5票~
暂无日志..
暂无管理组..
暂无编辑组..
暂无开发组..
概述
类似于生物阶段、配方阶段,本模组允许你在游戏阶段中加入单独的战利品表或者表中的特定物品,来达到限制的效果。
下面有一些实例,更多详细信息请阅读 CurseForge Pages。
实例(1.20.1)
//将战利品表添加进阶段限制,无阶段将不会获取到战利品表
//语法
LootStages.addLootTable(String stage, ResourceLocation table);
//实例
LootStages.addLootTable("one", <resource:minecraft:blocks/dirt>);
//语法(一次添加多个)
LootStages.addLootTable(String stage, ResourceLocation[] table);
//实例
LootStages.addLootTable("one", [<resource:minecraft:blocks/dirt>, <resource:minecraft:chests/village/village_armorer>]);
//将战利品表替换成另一个战利品表,当玩家没有到达相应阶段时
//语法
LootStages.addLootTableReplace(String stage, ResourceLocation table, ResourceLocation replaceTable);
//实例
LootStages.addLootTableReplace("one", <resource:minecraft:blocks/dirt>, <resource:minecraft:chests/village/village_armorer>);
//语法(一次添加多个)
LootStages.addLootTableReplace(String stage, ResourceLocation[] table, ResourceLocation replaceTable);
//实例
LootStages.addLootTableReplace("one", [<resource:minecraft:chests/village/village_fisher>, <resource:minecraft:chests/village/village_weaponsmith>], <resource:minecraft:chests/village/village_armorer>);
//将战利品表替换为函数中第二个参数中随机一个战利品表,当玩家没有响应阶段时
//语法
LootStages.addLootTableReplaceRandom(String stage, ResourceLocation table, ResourceLocation[] replaceTable);
//实例
LootStages.addLootTableReplaceRandom("one", <resource:minecraft:blocks/dirt>, [<resource:minecraft:chests/village/village_fisher>, <resource:minecraft:chests/village/village_weaponsmith>]);
//语法(一次添加多个)
LootStages.addLootTableReplaceRandom(String stage, ResourceLocation[] table, ResourceLocation[] replaceTable);
//实例
LootStages.addLootTableReplaceRandom("one", [<resource:minecraft:blocks/dirt>, <resource:minecraft:blocks/iron_block>], [<resource:minecraft:chests/village/village_fisher>, <resource:minecraft:chests/village/village_weaponsmith>]);
//将战利品表中的物品添加进限制,未到相应阶段物品不会出现(不影响战利品表出现,只让物品消失)
//语法
LootStages.addLootTableItem(String stage, ResourceLocation table, ItemStack items);
LootStages.addLootTableItem(String stage, ResourceLocation table, ItemStack[] items);
LootStages.addLootTableItem(String stage, ResourceLocation[] table, ItemStack items);
LootStages.addLootTableItem(String stage, ResourceLocation[] table, ItemStack[] items);
//将战利品表中的物品替换为另一个物品,未到相应阶段物品不会出现(不影响战利品表出现,只让物品消失)
//语法
LootStages.addLootTableItem((String stage, ResourceLocation table, ItemStack items, ItemStack replace);
LootStages.addLootTableItem((String stage, ResourceLocation table, ItemStack[] items, ItemStack replace);
LootStages.addLootTableItem(String stage, ResourceLocation[] table, ItemStack items, ItemStack replace);
LootStages.addLootTableItem(String stage, ResourceLocation[] table, ItemStack[] items, ItemStack replace);
实例(1.20.1 之前)
//导包
import mods.lootstages.LootStages;
//格式
LootStages.addChestItemStage(String stage, ResourceLocation table, IItemStack itemStack);
//例句
LootStages.addChestItemStage("one", <resource:minecraft:chests/village/village_butcher>, <item:minecraft:beef>);
//格式
LootStages.addChestTableStage(String stage, ResourceLocation table, ResourceLocation replaceTable);
//例句
LootStages.addChestTableStage("two", <resource:minecraft:chests/village/village_butcher>,
<resource:minecraft:chests/village/village_mason>);
//格式
LootStages.addEntityTableStage(String stage, ResourceLocation table, ResourceLocation replaceTable);
//例句
LootStages.addEntityTableStage("three",
<resource:minecraft:entities/pig>, <resource:minecraft:chests/village/village_butcher>);
//格式
LootStages.addBlockTableStages(String stage, Block block, ResourceLocation replaceTable);
LootStages.addBlockTableStages(String stage, Block block, IItemStack itemStack);
//例句
LootStages.addBlockTableStages("test1", <block:minecraft:dirt>, <resource:minecraft:chests/village/village_mason>);
LootStages.addBlockTableStages("test2", <block:minecraft:dirt>, <item:minecraft:beef>);


