5252import net .darkhax .bookshelf .loot .modifier .ModifierRecipe ;
5353import net .darkhax .bookshelf .loot .modifier .ModifierSilkTouch ;
5454import net .darkhax .bookshelf .registry .RegistryHelper ;
55- import net .minecraft .advancements .criterion .ItemPredicate ;
56- import net .minecraft .command . arguments . ArgumentSerializer ;
57- import net .minecraft .enchantment .EnchantmentType ;
58- import net .minecraft .item .AxeItem ;
59- import net .minecraft .item .HoeItem ;
60- import net .minecraft .item .PickaxeItem ;
61- import net .minecraft .item .ShearsItem ;
62- import net .minecraft .item .ShovelItem ;
63- import net .minecraft .item .SwordItem ;
64- import net .minecraft .loot .LootConditionType ;
65- import net .minecraft .util .ResourceLocation ;
55+ import net .minecraft .advancements .critereon .ItemPredicate ;
56+ import net .minecraft .commands . synchronization . EmptyArgumentSerializer ;
57+ import net .minecraft .world . item . enchantment .EnchantmentCategory ;
58+ import net .minecraft .world . item .AxeItem ;
59+ import net .minecraft .world . item .HoeItem ;
60+ import net .minecraft .world . item .PickaxeItem ;
61+ import net .minecraft .world . item .ShearsItem ;
62+ import net .minecraft .world . item .ShovelItem ;
63+ import net .minecraft .world . item .SwordItem ;
64+ import net .minecraft .world . level . storage . loot .predicates . LootItemConditionType ;
65+ import net .minecraft .resources .ResourceLocation ;
6666import net .minecraftforge .common .ToolType ;
6767import net .minecraftforge .fml .common .Mod ;
6868import net .minecraftforge .fml .javafmlmod .FMLJavaModLoadingContext ;
@@ -86,19 +86,19 @@ public final class Bookshelf {
8686
8787 private final RegistryHelper registry = new RegistryHelper (MOD_ID , LOG );
8888
89- public final LootConditionType conditionIsMob ;
90- public final LootConditionType conditionCheckVillage ;
91- public final LootConditionType conditionCheckStructure ;
92- public final LootConditionType conditionCheckSlimeChunk ;
93- public final LootConditionType conditionCheckRarity ;
94- public final LootConditionType conditionCheckRaid ;
95- public final LootConditionType conditionCheckPower ;
96- public final LootConditionType conditionCheckItem ;
97- public final LootConditionType conditionCheckHarvestLevel ;
98- public final LootConditionType conditionCheckEnergy ;
99- public final LootConditionType conditionCheckEnchantability ;
100- public final LootConditionType conditionCheckBiomeTag ;
101- public final LootConditionType conditionCheckDimension ;
89+ public final LootItemConditionType conditionIsMob ;
90+ public final LootItemConditionType conditionCheckVillage ;
91+ public final LootItemConditionType conditionCheckStructure ;
92+ public final LootItemConditionType conditionCheckSlimeChunk ;
93+ public final LootItemConditionType conditionCheckRarity ;
94+ public final LootItemConditionType conditionCheckRaid ;
95+ public final LootItemConditionType conditionCheckPower ;
96+ public final LootItemConditionType conditionCheckItem ;
97+ public final LootItemConditionType conditionCheckHarvestLevel ;
98+ public final LootItemConditionType conditionCheckEnergy ;
99+ public final LootItemConditionType conditionCheckEnchantability ;
100+ public final LootItemConditionType conditionCheckBiomeTag ;
101+ public final LootItemConditionType conditionCheckDimension ;
102102
103103 public Bookshelf () {
104104
@@ -107,8 +107,8 @@ public Bookshelf () {
107107
108108 // Command arguments
109109 this .registry .commands .registerCommandArgument ("enum" , ArgumentTypeHandOutput .class , new ArgumentTypeHandOutput .Serialzier ());
110- this .registry .commands .registerCommandArgument ("mod" , ArgumentTypeMod .class , new ArgumentSerializer <>( () -> ArgumentTypeMod .INSTACE ));
111- this .registry .commands .registerCommandArgument ("loot" , ArgumentTypeLootTable .class , new ArgumentSerializer <>( () -> ArgumentTypeLootTable .INSTACE ));
110+ this .registry .commands .registerCommandArgument ("mod" , ArgumentTypeMod .class , new EmptyArgumentSerializer <>( () -> ArgumentTypeMod .INSTACE ));
111+ this .registry .commands .registerCommandArgument ("loot" , ArgumentTypeLootTable .class , new EmptyArgumentSerializer <>( () -> ArgumentTypeLootTable .INSTACE ));
112112
113113 // Loot Modifier
114114 this .registry .lootModifiers .register (ModifierClear .SERIALIZER , "clear" );
@@ -159,20 +159,20 @@ public Bookshelf () {
159159 this .registry .ingredients .register ("any_sword" , IngredientToolType .create (i -> i instanceof SwordItem , null ));
160160 this .registry .ingredients .register ("any_shear" , IngredientToolType .create (i -> i instanceof ShearsItem , null ));
161161
162- this .registry .ingredients .register ("enchant_armor" , IngredientEnchantmentType .create (EnchantmentType .ARMOR ));
163- this .registry .ingredients .register ("enchant_armor_feet" , IngredientEnchantmentType .create (EnchantmentType .ARMOR_FEET ));
164- this .registry .ingredients .register ("enchant_armor_legs" , IngredientEnchantmentType .create (EnchantmentType .ARMOR_LEGS ));
165- this .registry .ingredients .register ("enchant_armor_chest" , IngredientEnchantmentType .create (EnchantmentType .ARMOR_CHEST ));
166- this .registry .ingredients .register ("enchant_armor_head" , IngredientEnchantmentType .create (EnchantmentType .ARMOR_HEAD ));
167- this .registry .ingredients .register ("enchant_weapon" , IngredientEnchantmentType .create (EnchantmentType .WEAPON ));
168- this .registry .ingredients .register ("enchant_digger" , IngredientEnchantmentType .create (EnchantmentType .DIGGER ));
169- this .registry .ingredients .register ("enchant_fishing_rod" , IngredientEnchantmentType .create (EnchantmentType .FISHING_ROD ));
170- this .registry .ingredients .register ("enchant_trident" , IngredientEnchantmentType .create (EnchantmentType .TRIDENT ));
171- this .registry .ingredients .register ("enchant_breakable" , IngredientEnchantmentType .create (EnchantmentType .BREAKABLE ));
172- this .registry .ingredients .register ("enchant_bow" , IngredientEnchantmentType .create (EnchantmentType .BOW ));
173- this .registry .ingredients .register ("enchant_wearable" , IngredientEnchantmentType .create (EnchantmentType .WEARABLE ));
174- this .registry .ingredients .register ("enchant_crossbow" , IngredientEnchantmentType .create (EnchantmentType .CROSSBOW ));
175- this .registry .ingredients .register ("enchant_vanishable" , IngredientEnchantmentType .create (EnchantmentType .VANISHABLE ));
162+ this .registry .ingredients .register ("enchant_armor" , IngredientEnchantmentType .create (EnchantmentCategory .ARMOR ));
163+ this .registry .ingredients .register ("enchant_armor_feet" , IngredientEnchantmentType .create (EnchantmentCategory .ARMOR_FEET ));
164+ this .registry .ingredients .register ("enchant_armor_legs" , IngredientEnchantmentType .create (EnchantmentCategory .ARMOR_LEGS ));
165+ this .registry .ingredients .register ("enchant_armor_chest" , IngredientEnchantmentType .create (EnchantmentCategory .ARMOR_CHEST ));
166+ this .registry .ingredients .register ("enchant_armor_head" , IngredientEnchantmentType .create (EnchantmentCategory .ARMOR_HEAD ));
167+ this .registry .ingredients .register ("enchant_weapon" , IngredientEnchantmentType .create (EnchantmentCategory .WEAPON ));
168+ this .registry .ingredients .register ("enchant_digger" , IngredientEnchantmentType .create (EnchantmentCategory .DIGGER ));
169+ this .registry .ingredients .register ("enchant_fishing_rod" , IngredientEnchantmentType .create (EnchantmentCategory .FISHING_ROD ));
170+ this .registry .ingredients .register ("enchant_trident" , IngredientEnchantmentType .create (EnchantmentCategory .TRIDENT ));
171+ this .registry .ingredients .register ("enchant_breakable" , IngredientEnchantmentType .create (EnchantmentCategory .BREAKABLE ));
172+ this .registry .ingredients .register ("enchant_bow" , IngredientEnchantmentType .create (EnchantmentCategory .BOW ));
173+ this .registry .ingredients .register ("enchant_wearable" , IngredientEnchantmentType .create (EnchantmentCategory .WEARABLE ));
174+ this .registry .ingredients .register ("enchant_crossbow" , IngredientEnchantmentType .create (EnchantmentCategory .CROSSBOW ));
175+ this .registry .ingredients .register ("enchant_vanishable" , IngredientEnchantmentType .create (EnchantmentCategory .VANISHABLE ));
176176
177177 // Block Ingredients
178178 BlockIngredient .register (BlockIngredientAny .SERIALIZER , BlockIngredientAny .ID );
0 commit comments