diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java index c5c6d049f..8fb3ba4fe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java @@ -10,18 +10,30 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; -import net.minecraft.block.Block; +import com.google.common.collect.ImmutableSet; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.item.IItemTier; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tags.ITag; +import net.minecraft.item.ToolItem; +import net.minecraftforge.common.ToolType; -import java.util.Set; +public class ItemAxeAA extends ToolItem { + private IItemTier tier; + public ItemAxeAA(IItemTier tier) { + super( + 4.0f, + -2f, + tier, + ImmutableSet.of(), + new Properties() + .addToolType(ToolType.AXE, tier.getLevel()) + .addToolType(ToolType.HOE, tier.getLevel()) + .addToolType(ToolType.SHOVEL, tier.getLevel()) + .addToolType(ToolType.PICKAXE, tier.getLevel()) + .durability(tier.getUses() * 4) + .tab(ActuallyAdditions.GROUP) + ); -public class ItemAxeAA extends ItemToolAA { - public ItemAxeAA(float p_i48512_1_, float p_i48512_2_, IItemTier p_i48512_3_, Set p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, ITag repairTag) { - super(p_i48512_1_, p_i48512_2_, p_i48512_3_, p_i48512_4_, p_i48512_5_, name, repairItem, repairTag); + this.tier = tier; } /* diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java index 28d0b3e3f..853a93339 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java @@ -10,18 +10,30 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; -import net.minecraft.block.Block; +import com.google.common.collect.ImmutableSet; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.item.IItemTier; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tags.ITag; +import net.minecraft.item.ToolItem; +import net.minecraftforge.common.ToolType; -import java.util.Set; +public class ItemPickaxeAA extends ToolItem { + private final IItemTier tier; + public ItemPickaxeAA(IItemTier tier) { + super( + 4.0f, + -2f, + tier, + ImmutableSet.of(), + new Properties() + .addToolType(ToolType.AXE, tier.getLevel()) + .addToolType(ToolType.HOE, tier.getLevel()) + .addToolType(ToolType.SHOVEL, tier.getLevel()) + .addToolType(ToolType.PICKAXE, tier.getLevel()) + .durability(tier.getUses() * 4) + .tab(ActuallyAdditions.GROUP) + ); -public class ItemPickaxeAA extends ItemToolAA { - public ItemPickaxeAA(float p_i48512_1_, float p_i48512_2_, IItemTier p_i48512_3_, Set p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, ITag repairTag) { - super(p_i48512_1_, p_i48512_2_, p_i48512_3_, p_i48512_4_, p_i48512_5_, name, repairItem, repairTag); + this.tier = tier; } /* diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index 07656975a..59460ba1c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -10,12 +10,27 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.item.HoeItem; import net.minecraft.item.IItemTier; +import net.minecraftforge.common.ToolType; public class ItemHoeAA extends HoeItem { - public ItemHoeAA(IItemTier p_i231595_1_, int p_i231595_2_, float p_i231595_3_, Properties p_i231595_4_) { - super(p_i231595_1_, p_i231595_2_, p_i231595_3_, p_i231595_4_); + private IItemTier tier; + public ItemHoeAA(IItemTier tier) { + super(tier, + 4, + -2f, + new Properties() + .addToolType(ToolType.AXE, tier.getLevel()) + .addToolType(ToolType.HOE, tier.getLevel()) + .addToolType(ToolType.SHOVEL, tier.getLevel()) + .addToolType(ToolType.PICKAXE, tier.getLevel()) + .durability(tier.getUses() * 4) + .tab(ActuallyAdditions.GROUP) + ); + + this.tier = tier; } /* private final ItemStack repairItem; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index 6e5d067e1..8fb8fe588 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -10,12 +10,25 @@ package de.ellpeck.actuallyadditions.mod.items.base; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.item.IItemTier; import net.minecraft.item.SwordItem; +import net.minecraftforge.common.ToolType; public class ItemSwordAA extends SwordItem { - public ItemSwordAA(IItemTier p_i48460_1_, int p_i48460_2_, float p_i48460_3_, Properties p_i48460_4_) { - super(p_i48460_1_, p_i48460_2_, p_i48460_3_, p_i48460_4_); + private IItemTier tier; + public ItemSwordAA(IItemTier tier) { + super(tier, + (int) tier.getAttackDamageBonus(), + tier.getSpeed(), + new Properties() + .addToolType(ToolType.AXE, tier.getLevel()) + .addToolType(ToolType.HOE, tier.getLevel()) + .addToolType(ToolType.SHOVEL, tier.getLevel()) + .addToolType(ToolType.PICKAXE, tier.getLevel()) + .durability(tier.getUses() * 4) + .tab(ActuallyAdditions.GROUP) + ); } /* private final boolean disabled;