Created
December 3, 2014 12:21
-
-
Save Keridos/e4ea84930d839f2d3b1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Optional.Method(modid = "CoFHAPI|tool") | |
@Override | |
public ArrayList<ItemStack> dismantleBlock(EntityPlayer player, World world, int x, int y, int z, boolean a){ | |
if (!player.isSneaking()) { | |
((TileEntityElectricFloodlight) world.getTileEntity(x, y, z)).changeMode(player); | |
return null; | |
} else { | |
ArrayList<ItemStack> result = new ArrayList<ItemStack>(1); | |
result.add(new ItemStack(Item.getItemFromBlock(ModBlocks.blockElectricLight))); | |
world.setBlock(x,y,z, Blocks.air); | |
return result; | |
} | |
} | |
@Optional.Method(modid = "CoFHAPI|tool") | |
@Override | |
public boolean canDismantle(EntityPlayer entityPlayer, World world, int i, int i2, int i3) { | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment