88import gregtech .core .sound .GTSoundEvents ;
99import net .minecraft .client .Minecraft ;
1010import net .minecraft .enchantment .EnumEnchantmentType ;
11+ import net .minecraft .entity .monster .EntityGolem ;
12+ import net .minecraft .entity .monster .EntitySpider ;
1113import net .minecraft .init .SoundEvents ;
1214import net .minecraft .item .ItemStack ;
1315import net .minecraftforge .client .model .ModelLoader ;
@@ -86,7 +88,8 @@ public static void init() {
8688 .toolClasses (ToolClasses .SAW ));
8789 HARD_HAMMER = register (ItemGTTool .Builder .of (GTValues .MODID , "hammer" )
8890 .toolStats (b -> b .blockBreaking ().crafting ().damagePerCraftingAction (2 )
89- .attackDamage (1.0F ).attackSpeed (-2.8F ))
91+ .attackDamage (1.0F ).attackSpeed (-2.8F )
92+ .behaviors (new EntityDamageBehavior (2.0F , EntityGolem .class )))
9093 .oreDict (ToolOreDicts .craftingToolHammer )
9194 .sound (SoundEvents .BLOCK_ANVIL_LAND )
9295 .symbol ('h' )
@@ -111,7 +114,7 @@ public static void init() {
111114 WRENCH = register (ItemGTTool .Builder .of (GTValues .MODID , "wrench" )
112115 .toolStats (b -> b .blockBreaking ().crafting ().sneakBypassUse ()
113116 .attackDamage (1.0F ).attackSpeed (-2.8F )
114- .behaviors (new BlockRotatingBehavior ()))
117+ .behaviors (new BlockRotatingBehavior (), new EntityDamageBehavior ( 3.0F , EntityGolem . class ) ))
115118 .sound (GTSoundEvents .WRENCH_TOOL , true )
116119 .oreDict (ToolOreDicts .craftingToolWrench )
117120 .symbol ('w' )
@@ -133,7 +136,8 @@ public static void init() {
133136 .toolClasses (ToolClasses .CROWBAR ));
134137 SCREWDRIVER = register (ItemGTTool .Builder .of (GTValues .MODID , "screwdriver" )
135138 .toolStats (b -> b .crafting ().damagePerCraftingAction (4 ).sneakBypassUse ()
136- .attackDamage (-1.0F ).attackSpeed (3.0F ))
139+ .attackDamage (-1.0F ).attackSpeed (3.0F )
140+ .behaviors (new EntityDamageBehavior (3.0F , EntitySpider .class )))
137141 .sound (GTSoundEvents .SCREWDRIVER_TOOL )
138142 .oreDict (ToolOreDicts .craftingToolScrewdriver )
139143 .symbol ('d' )
@@ -227,6 +231,7 @@ public static void init() {
227231 .toolStats (b -> b .blockBreaking ().crafting ().sneakBypassUse ()
228232 .efficiencyMultiplier (2.0F )
229233 .attackDamage (1.0F ).attackSpeed (-2.8F )
234+ .behaviors (new BlockRotatingBehavior (), new EntityDamageBehavior (3.0F , EntityGolem .class ))
230235 .brokenStack (ToolHelper .SUPPLY_POWER_UNIT_LV ))
231236 .sound (GTSoundEvents .WRENCH_TOOL , true )
232237 .oreDict (ToolOreDicts .craftingToolWrench )
@@ -236,6 +241,7 @@ public static void init() {
236241 .toolStats (b -> b .blockBreaking ().crafting ().sneakBypassUse ()
237242 .efficiencyMultiplier (3.0F )
238243 .attackDamage (1.0F ).attackSpeed (-2.8F )
244+ .behaviors (new BlockRotatingBehavior (), new EntityDamageBehavior (3.0F , EntityGolem .class ))
239245 .brokenStack (ToolHelper .SUPPLY_POWER_UNIT_HV ))
240246 .sound (GTSoundEvents .WRENCH_TOOL , true )
241247 .oreDict (ToolOreDicts .craftingToolWrench )
@@ -245,6 +251,7 @@ public static void init() {
245251 .toolStats (b -> b .blockBreaking ().crafting ().sneakBypassUse ()
246252 .efficiencyMultiplier (4.0F )
247253 .attackDamage (1.0F ).attackSpeed (-2.8F )
254+ .behaviors (new BlockRotatingBehavior (), new EntityDamageBehavior (3.0F , EntityGolem .class ))
248255 .brokenStack (ToolHelper .SUPPLY_POWER_UNIT_IV ))
249256 .sound (GTSoundEvents .WRENCH_TOOL , true )
250257 .oreDict (ToolOreDicts .craftingToolWrench )
@@ -260,6 +267,7 @@ public static void init() {
260267 SCREWDRIVER_LV = register (ItemGTTool .Builder .of (GTValues .MODID , "screwdriver_lv" )
261268 .toolStats (b -> b .crafting ().sneakBypassUse ()
262269 .attackDamage (-1.0F ).attackSpeed (3.0F )
270+ .behaviors (new EntityDamageBehavior (3.0F , EntitySpider .class ))
263271 .brokenStack (ToolHelper .SUPPLY_POWER_UNIT_LV ))
264272 .sound (GTSoundEvents .SCREWDRIVER_TOOL )
265273 .oreDict (ToolOreDicts .craftingToolScrewdriver )
0 commit comments