mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Work on reactor GUI.
Three different screens now because there's so much information. Still need an option on the fuel screen to set the injection rate and a proper button to form the multiblock.
This commit is contained in:
1 parent
e004fdca98
commit
e2913e2520
17 files changed
+831
-98
No files matched your search
@@ -5,6 +5,8 @@ import mekanism.generators.client.gui.GuiHeatGenerator;
|
||||
import mekanism.generators.client.gui.GuiGasGenerator;
|
||||
import mekanism.generators.client.gui.GuiNeutronCapture;
|
||||
import mekanism.generators.client.gui.GuiReactorController;
|
||||
import mekanism.generators.client.gui.GuiReactorFuel;
|
||||
import mekanism.generators.client.gui.GuiReactorHeat;
|
||||
import mekanism.generators.client.gui.GuiSolarGenerator;
|
||||
import mekanism.generators.client.gui.GuiWindTurbine;
|
||||
import mekanism.generators.client.render.RenderAdvancedSolarGenerator;
|
||||
@@ -77,6 +79,10 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy
|
||||
case 10:
|
||||
return new GuiReactorController(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 11:
|
||||
return new GuiReactorHeat(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 12:
|
||||
return new GuiReactorFuel(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 13:
|
||||
return new GuiNeutronCapture(player.inventory, (TileEntityReactorNeutronCapture)tileEntity);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package mekanism.generators.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.gui.GuiElement;
|
||||
import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFuelTab extends GuiElement
|
||||
{
|
||||
TileEntity tileEntity;
|
||||
|
||||
public GuiFuelTab(IGuiWrapper gui, TileEntity tile, ResourceLocation def)
|
||||
{
|
||||
super(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiFuelTab.png"), gui, def);
|
||||
|
||||
tileEntity = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle4i getBounds(int guiWidth, int guiHeight)
|
||||
{
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + 34, 26, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackground(int xAxis, int yAxis, int guiWidth, int guiHeight)
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + 34, 0, 0, 26, 26);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 38 && yAxis <= 56)
|
||||
{
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 38, 26, 0, 18, 18);
|
||||
}
|
||||
else {
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 38, 26, 18, 18, 18);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderForeground(int xAxis, int yAxis)
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 38 && yAxis <= 56)
|
||||
{
|
||||
displayTooltip(MekanismUtils.localize("gui.fuel"), xAxis, yAxis);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preMouseClicked(int xAxis, int yAxis, int button) {}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int xAxis, int yAxis, int button)
|
||||
{
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 38 && yAxis <= 56)
|
||||
{
|
||||
MekanismGenerators.packetHandler.sendToServer(new GeneratorsGuiMessage(Coord4D.get(tileEntity), 12));
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package mekanism.generators.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.gui.GuiElement;
|
||||
import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiHeatTab extends GuiElement
|
||||
{
|
||||
TileEntity tileEntity;
|
||||
|
||||
public GuiHeatTab(IGuiWrapper gui, TileEntity tile, ResourceLocation def)
|
||||
{
|
||||
super(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiHeatTab.png"), gui, def);
|
||||
|
||||
tileEntity = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle4i getBounds(int guiWidth, int guiHeight)
|
||||
{
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + 6, 26, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackground(int xAxis, int yAxis, int guiWidth, int guiHeight)
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + 6, 0, 0, 26, 26);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 10, 26, 0, 18, 18);
|
||||
}
|
||||
else {
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 10, 26, 18, 18, 18);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderForeground(int xAxis, int yAxis)
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
displayTooltip(MekanismUtils.localize("gui.heat"), xAxis, yAxis);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preMouseClicked(int xAxis, int yAxis, int button) {}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int xAxis, int yAxis, int button)
|
||||
{
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
MekanismGenerators.packetHandler.sendToServer(new GeneratorsGuiMessage(Coord4D.get(tileEntity), 11));
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package mekanism.generators.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.ListUtils;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiEnergyInfo;
|
||||
@@ -17,6 +19,9 @@ import mekanism.client.gui.GuiNumberGauge.INumberInfoHandler;
|
||||
import mekanism.client.gui.GuiPowerBar;
|
||||
import mekanism.client.gui.GuiSlot;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.inventory.container.ContainerReactorController;
|
||||
@@ -48,101 +53,10 @@ public class GuiReactorController extends GuiMekanism
|
||||
"Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
"Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t");
|
||||
}
|
||||
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tentity.deuteriumTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 124, 6));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tentity.tritiumTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 124, 36));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tentity.fuelTank;
|
||||
}
|
||||
}, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 144, 6));
|
||||
guiElements.add(new GuiFluidGauge(new IFluidInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public FluidTank getTank()
|
||||
{
|
||||
return tentity.waterTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 78, 46));
|
||||
guiElements.add(new GuiFluidGauge(new IFluidInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public FluidTank getTank()
|
||||
{
|
||||
return tentity.steamTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 98, 46));
|
||||
guiElements.add(new GuiNumberGauge(new INumberInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return BlockStaticLiquid.getLiquidIcon("lava_still");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLevel()
|
||||
{
|
||||
return tileEntity.getPlasmaTemp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxLevel()
|
||||
{
|
||||
return 5E8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(double level)
|
||||
{
|
||||
return "Plasma: " + (int)(level+23) + "C";
|
||||
}
|
||||
}, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall"), 124, 76));
|
||||
guiElements.add(new GuiNumberGauge(new INumberInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return BlockStaticLiquid.getLiquidIcon("lava_still");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLevel()
|
||||
{
|
||||
return tileEntity.getCaseTemp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxLevel()
|
||||
{
|
||||
return 5E8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(double level)
|
||||
{
|
||||
return "Case: " + (int)(level+23) + "C";
|
||||
}
|
||||
}, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 144, 76));
|
||||
guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 164, 15));
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 98, 26));
|
||||
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 79, 38));
|
||||
guiElements.add(new GuiHeatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiFuelTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -164,7 +78,7 @@ public class GuiReactorController extends GuiMekanism
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"));
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int guiWidth = (width - xSize) / 2;
|
||||
int guiHeight = (height - ySize) / 2;
|
||||
@@ -172,4 +86,25 @@ public class GuiReactorController extends GuiMekanism
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int button)
|
||||
{
|
||||
super.mouseClicked(x, y, button);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
int xAxis = (x - (width - xSize) / 2);
|
||||
int yAxis = (y - (height - ySize) / 2);
|
||||
|
||||
if(xAxis >= 48 && xAxis <= 128 && yAxis >= 5 && yAxis <= 17)
|
||||
{
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
|
||||
Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data));
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package mekanism.generators.client.gui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.ListUtils;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiEnergyInfo;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiFluidGauge;
|
||||
import mekanism.client.gui.GuiFluidGauge.IFluidInfoHandler;
|
||||
import mekanism.client.gui.GuiGasGauge;
|
||||
import mekanism.client.gui.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.GuiGauge.Type;
|
||||
import mekanism.client.gui.GuiMekanism;
|
||||
import mekanism.client.gui.GuiNumberGauge;
|
||||
import mekanism.client.gui.GuiNumberGauge.INumberInfoHandler;
|
||||
import mekanism.client.gui.GuiPowerBar;
|
||||
import mekanism.client.gui.GuiProgress;
|
||||
import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.inventory.container.ContainerReactorController;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorController;
|
||||
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiReactorFuel extends GuiMekanism
|
||||
{
|
||||
public TileEntityReactorController tileEntity;
|
||||
|
||||
public GuiReactorFuel(InventoryPlayer inventory, final TileEntityReactorController tentity)
|
||||
{
|
||||
super(new ContainerNull(inventory.player, tentity));
|
||||
tileEntity = tentity;
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public List<String> getInfo()
|
||||
{
|
||||
return ListUtils.asList(
|
||||
"Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
"Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t");
|
||||
}
|
||||
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tentity.deuteriumTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 25, 64));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tentity.fuelTank;
|
||||
}
|
||||
}, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 79, 50));
|
||||
guiElements.add(new GuiGasGauge(new IGasInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public GasTank getTank()
|
||||
{
|
||||
return tentity.tritiumTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 133, 64));
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public double getProgress()
|
||||
{
|
||||
return tileEntity.getActive() ? 1 : 0;
|
||||
}
|
||||
}, ProgressBar.SMALL_RIGHT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 45, 75));
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public double getProgress()
|
||||
{
|
||||
return tileEntity.getActive() ? 1 : 0;
|
||||
}
|
||||
}, ProgressBar.SMALL_LEFT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 99, 75));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 6, 6, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int guiWidth = (width - xSize) / 2;
|
||||
int guiHeight = (height - ySize) / 2;
|
||||
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
package mekanism.generators.client.gui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.ListUtils;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import mekanism.api.gas.GasTank;
|
||||
import mekanism.client.gui.GuiEnergyGauge;
|
||||
import mekanism.client.gui.GuiEnergyGauge.IEnergyInfoHandler;
|
||||
import mekanism.client.gui.GuiEnergyInfo;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiFluidGauge;
|
||||
import mekanism.client.gui.GuiFluidGauge.IFluidInfoHandler;
|
||||
import mekanism.client.gui.GuiGasGauge;
|
||||
import mekanism.client.gui.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.GuiGauge.Type;
|
||||
import mekanism.client.gui.GuiMekanism;
|
||||
import mekanism.client.gui.GuiNumberGauge;
|
||||
import mekanism.client.gui.GuiNumberGauge.INumberInfoHandler;
|
||||
import mekanism.client.gui.GuiPowerBar;
|
||||
import mekanism.client.gui.GuiProgress;
|
||||
import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.GuiSlot;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.inventory.container.ContainerReactorController;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorController;
|
||||
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiReactorHeat extends GuiMekanism
|
||||
{
|
||||
public TileEntityReactorController tileEntity;
|
||||
|
||||
public GuiReactorHeat(InventoryPlayer inventory, final TileEntityReactorController tentity)
|
||||
{
|
||||
super(new ContainerNull(inventory.player, tentity));
|
||||
tileEntity = tentity;
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public List<String> getInfo()
|
||||
{
|
||||
return ListUtils.asList(
|
||||
"Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
"Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t");
|
||||
}
|
||||
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiNumberGauge(new INumberInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return BlockStaticLiquid.getLiquidIcon("lava_still");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLevel()
|
||||
{
|
||||
return tileEntity.getPlasmaTemp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxLevel()
|
||||
{
|
||||
return 5E8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(double level)
|
||||
{
|
||||
return "Plasma: " + (int)(level+23) + "C";
|
||||
}
|
||||
}, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 7, 50));
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public double getProgress()
|
||||
{
|
||||
return tileEntity.getPlasmaTemp() > tileEntity.getCaseTemp() ? 1 : 0;
|
||||
}
|
||||
}, ProgressBar.SMALL_RIGHT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 27, 75));
|
||||
guiElements.add(new GuiNumberGauge(new INumberInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return BlockStaticLiquid.getLiquidIcon("lava_still");
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLevel()
|
||||
{
|
||||
return tileEntity.getCaseTemp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxLevel()
|
||||
{
|
||||
return 5E8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(double level)
|
||||
{
|
||||
return "Case: " + (int)(level+23) + "C";
|
||||
}
|
||||
}, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 61, 50));
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public double getProgress()
|
||||
{
|
||||
return tileEntity.getCaseTemp() > 0 ? 1 : 0;
|
||||
}
|
||||
}, ProgressBar.SMALL_RIGHT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 81, 60));
|
||||
guiElements.add(new GuiProgress(new IProgressInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public double getProgress()
|
||||
{
|
||||
return (tileEntity.getCaseTemp() > 0 && tileEntity.waterTank.getFluidAmount() > 0 && tileEntity.steamTank.getFluidAmount() < tileEntity.steamTank.getCapacity()) ? 1 : 0;
|
||||
}
|
||||
}, ProgressBar.SMALL_RIGHT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 81, 90));
|
||||
guiElements.add(new GuiFluidGauge(new IFluidInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public FluidTank getTank()
|
||||
{
|
||||
return tentity.waterTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 115, 84));
|
||||
guiElements.add(new GuiFluidGauge(new IFluidInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public FluidTank getTank()
|
||||
{
|
||||
return tentity.steamTank;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 151, 84));
|
||||
guiElements.add(new GuiEnergyGauge(new IEnergyInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public IStrictEnergyStorage getEnergyStorage()
|
||||
{
|
||||
return tileEntity;
|
||||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 115, 46));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 6, 6, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int guiWidth = (width - xSize) / 2;
|
||||
int guiHeight = (height - ySize) / 2;
|
||||
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package mekanism.generators.common;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.generators.common.inventory.container.ContainerBioGenerator;
|
||||
import mekanism.generators.common.inventory.container.ContainerHeatGenerator;
|
||||
import mekanism.generators.common.inventory.container.ContainerGasGenerator;
|
||||
@@ -124,6 +125,9 @@ public class GeneratorsCommonProxy
|
||||
case 10:
|
||||
return new ContainerReactorController(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 11:
|
||||
case 12:
|
||||
return new ContainerNull(player, (TileEntityReactorController)tileEntity);
|
||||
case 13:
|
||||
return new ContainerNeutronCapture(player.inventory, (TileEntityReactorNeutronCapture)tileEntity);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
package mekanism.generators.common;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
/**
|
||||
* Mekanism packet handler. As always, use packets sparingly!
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
public class GeneratorsPacketHandler
|
||||
{
|
||||
public SimpleNetworkWrapper netHandler = NetworkRegistry.INSTANCE.newSimpleChannel("MEKGEN");
|
||||
|
||||
public void initialize()
|
||||
{
|
||||
netHandler.registerMessage(PacketGeneratorsGui.class, GeneratorsGuiMessage.class, 0, Side.SERVER);
|
||||
netHandler.registerMessage(PacketGeneratorsGui.class, GeneratorsGuiMessage.class, 0, Side.CLIENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes an Object[] of data into a DataOutputStream.
|
||||
* @param dataValues - an Object[] of data to encode
|
||||
* @param output - the output stream to write to
|
||||
*/
|
||||
public static void encode(Object[] dataValues, ByteBuf output)
|
||||
{
|
||||
try {
|
||||
for(Object data : dataValues)
|
||||
{
|
||||
if(data instanceof Integer)
|
||||
{
|
||||
output.writeInt((Integer)data);
|
||||
}
|
||||
else if(data instanceof Boolean)
|
||||
{
|
||||
output.writeBoolean((Boolean)data);
|
||||
}
|
||||
else if(data instanceof Double)
|
||||
{
|
||||
output.writeDouble((Double)data);
|
||||
}
|
||||
else if(data instanceof Float)
|
||||
{
|
||||
output.writeFloat((Float)data);
|
||||
}
|
||||
else if(data instanceof String)
|
||||
{
|
||||
writeString(output, (String)data);
|
||||
}
|
||||
else if(data instanceof Byte)
|
||||
{
|
||||
output.writeByte((Byte)data);
|
||||
}
|
||||
else if(data instanceof int[])
|
||||
{
|
||||
for(int i : (int[])data)
|
||||
{
|
||||
output.writeInt(i);
|
||||
}
|
||||
}
|
||||
else if(data instanceof byte[])
|
||||
{
|
||||
for(byte b : (byte[])data)
|
||||
{
|
||||
output.writeByte(b);
|
||||
}
|
||||
}
|
||||
else if(data instanceof ArrayList)
|
||||
{
|
||||
encode(((ArrayList)data).toArray(), output);
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
Mekanism.logger.error("Error while encoding packet data.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeString(ByteBuf output, String s)
|
||||
{
|
||||
output.writeInt(s.getBytes().length);
|
||||
output.writeBytes(s.getBytes());
|
||||
}
|
||||
|
||||
public static String readString(ByteBuf input)
|
||||
{
|
||||
return new String(input.readBytes(input.readInt()).array());
|
||||
}
|
||||
|
||||
public static EntityPlayer getPlayer(MessageContext context)
|
||||
{
|
||||
return Mekanism.proxy.getPlayer(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to everyone.
|
||||
* @param message - the message to send
|
||||
*/
|
||||
public void sendToAll(IMessage message)
|
||||
{
|
||||
netHandler.sendToAll(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to the specified player.
|
||||
* @param message - the message to send
|
||||
* @param player - the player to send it to
|
||||
*/
|
||||
public void sendTo(IMessage message, EntityPlayerMP player)
|
||||
{
|
||||
netHandler.sendTo(message, player);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to everyone within a certain range of a point.
|
||||
*
|
||||
* @param message - the message to send
|
||||
* @param point - the TargetPoint around which to send
|
||||
*/
|
||||
public void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point)
|
||||
{
|
||||
netHandler.sendToAllAround(message, point);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to everyone within the supplied dimension.
|
||||
* @param message - the message to send
|
||||
* @param dimensionId - the dimension id to target
|
||||
*/
|
||||
public void sendToDimension(IMessage message, int dimensionId)
|
||||
{
|
||||
netHandler.sendToDimension(message, dimensionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to the server.
|
||||
* @param message - the message to send
|
||||
*/
|
||||
public void sendToServer(IMessage message)
|
||||
{
|
||||
netHandler.sendToServer(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send this message to all players within a defined AABB cuboid.
|
||||
* @param message - the message to send
|
||||
* @param cuboid - the AABB cuboid to send the packet in
|
||||
* @param dimId - the dimension the cuboid is in
|
||||
*/
|
||||
public void sendToCuboid(IMessage message, AxisAlignedBB cuboid, int dimId)
|
||||
{
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
|
||||
if(server != null && cuboid != null)
|
||||
{
|
||||
for(EntityPlayerMP player : (List<EntityPlayerMP>)server.getConfigurationManager().playerEntityList)
|
||||
{
|
||||
if(player.dimension == dimId && cuboid.isVecInside(Vec3.createVectorHelper(player.posX, player.posY, player.posZ)))
|
||||
{
|
||||
sendTo(message, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "8.0.0", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory")
|
||||
public class MekanismGenerators implements IModule
|
||||
{
|
||||
/** Mekanism Generators Packet Pipeline */
|
||||
public static GeneratorsPacketHandler packetHandler = new GeneratorsPacketHandler();
|
||||
|
||||
@SidedProxy(clientSide = "mekanism.generators.client.GeneratorsClientProxy", serverSide = "mekanism.generators.common.GeneratorsCommonProxy")
|
||||
public static GeneratorsCommonProxy proxy;
|
||||
|
||||
@@ -90,6 +93,8 @@ public class MekanismGenerators implements IModule
|
||||
{
|
||||
//Add this module to the core list
|
||||
Mekanism.modulesLoaded.add(this);
|
||||
|
||||
packetHandler.initialize();
|
||||
|
||||
//Set up the GUI handler
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GeneratorsGuiHandler());
|
||||
|
||||
@@ -260,7 +260,7 @@ public class BlockReactor extends BlockContainer
|
||||
CONTROLLER(MekanismGenerators.Reactor, 0, "ReactorController", 10, TileEntityReactorController.class),
|
||||
FRAME(MekanismGenerators.Reactor, 1, "ReactorFrame", -1, TileEntityReactorFrame.class),
|
||||
LASER_FOCUS_MATRIX(MekanismGenerators.Reactor, 2, "ReactorLaserFocusMatrix", -1, TileEntityReactorLaserFocusMatrix.class),
|
||||
NEUTRON_CAPTURE(MekanismGenerators.Reactor, 3, "ReactorNeutronCapturePlate", 11, TileEntityReactorNeutronCapture.class),
|
||||
NEUTRON_CAPTURE(MekanismGenerators.Reactor, 3, "ReactorNeutronCapturePlate", 13, TileEntityReactorNeutronCapture.class),
|
||||
PORT(MekanismGenerators.Reactor, 4, "ReactorInOutPort", -1, TileEntityReactorPort.class),
|
||||
GLASS(MekanismGenerators.ReactorGlass, 0, "ReactorGlass", -1, TileEntityReactorGlass.class);
|
||||
|
||||
|
||||
+9
-1
@@ -18,9 +18,17 @@ public class ContainerReactorController extends Container
|
||||
public ContainerReactorController(InventoryPlayer inventory, TileEntityReactorController tentity)
|
||||
{
|
||||
tileEntity = tentity;
|
||||
addSlotToContainer(new Slot(tentity, 0, 99, 27));
|
||||
addSlotToContainer(new Slot(tentity, 0, 80, 39));
|
||||
int slotX;
|
||||
|
||||
for(slotX = 0; slotX < 3; slotX++)
|
||||
{
|
||||
for(int slotY = 0; slotY < 9; slotY++)
|
||||
{
|
||||
addSlotToContainer(new Slot(inventory, slotY + slotX * 9 + 9, 8 + slotY * 18, 84 + slotX * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(slotX = 0; slotX < 9; ++slotX)
|
||||
{
|
||||
addSlotToContainer(new Slot(inventory, slotX, 8 + slotX * 18, 142));
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
package mekanism.generators.common.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.generators.common.GeneratorsPacketHandler;
|
||||
import mekanism.common.tile.TileEntityBasicBlock;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PacketGeneratorsGui implements IMessageHandler<GeneratorsGuiMessage, IMessage>
|
||||
{
|
||||
@Override
|
||||
public IMessage onMessage(GeneratorsGuiMessage message, MessageContext context)
|
||||
{
|
||||
EntityPlayer player = GeneratorsPacketHandler.getPlayer(context);
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
{
|
||||
World worldServer = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(message.coord4D.dimensionId);
|
||||
|
||||
if(worldServer != null && message.coord4D.getTileEntity(worldServer) instanceof TileEntityBasicBlock)
|
||||
{
|
||||
if(message.guiId == -1)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
GeneratorsGuiMessage.openServerGui(message.guiId, (EntityPlayerMP)player, player.worldObj, message.coord4D);
|
||||
}
|
||||
}
|
||||
else {
|
||||
FMLCommonHandler.instance().showGuiScreen(GeneratorsGuiMessage.getGui(message.guiId, player, player.worldObj, message.coord4D));
|
||||
player.openContainer.windowId = message.windowId;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class GeneratorsGuiMessage implements IMessage
|
||||
{
|
||||
public Coord4D coord4D;
|
||||
|
||||
public int guiId;
|
||||
|
||||
public int windowId;
|
||||
|
||||
public GeneratorsGuiMessage() {}
|
||||
|
||||
public GeneratorsGuiMessage(Coord4D coord, int gui)
|
||||
{
|
||||
coord4D = coord;
|
||||
guiId = gui;
|
||||
}
|
||||
|
||||
public GeneratorsGuiMessage(Coord4D coord, int gui, int id)
|
||||
{
|
||||
this(coord, gui);
|
||||
windowId = id;
|
||||
}
|
||||
|
||||
public static void openServerGui(int id, EntityPlayerMP playerMP, World world, Coord4D obj)
|
||||
{
|
||||
playerMP.closeContainer();
|
||||
playerMP.getNextWindowId();
|
||||
|
||||
int window = playerMP.currentWindowId;
|
||||
|
||||
MekanismGenerators.packetHandler.sendTo(new GeneratorsGuiMessage(obj, id, window), playerMP);
|
||||
|
||||
playerMP.openContainer = MekanismGenerators.proxy.getServerGui(id, playerMP, world, obj.xCoord, obj.yCoord, obj.zCoord);
|
||||
playerMP.openContainer.windowId = window;
|
||||
playerMP.openContainer.addCraftingToCrafters(playerMP);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static GuiScreen getGui(int id, EntityPlayer player, World world, Coord4D obj)
|
||||
{
|
||||
return (GuiScreen)MekanismGenerators.proxy.getClientGui(id, player, world, obj.xCoord, obj.yCoord, obj.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
|
||||
dataStream.writeInt(guiId);
|
||||
dataStream.writeInt(windowId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
|
||||
guiId = dataStream.readInt();
|
||||
windowId = dataStream.readInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -109,7 +109,20 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf dataStream)
|
||||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
int type = dataStream.readInt();
|
||||
|
||||
if(type == 0)
|
||||
{
|
||||
formMultiblock();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
super.handlePacketData(dataStream);
|
||||
|
||||
boolean formed = dataStream.readBoolean();
|
||||
if(formed)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user