use of ivorius.reccomplex.gui.table.TableDelegate in project RecurrentComplex by Ivorforce.
the class PacketWorldDataHandler method processClient.
@SideOnly(Side.CLIENT)
@Override
public void processClient(PacketWorldData message, MessageContext ctx) {
GuiScreen screen = Minecraft.getMinecraft().currentScreen;
if (!(screen instanceof TableNavigator))
throw new RuntimeException();
TableDataSource dataSource = ((TableNavigator) screen).currentTable().getDataSource();
if (!(dataSource instanceof TableDataSourceWorldScriptHolder))
throw new RuntimeException();
WorldScriptHolder script = ((TableDataSourceWorldScriptHolder) dataSource).script;
script.worldData = message.worldData;
// From now this MUST be lower corner
script.origin = new BlockArea(message.capturePoint1, message.capturePoint2).getLowerCorner();
if (screen instanceof TableDelegate)
((TableDelegate) screen).reloadData();
}
Aggregations