@Override
public void onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
double energyConsumed = ModuleManager.computeModularProperty(itemStack, HOE_ENERGY_CONSUMPTION);
if (player.canPlayerEdit(x, y, z, side, itemStack) && ElectricItemUtils.getPlayerEnergy(player) > energyConsumed) {
UseHoeEvent event = new UseHoeEvent(player, itemStack, world, x, y, z);
if (MinecraftForge.EVENT_BUS.post(event)) {
return;
}
if (event.getResult() == Event.Result.ALLOW) {
ElectricItemUtils.drainPlayerEnergy(player, energyConsumed);
return;
}
if (world.isRemote) {