Restoring formating
This commit is contained in:
parent
74c43b144e
commit
f2bb2fa66d
1 changed files with 32 additions and 22 deletions
|
@ -29,28 +29,38 @@ public abstract class WarpBlockContainer extends BlockContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME untested
|
// FIXME untested
|
||||||
*
|
/*
|
||||||
* @Override public boolean onBlockActivated(World world, int x, int y, int
|
@Override
|
||||||
* z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
||||||
* if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { return
|
if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {
|
||||||
* false; }
|
return false;
|
||||||
*
|
}
|
||||||
* boolean hasResponse = false; TileEntity te = world.getBlockTileEntity(x,
|
|
||||||
* y, z); if(te != null && te instanceof IUpgradable) { IUpgradable
|
boolean hasResponse = false;
|
||||||
* upgradable = (IUpgradable)te; ItemStack is =
|
TileEntity te = world.getBlockTileEntity(x, y, z);
|
||||||
* player.inventory.getCurrentItem(); if(is != null) { Item i =
|
if (te != null && te instanceof IUpgradable) {
|
||||||
* is.getItem(); if(i instanceof ItemWarpUpgrade) {
|
IUpgradable upgradable = (IUpgradable) te;
|
||||||
* if(upgradable.takeUpgrade
|
ItemStack is = player.inventory.getCurrentItem();
|
||||||
* (EnumUpgradeTypes.values()[is.getItemDamage()],false)) {
|
if (is != null) {
|
||||||
* if(!player.capabilities.isCreativeMode)
|
Item i = is.getItem();
|
||||||
* player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
if (i instanceof ItemWarpUpgrade) {
|
||||||
* player.addChatMessage("Upgrade accepted"); } else {
|
if (upgradable.takeUpgrade(EnumUpgradeTypes.values()[is.getItemDamage()], false)) {
|
||||||
* player.addChatMessage("Upgrade declined"); } hasResponse = true; } } }
|
if (!player.capabilities.isCreativeMode)
|
||||||
*
|
player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||||
* return hasResponse; } /*
|
player.addChatMessage("Upgrade accepted");
|
||||||
*/
|
} else {
|
||||||
|
player.addChatMessage("Upgrade declined");
|
||||||
|
}
|
||||||
|
hasResponse = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hasResponse;
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block b) {
|
public void onNeighborBlockChange(World w, int x, int y, int z, Block b) {
|
||||||
|
|
Loading…
Reference in a new issue