another possible workaround for chisel duality

This commit is contained in:
MachineMuse 2015-08-29 11:04:13 -06:00
parent 9763cd546b
commit 67d5a23010
3 changed files with 26 additions and 9 deletions

View file

@ -0,0 +1,12 @@
package net.machinemuse.powersuits.powermodule.tool;
import net.minecraft.item.Item;
/**
* Created by Claire on 8/29/2015.
*/
public class ChiselGetter1 {
public static Item getChisel() {
return com.cricketcraft.chisel.init.ChiselItems.obsidianChisel;
}
}

View file

@ -0,0 +1,12 @@
package net.machinemuse.powersuits.powermodule.tool;
import net.minecraft.item.Item;
/**
* Created by Claire on 8/29/2015.
*/
public class ChiselGetter2 {
public static Item getChisel() {
return team.chisel.init.ChiselItems.obsidianChisel;
}
}

View file

@ -38,22 +38,15 @@ public class ChiselModule extends PowerModuleBase implements IBlockBreakingModul
addTradeoffProperty("Overclock", CHISEL_HARVEST_SPEED, 22);
try {
ITEM_CHISEL = getOldChisel();
ITEM_CHISEL = ChiselGetter1.getChisel();
} catch (Exception e) {
try {
ITEM_CHISEL = getNewChisel();
ITEM_CHISEL = ChiselGetter2.getChisel();
} catch (Exception f) {
MuseLogger.logException("Couldn't get Chisel reference item", f);
}
}
}
private Item getOldChisel() {
return com.cricketcraft.chisel.init.ChiselItems.obsidianChisel;
}
private Item getNewChisel() {
return team.chisel.init.ChiselItems.obsidianChisel;
}
@Override
public String getCategory() {