Created
November 28, 2014 14:59
-
-
Save Keridos/eb4325b8696ca53e1359 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
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float p_149727_7_, float p_149727_8_, float p_149727_9_) { | |
if (player.getHeldItem() == null && !world.isRemote && player.isSneaking()) { | |
((TileEntityElectricFloodlight) world.getTileEntity(x, y, z)).toggleInverted(); | |
boolean b = ((TileEntityElectricFloodlight) world.getTileEntity(x, y, z)).getInverted(); | |
player.addChatMessage(new ChatComponentText("Light now: " + (b ? "inverted" : "not inverted"))); | |
} else if (player.getHeldItem() != null && !world.isRemote && player.isSneaking()) { | |
Logger.getGlobal().info("poke, found item") ; | |
if (player.getHeldItem().getItem() == getMinecraftItem("stick")) { | |
((TileEntityElectricFloodlight) world.getTileEntity(x, y, z)).changeMode(player); | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment