修复武器属性
This commit is contained in:
parent
5c62b01b6c
commit
2a706e94d3
2 changed files with 65 additions and 60 deletions
|
@ -17,8 +17,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
@EventBusSubscriber(bus = EventBusSubscriber.Bus.GAME)
|
@EventBusSubscriber(bus = EventBusSubscriber.Bus.GAME)
|
||||||
public class Hammer extends SwordItem {
|
public class Hammer extends SwordItem {
|
||||||
|
|
||||||
public Hammer() {
|
public static final Tier TIER = new Tier() {
|
||||||
super(new Tier() {
|
|
||||||
public int getUses() {
|
public int getUses() {
|
||||||
return 400;
|
return 400;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +46,10 @@ public class Hammer extends SwordItem {
|
||||||
public @NotNull Ingredient getRepairIngredient() {
|
public @NotNull Ingredient getRepairIngredient() {
|
||||||
return Ingredient.of(new ItemStack(Items.IRON_INGOT));
|
return Ingredient.of(new ItemStack(Items.IRON_INGOT));
|
||||||
}
|
}
|
||||||
}, new Properties());
|
};
|
||||||
|
|
||||||
|
public Hammer() {
|
||||||
|
super(TIER, new Properties().attributes(SwordItem.createAttributes(TIER, 3, -3.2f)).stacksTo(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,8 +11,8 @@ import net.minecraft.world.level.block.Block;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class Knife extends SwordItem {
|
public class Knife extends SwordItem {
|
||||||
public Knife() {
|
|
||||||
super(new Tier() {
|
private static final Tier TIER = new Tier() {
|
||||||
public int getUses() {
|
public int getUses() {
|
||||||
return 1500;
|
return 1500;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,9 @@ public class Knife extends SwordItem {
|
||||||
public @NotNull Ingredient getRepairIngredient() {
|
public @NotNull Ingredient getRepairIngredient() {
|
||||||
return Ingredient.of(new ItemStack(ModItems.STEEL_INGOT.get()));
|
return Ingredient.of(new ItemStack(ModItems.STEEL_INGOT.get()));
|
||||||
}
|
}
|
||||||
}, new Properties());
|
};
|
||||||
|
|
||||||
|
public Knife() {
|
||||||
|
super(TIER, new Properties().attributes(SwordItem.createAttributes(TIER, 3, -1.8f)).stacksTo(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue