work on the gui list
This commit is contained in:
parent
2bed98e6f0
commit
70fb58f704
4 changed files with 239 additions and 11 deletions
|
@ -7,9 +7,11 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.iesu.IDSUManager;
|
||||
import techreborn.tiles.iesu.TileIDSU;
|
||||
|
||||
|
@ -57,15 +59,12 @@ public class BlockIDSU extends BlockMachineBase {
|
|||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitx, float hity, float hitz) {
|
||||
if(world.isRemote){
|
||||
return true;
|
||||
}
|
||||
if(player.isSneaking()){
|
||||
player.addChatComponentMessage(new ChatComponentText(IDSUManager.INSTANCE.getSaveDataForWorld(world, 0).getStoredPower() + " eu"));
|
||||
} else {
|
||||
IDSUManager.INSTANCE.getSaveDataForWorld(world, 0).addEnergy(150);
|
||||
}
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.idsuID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue