6969
7070@ Mod (Bookshelf .MOD_ID )
7171public final class Bookshelf {
72-
72+
7373 public static Bookshelf instance ;
74-
74+
7575 // System Constants
7676 public static final Random RANDOM = new Random ();
77-
77+
7878 public static final String NEW_LINE = System .getProperty ("line.separator" );
79-
79+
8080 // Mod Constants
8181 public static final String MOD_ID = "bookshelf" ;
82-
82+
8383 public static final String MOD_NAME = "Bookshelf" ;
84-
84+
8585 public static final Logger LOG = LogManager .getLogger (MOD_NAME );
86-
86+
8787 private final RegistryHelper registry = new RegistryHelper (MOD_ID , LOG );
88-
88+
8989 public final LootConditionType conditionIsMob ;
9090 public final LootConditionType conditionCheckVillage ;
9191 public final LootConditionType conditionCheckStructure ;
@@ -99,17 +99,17 @@ public final class Bookshelf {
9999 public final LootConditionType conditionCheckEnchantability ;
100100 public final LootConditionType conditionCheckBiomeTag ;
101101 public final LootConditionType conditionCheckDimension ;
102-
103- public Bookshelf () {
104-
102+
103+ public Bookshelf () {
104+
105105 // Commands
106106 new BookshelfCommands (this .registry );
107-
107+
108108 // Command arguments
109109 this .registry .commands .registerCommandArgument ("enum" , ArgumentTypeHandOutput .class , new ArgumentTypeHandOutput .Serialzier ());
110110 this .registry .commands .registerCommandArgument ("mod" , ArgumentTypeMod .class , new ArgumentSerializer <>( () -> ArgumentTypeMod .INSTACE ));
111111 this .registry .commands .registerCommandArgument ("loot" , ArgumentTypeLootTable .class , new ArgumentSerializer <>( () -> ArgumentTypeLootTable .INSTACE ));
112-
112+
113113 // Loot Modifier
114114 this .registry .lootModifiers .register (ModifierClear .SERIALIZER , "clear" );
115115 this .registry .lootModifiers .register (ModifierSilkTouch .SERIALIZER , "silk_touch" );
@@ -122,7 +122,7 @@ public Bookshelf() {
122122 this .registry .lootModifiers .register (ModifierRecipe .STONECUT , "stonecutting" );
123123 this .registry .lootModifiers .register (ModifierRecipe .SMITHING , "smithing" );
124124 this .registry .lootModifiers .register (ModifierAddItem .SERIALIZER , "add_item" );
125-
125+
126126 // Loot Conditions
127127 this .conditionIsMob = this .registry .lootConditions .register (EntityIsMob .SERIALIZER , "is_mob" );
128128 this .conditionCheckVillage = this .registry .lootConditions .register (CheckVillage .SERIALIZER , "check_village" );
@@ -137,18 +137,18 @@ public Bookshelf() {
137137 this .conditionCheckEnchantability = this .registry .lootConditions .register (CheckEnchantability .SERIALIZER , "check_enchantability" );
138138 this .conditionCheckBiomeTag = this .registry .lootConditions .register (CheckBiomeTag .SERIALIZER , "check_biome_tag" );
139139 this .conditionCheckDimension = this .registry .lootConditions .register (CheckDimensionId .SERIALIZER , "check_dimension" );
140-
140+
141141 // Item Predicates
142142 ItemPredicate .register (new ResourceLocation ("bookshelf" , "modid" ), ItemPredicateModid ::fromJson );
143143 ItemPredicate .register (new ResourceLocation ("bookshelf" , "ingredient" ), ItemPredicateIngredient ::fromJson );
144-
144+
145145 // Recipe Serializers
146146 this .registry .recipeSerializers .register (ShapedRecipeDamaging .SERIALIZER , "crafting_shaped_with_damage" );
147147 this .registry .recipeSerializers .register (ShapelessRecipeDamage .SERIALIZER , "crafting_shapeless_with_damage" );
148148 this .registry .recipeSerializers .register (SmithingRecipeFont .SERIALIZER , "smithing_font" );
149149 this .registry .recipeSerializers .register (SmithingRecipeRepairCost .SERIALIZER , "smithing_repair_cost" );
150150 this .registry .recipeSerializers .register (SmithingRecipeEnchantment .SERIALIZER , "smithing_enchant" );
151-
151+
152152 // Ingredients
153153 this .registry .ingredients .register ("potion" , IngredientPotion .SERIALIZER );
154154 this .registry .ingredients .register ("modid" , IngredientModid .SERIALIZER );
@@ -158,7 +158,7 @@ public Bookshelf() {
158158 this .registry .ingredients .register ("any_shovel" , IngredientToolType .create (i -> i instanceof ShovelItem , ToolType .SHOVEL ));
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 ));
161-
161+
162162 this .registry .ingredients .register ("enchant_armor" , IngredientEnchantmentType .create (EnchantmentType .ARMOR ));
163163 this .registry .ingredients .register ("enchant_armor_feet" , IngredientEnchantmentType .create (EnchantmentType .ARMOR_FEET ));
164164 this .registry .ingredients .register ("enchant_armor_legs" , IngredientEnchantmentType .create (EnchantmentType .ARMOR_LEGS ));
@@ -173,14 +173,14 @@ public Bookshelf() {
173173 this .registry .ingredients .register ("enchant_wearable" , IngredientEnchantmentType .create (EnchantmentType .WEARABLE ));
174174 this .registry .ingredients .register ("enchant_crossbow" , IngredientEnchantmentType .create (EnchantmentType .CROSSBOW ));
175175 this .registry .ingredients .register ("enchant_vanishable" , IngredientEnchantmentType .create (EnchantmentType .VANISHABLE ));
176-
176+
177177 // Block Ingredients
178178 BlockIngredient .register (BlockIngredientAny .SERIALIZER , BlockIngredientAny .ID );
179179 BlockIngredient .register (BlockIngredientCheckState .SERIALIZER , BlockIngredientCheckState .ID );
180180 BlockIngredient .register (BlockIngredientCheckBlock .SERIALIZER , BlockIngredientCheckBlock .ID );
181181 BlockIngredient .register (BlockIngredientCheckTag .SERIALIZER , BlockIngredientCheckTag .ID );
182182 BlockIngredient .register (BlockIngredientTestState .SERIALIZER , BlockIngredientTestState .ID );
183-
183+
184184 this .registry .initialize (FMLJavaModLoadingContext .get ().getModEventBus ());
185185 }
186186}
0 commit comments