This commit is contained in:
Flanks255 2021-11-21 14:18:00 -06:00
parent eb3072bcbe
commit ac3551061d
4 changed files with 74 additions and 22 deletions

View file

@ -10,18 +10,30 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import com.google.common.collect.ImmutableSet;
import net.minecraft.block.Block; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.item.IItemTier; import net.minecraft.item.IItemTier;
import net.minecraft.item.Item; import net.minecraft.item.ToolItem;
import net.minecraft.item.ItemStack; import net.minecraftforge.common.ToolType;
import net.minecraft.tags.ITag;
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 { this.tier = tier;
public ItemAxeAA(float p_i48512_1_, float p_i48512_2_, IItemTier p_i48512_3_, Set<Block> p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, ITag<Item> repairTag) {
super(p_i48512_1_, p_i48512_2_, p_i48512_3_, p_i48512_4_, p_i48512_5_, name, repairItem, repairTag);
} }
/* /*

View file

@ -10,18 +10,30 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import com.google.common.collect.ImmutableSet;
import net.minecraft.block.Block; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.item.IItemTier; import net.minecraft.item.IItemTier;
import net.minecraft.item.Item; import net.minecraft.item.ToolItem;
import net.minecraft.item.ItemStack; import net.minecraftforge.common.ToolType;
import net.minecraft.tags.ITag;
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 { this.tier = tier;
public ItemPickaxeAA(float p_i48512_1_, float p_i48512_2_, IItemTier p_i48512_3_, Set<Block> p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, ITag<Item> repairTag) {
super(p_i48512_1_, p_i48512_2_, p_i48512_3_, p_i48512_4_, p_i48512_5_, name, repairItem, repairTag);
} }
/* /*

View file

@ -10,12 +10,27 @@
package de.ellpeck.actuallyadditions.mod.items.base; package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.item.HoeItem; import net.minecraft.item.HoeItem;
import net.minecraft.item.IItemTier; import net.minecraft.item.IItemTier;
import net.minecraftforge.common.ToolType;
public class ItemHoeAA extends HoeItem { public class ItemHoeAA extends HoeItem {
public ItemHoeAA(IItemTier p_i231595_1_, int p_i231595_2_, float p_i231595_3_, Properties p_i231595_4_) { private IItemTier tier;
super(p_i231595_1_, p_i231595_2_, p_i231595_3_, p_i231595_4_); 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; /* private final ItemStack repairItem;

View file

@ -10,12 +10,25 @@
package de.ellpeck.actuallyadditions.mod.items.base; package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.item.IItemTier; import net.minecraft.item.IItemTier;
import net.minecraft.item.SwordItem; import net.minecraft.item.SwordItem;
import net.minecraftforge.common.ToolType;
public class ItemSwordAA extends SwordItem { public class ItemSwordAA extends SwordItem {
public ItemSwordAA(IItemTier p_i48460_1_, int p_i48460_2_, float p_i48460_3_, Properties p_i48460_4_) { private IItemTier tier;
super(p_i48460_1_, p_i48460_2_, p_i48460_3_, p_i48460_4_); 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; /* private final boolean disabled;