mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 04:32:18 +00:00
#1228 Spoon upgrade still not working properly
This commit is contained in:
1 parent
42f98eeca2
commit
804ab19535
2 files changed
+11
-8
No files matched your search
@@ -40,8 +40,6 @@ import crazypants.util.Lang;
|
||||
|
||||
public class ItemDarkSteelPickaxe extends ItemPickaxe implements IEnergyContainerItem, IAdvancedTooltipProvider, IDarkSteelItem, IItemOfTravel {
|
||||
|
||||
private static final Set<Material> SHOVEL_MATS = Sets.newHashSet(new Material[] { Material.clay, Material.craftedSnow, Material.grass, Material.ground, Material.sand, Material.snow });
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player) {
|
||||
if(player == null) {
|
||||
return false;
|
||||
@@ -192,12 +190,6 @@ public class ItemDarkSteelPickaxe extends ItemPickaxe implements IEnergyContaine
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
if(energy > 0 && hasSpoonUpgrade(item)) {
|
||||
if(SHOVEL_MATS.contains(block.getMaterial())) {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
}
|
||||
|
||||
return super.func_150893_a(item, block);
|
||||
}
|
||||
|
||||
@@ -224,6 +216,16 @@ public class ItemDarkSteelPickaxe extends ItemPickaxe implements IEnergyContaine
|
||||
}
|
||||
return super.getDigSpeed(stack, block, meta);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack stack) {
|
||||
Set<String> set = Sets.newHashSet("pickaxe");
|
||||
if (hasSpoonUpgrade(stack)) {
|
||||
set.add("shovel");
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
GameRegistry.registerItem(this, getUnlocalizedName());
|
||||
|
||||
Reference in new issue
Block a user