mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
26 lines
1.0 KiB
Diff
26 lines
1.0 KiB
Diff
--- ../src-base/minecraft/net/minecraft/item/ItemSword.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/ItemSword.java
|
|
@@ -18,9 +18,9 @@
|
|
public class ItemSword extends Item
|
|
{
|
|
private final float attackDamage;
|
|
- private final Item.ToolMaterial material;
|
|
+ private final ToolMaterial material;
|
|
|
|
- public ItemSword(Item.ToolMaterial material)
|
|
+ public ItemSword(ToolMaterial material)
|
|
{
|
|
this.material = material;
|
|
this.maxStackSize = 1;
|
|
@@ -88,7 +88,9 @@
|
|
|
|
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
|
|
{
|
|
- return this.material.getRepairItem() == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
|
|
+ ItemStack mat = this.material.getRepairItemStack();
|
|
+ if (!mat.isEmpty() && net.minecraftforge.oredict.OreDictionary.itemMatches(mat, repair, false)) return true;
|
|
+ return super.getIsRepairable(toRepair, repair);
|
|
}
|
|
|
|
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot)
|