Search in sources :

Example 1 with RailcraftContainer

use of mods.railcraft.common.gui.containers.RailcraftContainer in project Railcraft by Railcraft.

the class PacketGuiWidget method readData.

@Override
public void readData(RailcraftInputStream data) throws IOException {
    windowId = data.readByte();
    byte widgetId = data.readByte();
    EntityPlayerSP player = FMLClientHandler.instance().getClient().thePlayer;
    if (player.openContainer instanceof RailcraftContainer && player.openContainer.windowId == windowId) {
        RailcraftContainer railcraftContainer = ((RailcraftContainer) player.openContainer);
        railcraftContainer.getWidgets().get(widgetId).readServerSyncData(data);
    }
}
Also used : RailcraftContainer(mods.railcraft.common.gui.containers.RailcraftContainer) EntityPlayerSP(net.minecraft.client.entity.EntityPlayerSP)

Example 2 with RailcraftContainer

use of mods.railcraft.common.gui.containers.RailcraftContainer in project Railcraft by Railcraft.

the class PacketGuiString method readData.

@Override
public void readData(RailcraftInputStream data) throws IOException {
    windowId = data.readByte();
    dataId = data.readByte();
    str = data.readUTF();
    EntityPlayerSP player = FMLClientHandler.instance().getClient().thePlayer;
    if (player.openContainer instanceof RailcraftContainer && player.openContainer.windowId == windowId)
        ((RailcraftContainer) player.openContainer).updateString(dataId, str);
}
Also used : RailcraftContainer(mods.railcraft.common.gui.containers.RailcraftContainer) EntityPlayerSP(net.minecraft.client.entity.EntityPlayerSP)

Example 3 with RailcraftContainer

use of mods.railcraft.common.gui.containers.RailcraftContainer in project Railcraft by Railcraft.

the class PacketGuiData method readData.

@Override
public void readData(RailcraftInputStream data) throws IOException {
    windowId = data.readByte();
    dataId = data.readByte();
    EntityPlayerSP player = FMLClientHandler.instance().getClient().thePlayer;
    if (player.openContainer instanceof RailcraftContainer && player.openContainer.windowId == windowId)
        ((RailcraftContainer) player.openContainer).updateData(dataId, data);
}
Also used : RailcraftContainer(mods.railcraft.common.gui.containers.RailcraftContainer) EntityPlayerSP(net.minecraft.client.entity.EntityPlayerSP)

Aggregations

RailcraftContainer (mods.railcraft.common.gui.containers.RailcraftContainer)3 EntityPlayerSP (net.minecraft.client.entity.EntityPlayerSP)3