mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Elementium Tools now repair with Elementium (#2656)
* Elementium Tools now repair with Elementium * Add proper parameter names * Revert changes to armor, as I did not change it in the first place
This commit is contained in:
1 parent
ba245a1499
commit
483a816616
5 files changed
+34
No files matched your search
+6
@@ -21,6 +21,7 @@ import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelAxe;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
@@ -63,4 +64,9 @@ public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
event.getDrops().add(entityitem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack toRepair, @Nonnull ItemStack repairBy) {
|
||||
return repairBy.getItem() == ModItems.manaResource && repairBy.getItemDamage() == 7 ? true : super.getIsRepairable(toRepair, repairBy);
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -12,6 +12,8 @@ import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelPick;
|
||||
import vazkii.botania.common.item.equipment.tool.terrasteel.ItemTerraPick;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemElementiumPick extends ItemManasteelPick {
|
||||
|
||||
public ItemElementiumPick() {
|
||||
@@ -54,4 +56,9 @@ public class ItemElementiumPick extends ItemManasteelPick {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack toRepair, @Nonnull ItemStack repairBy) {
|
||||
return repairBy.getItem() == ModItems.manaResource && repairBy.getItemDamage() == 7 ? true : super.getIsRepairable(toRepair, repairBy);
|
||||
}
|
||||
}
|
||||
+6
@@ -16,6 +16,7 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelShears;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
@@ -76,4 +77,9 @@ public class ItemElementiumShears extends ItemManasteelShears {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack toRepair, @Nonnull ItemStack repairBy) {
|
||||
return repairBy.getItem() == ModItems.manaResource && repairBy.getItemDamage() == 7 ? true : super.getIsRepairable(toRepair, repairBy);
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -12,10 +12,12 @@ import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelShovel;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -48,4 +50,9 @@ public class ItemElementiumShovel extends ItemManasteelShovel {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack toRepair, @Nonnull ItemStack repairBy) {
|
||||
return repairBy.getItem() == ModItems.manaResource && repairBy.getItemDamage() == 7 ? true : super.getIsRepairable(toRepair, repairBy);
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -3,9 +3,12 @@ package vazkii.botania.common.item.equipment.tool.elementium;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.item.IPixieSpawner;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelSword;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemElementiumSword extends ItemManasteelSword implements IPixieSpawner {
|
||||
|
||||
public ItemElementiumSword() {
|
||||
@@ -17,4 +20,9 @@ public class ItemElementiumSword extends ItemManasteelSword implements IPixieSpa
|
||||
return 0.05F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack toRepair, @Nonnull ItemStack repairBy) {
|
||||
return repairBy.getItem() == ModItems.manaResource && repairBy.getItemDamage() == 7 ? true : super.getIsRepairable(toRepair, repairBy);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user