I read this also in other thread, but as I said: I'm new with proxies and stuff. I'm sorry, I know this is basic knowledge, but could anyone pls describe how I call stuff server-only.
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote){
player.openGui(AllTimesPhysics.instance, AllTimesPhysics.steamEngineGuiId, world, x, y, z);
}
return true;
}
Hello!
I'm working on a technic mod and I want to have a steam engine, that produces power. Therefor I have a Gui + Container. Everything works fine, but I can't move the items in the container. They always jump back again. Also the getServerGuiElement in my GuiHandler is never called. I don't know much about proxys so the error might be proxy-related
The GuiHandler
The TileEntity
The Container
I also have a gui, the block itself which opens the gui with: player.openGui(AllTimesPhysics.instance, AllTimesPhysics.steamEngineGuiId, world, x, y, z);
In my mainclass i have:
public static final int steamEngineGuiId = 10;
GameRegistry.registerBlock(steamEngine, "SteamEngine");
GameRegistry.registerTileEntity(SteamEngineTileEntity.class, "SteamEngine");
steamEngine = new SteamEngine(Material.rock);
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
If there is anything else needed, i'll post it!