@@ -21,161 +21,58 @@ public class GenerationsTools {
2121 /**
2222 * Tools
2323 */
24- public static final ToolSet CHARGE_STONE = ToolSet .create ("charge_stone" , () -> GenerationsTiers .CHARGE_STONE ,
25- 0 ,
26- 0 ,
27- 0 ,
28- 0 ,
29- 0 ,
30- 0 );
31-
32- public static final ToolSet VOLCANIC_STONE = ToolSet .create ("volcanic_stone" , () -> GenerationsTiers .CHARGE_STONE ,
33- 0 ,
34- 0 ,
35- 0 ,
36- 0 ,
37- 0 ,
38- 0 );
39-
40- public static final ToolSet AMETHYST = ToolSet .create ("amethyst" , () -> GenerationsTiers .AMETHYST ,
41- 1 ,
42- 2 ,
43- 3 ,
44- 2 ,
45- 2 ,
46- 4 );
47-
48- public static final ToolSet CRYSTAL = ToolSet .create ("crystal" , () -> GenerationsTiers .CRYSTAL ,
49- 1 ,
50- 2 ,
51- 3 ,
52- -2 ,
53- 2 ,
54- 4 );
24+ public static final ToolSet CHARGE_STONE = ToolSet .create ("charge_stone" , () -> GenerationsTiers .CHARGE_STONE );
25+
26+ public static final ToolSet VOLCANIC_STONE = ToolSet .create ("volcanic_stone" , () -> GenerationsTiers .CHARGE_STONE );
27+
28+ public static final ToolSet AMETHYST = ToolSet .create ("amethyst" , () -> GenerationsTiers .AMETHYST );
29+
30+ public static final ToolSet CRYSTAL = ToolSet .create ("crystal" , () -> GenerationsTiers .CRYSTAL );
5531
5632 public static final ToolSet DAWN_STONE = ToolSet .create ("dawn_stone" , () -> GenerationsTiers .DAWN_STONE ,
57- 1 ,
58- 2 ,
59- 3 ,
60- 0 ,
61- 2 ,
62- 4 ,
6333 new PotionToolEffect (MobEffects .HEALTH_BOOST , 0 , 6000 , 1 ));
6434
6535 public static final ToolSet DUSK_STONE = ToolSet .create ("dusk_stone" , () -> GenerationsTiers .DUSK_STONE ,
66- 1 ,
67- 2 ,
68- 3 ,
69- 0 ,
70- 2 ,
71- 4 ,
7236 new PotionToolEffect (MobEffects .INVISIBILITY , 0 , 6000 , 1 ));
7337
7438 public static final ToolSet FIRE_STONE = ToolSet .create ("fire_stone" , () -> GenerationsTiers .FIRE_STONE ,
75- 1 ,
76- 2 ,
77- 3 ,
78- -3 ,
79- 2 ,
80- 4 ,
8139 true ,
8240 new TransformToolEffect (Blocks .WATER , Blocks .OBSIDIAN , 1 ));
8341
8442 public static final ToolSet ICE_STONE = ToolSet .create ("ice_stone" , () -> GenerationsTiers .ICE_STONE ,
85- 4 ,
86- 5 ,
87- 6 ,
88- 0 ,
89- 5 ,
90- 7 ,
9143 new TransformToolEffect (Blocks .WATER , Blocks .ICE , 1 ));
9244
9345 public static final ToolSet LEAF_STONE = ToolSet .create ("leaf_stone" , () -> GenerationsTiers .LEAF_STONE ,
94- 1 ,
95- 2 ,
96- 3 ,
97- -2 ,
98- 2 ,
99- 4 ,
10046 new BoneMealToolEffect (12 ));
10147
10248 public static final ToolSet MOON_STONE = ToolSet .create ("moon_stone" , () -> GenerationsTiers .MOON_STONE ,
103- 1 ,
104- 2 ,
105- 3 ,
106- 0 ,
107- 2 ,
108- 4 ,
10949 new PotionToolEffect (MobEffects .NIGHT_VISION , 0 , 6000 , 1 ));
11050
111- public static final ToolSet RUBY = ToolSet .create ("ruby" , () -> GenerationsTiers .RUBY ,
112- 1 ,
113- 2 ,
114- 3 ,
115- -2 ,
116- 2 ,
117- 4 );
118-
119- public static final ToolSet SAPPHIRE = ToolSet .create ("sapphire" , () -> GenerationsTiers .SAPPHIRE ,
120- 1 ,
121- 2 ,
122- 3 ,
123- -2 ,
124- 2 ,
125- 4 );
126-
127- public static final ToolSet SILICON = ToolSet .create ("silicon" , () -> GenerationsTiers .SILICON ,
128- 0 ,
129- 0 ,
130- 0 ,
131- 0 ,
132- 6 ,
133- 0 );
51+ public static final ToolSet RUBY = ToolSet .create ("ruby" , () -> GenerationsTiers .RUBY );
52+
53+ public static final ToolSet SAPPHIRE = ToolSet .create ("sapphire" , () -> GenerationsTiers .SAPPHIRE );
54+
55+ public static final ToolSet SILICON = ToolSet .create ("silicon" , () -> GenerationsTiers .SILICON );
13456
13557 public static final ToolSet SUN_STONE = ToolSet .create ("sun_stone" , () -> GenerationsTiers .SUN_STONE ,
136- 1 ,
137- 2 ,
138- 3 ,
139- 0 ,
140- 2 ,
141- 4 ,
14258 true ,
14359 new PlaceItemToolEffect ((BlockItem ) Items .TORCH , 5 )); //TODO: Replace with temp light source derived from tinker's construct's light source
14460
14561 public static final ToolSet THUNDER_STONE = ToolSet .create ("thunder_stone" , () -> GenerationsTiers .THUNDER_STONE ,
146- 1 ,
147- 2 ,
148- 3 ,
149- 0 ,
150- 2 ,
151- 4 ,
15262 new EnchantmentToolEffect (Enchantments .EFFICIENCY , 3 , 1 ));
15363
15464 public static final ToolSet WATER_STONE = ToolSet .create ("water_stone" , () -> GenerationsTiers .WATER_STONE ,
155- 1 ,
156- 2 ,
157- 3 ,
158- -3 ,
159- 2 ,
160- 4 ,
16165 new EnchantmentToolEffect (Enchantments .EFFICIENCY , 3 , 1 ));
16266
163- public static final ToolSet ULTRITE = ToolSet .create ("ultrite" , () -> GenerationsTiers .ULTRITE ,
164- 1.5f ,
165- 1 ,
166- 5 ,
167- -5 ,
168- 2 ,
169- 3 ,
170- true );
171-
172- public static final RegistrySupplier <Item > DIAMOND_HAMMER = register ("diamond_hammer" , properties -> new GenerationsHammerItem (Tiers .DIAMOND , 5.0F , -3.0F , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
173- public static final RegistrySupplier <Item > GOLDEN_HAMMER = register ("golden_hammer" , properties -> new GenerationsHammerItem (Tiers .GOLD , 6.0F , -3.0F , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
174- public static final RegistrySupplier <Item > IRON_HAMMER = register ("iron_hammer" , properties -> new GenerationsHammerItem (Tiers .IRON , 6.0F , -3.1F , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
175- public static final RegistrySupplier <Item > NETHERITE_HAMMER = register ("netherite_hammer" , properties -> new GenerationsHammerItem (Tiers .NETHERITE , 5.0F , -3.0F , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
67+ public static final ToolSet ULTRITE = ToolSet .create ("ultrite" , () -> GenerationsTiers .ULTRITE , true );
68+
69+ public static final RegistrySupplier <Item > DIAMOND_HAMMER = register ("diamond_hammer" , properties -> new GenerationsHammerItem (Tiers .DIAMOND , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
70+ public static final RegistrySupplier <Item > GOLDEN_HAMMER = register ("golden_hammer" , properties -> new GenerationsHammerItem (Tiers .GOLD , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
71+ public static final RegistrySupplier <Item > IRON_HAMMER = register ("iron_hammer" , properties -> new GenerationsHammerItem (Tiers .IRON , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
72+ public static final RegistrySupplier <Item > NETHERITE_HAMMER = register ("netherite_hammer" , properties -> new GenerationsHammerItem (Tiers .NETHERITE , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
17673// public static final RegistrySupplier<Item> ULTRITE_HAMMER = register("ultrite_hammer", properties -> new GenerationsHammerItem(GenerationsTiers.ULTRITE, 4.0F, -3.0F, properties), CreativeModeTabs.TOOLS_AND_UTILITIES);
177- public static final RegistrySupplier <Item > STONE_HAMMER = register ("stone_hammer" , properties -> new GenerationsHammerItem (Tiers .STONE , 7.0F , - 3.2F , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
178- public static final RegistrySupplier <Item > WOODEN_HAMMER = register ("wooden_hammer" , properties -> new GenerationsHammerItem (Tiers .WOOD , 6.0F , - 3.2F , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
74+ public static final RegistrySupplier <Item > STONE_HAMMER = register ("stone_hammer" , properties -> new GenerationsHammerItem (Tiers .STONE , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
75+ public static final RegistrySupplier <Item > WOODEN_HAMMER = register ("wooden_hammer" , properties -> new GenerationsHammerItem (Tiers .WOOD , properties ), CreativeModeTabs .TOOLS_AND_UTILITIES );
17976
18077 private static <T extends Item > RegistrySupplier <T > register (String name , Function <Item .Properties , T > function , ResourceKey <CreativeModeTab > tab ) {
18178 return TOOLS .register (name , () -> function .apply (of ().arch$tab (tab )));
@@ -192,28 +89,28 @@ public static void init() {
19289 }
19390
19491 public record ToolSet (RegistrySupplier <GenerationsShovelItem > shovel , RegistrySupplier <GenerationsPickaxeItem > pickaxe , RegistrySupplier <GenerationsAxeItem > axe , RegistrySupplier <GenerationsHoeItem > hoe , RegistrySupplier <GenerationsHammerItem > hammer , RegistrySupplier <GenerationsSwordItem > sword ) {
195- public static ToolSet create (String name , Supplier <Tier > tier , float shovelDamage , float pickaxeDamage , float axeDamage , float hoeDamage , float hammerDamage , float swordDamage , ToolEffect ... toolEffects ) {
196- return create (name , tier , shovelDamage , pickaxeDamage , axeDamage , hoeDamage , hammerDamage , swordDamage , false , toolEffects );
92+ public static ToolSet create (String name , Supplier <Tier > tier , ToolEffect ... toolEffects ) {
93+ return create (name , tier , false , toolEffects );
19794 }
19895
199- public static ToolSet create (String name , Supplier <Tier > tier , float shovelDamage , float pickaxeDamage , float axeDamage , float hoeDamage , float hammerDamage , float swordDamage , boolean fireProof , ToolEffect ... toolEffects ) {
96+ public static ToolSet create (String name , Supplier <Tier > tier , boolean fireProof , ToolEffect ... toolEffects ) {
20097 return new ToolSet (
201- register (name + "_shovel" , GenerationsShovelItem ::new , tier , shovelDamage , - 3.0F , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
202- register (name + "_pickaxe" , GenerationsPickaxeItem ::new , tier , pickaxeDamage , - 2.8F , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
203- register (name + "_axe" , GenerationsAxeItem ::new , tier , axeDamage , - 3.0F , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
204- register (name + "_hoe" , GenerationsHoeItem ::new , tier , hoeDamage , - 1.0F , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
205- register (name + "_hammer" , GenerationsHammerItem ::new , tier , hammerDamage , - 3.1F , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
206- register (name + "_sword" , GenerationsSwordItem ::new , tier , swordDamage , - 2.4F , CreativeModeTabs .COMBAT , fireProof , toolEffects ));
98+ register (name + "_shovel" , GenerationsShovelItem ::new , tier , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
99+ register (name + "_pickaxe" , GenerationsPickaxeItem ::new , tier , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
100+ register (name + "_axe" , GenerationsAxeItem ::new , tier , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
101+ register (name + "_hoe" , GenerationsHoeItem ::new , tier , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
102+ register (name + "_hammer" , GenerationsHammerItem ::new , tier , CreativeModeTabs .TOOLS_AND_UTILITIES , fireProof , toolEffects ),
103+ register (name + "_sword" , GenerationsSwordItem ::new , tier , CreativeModeTabs .COMBAT , fireProof , toolEffects ));
207104 }
208- private static <T extends Item & ToolEffectHolder <T >> RegistrySupplier <T > register (String name , ToolSupplier <T > supplier , Supplier <Tier > tier , float attackDamage , float attackSpeed , ResourceKey <CreativeModeTab > tab , boolean fireProof , ToolEffect ... toolEffects ) {
105+ private static <T extends Item & ToolEffectHolder <T >> RegistrySupplier <T > register (String name , ToolSupplier <T > supplier , Supplier <Tier > tier , ResourceKey <CreativeModeTab > tab , boolean fireProof , ToolEffect ... toolEffects ) {
209106 return GenerationsTools .register (name , properties -> {
210107 if (fireProof ) properties .fireResistant ();
211- return supplier .create (tier .get (), attackDamage , attackSpeed , properties ).addToolEffects (toolEffects );
108+ return supplier .create (tier .get (), properties ).addToolEffects (toolEffects );
212109 }, tab );
213110 }
214111
215112 private interface ToolSupplier <T extends Item > {
216- T create (Tier tier , float attackDamage , float attackSpeed , Item .Properties properties );
113+ T create (Tier tier , Item .Properties properties );
217114 }
218115 }
219116}
0 commit comments