Fixes #226
This commit is contained in:
parent
269c97497f
commit
2c56961289
2 changed files with 7 additions and 12 deletions
|
@ -15,6 +15,7 @@ import techreborn.client.multiblock.MultiblockSet;
|
|||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.Location;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.partSystem.fmp.PacketFMPPlacePart;
|
||||
import techreborn.proxies.ClientProxy;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
|
||||
|
@ -45,6 +46,9 @@ public class GuiBlastFurnace extends GuiContainer {
|
|||
ChunkCoordinates coordinates = new ChunkCoordinates(blastfurnace.xCoord - (ForgeDirection.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (ForgeDirection.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
|
||||
if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor) && blastfurnace.getHeat() != 0){
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
button.displayString = "B";
|
||||
} else {
|
||||
button.displayString = "A";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,6 +123,7 @@ public class GuiBlastFurnace extends GuiContainer {
|
|||
multiblock.addComponent(1, 2, -1, ModBlocks.MachineCasing, 0);
|
||||
multiblock.addComponent(1, 2, 1, ModBlocks.MachineCasing, 0);
|
||||
|
||||
multiblock.addComponent(0, 3, 0, ModBlocks.MachineCasing, 0);
|
||||
multiblock.addComponent(1, 3, 0, ModBlocks.MachineCasing, 0);
|
||||
multiblock.addComponent(0, 3, 1, ModBlocks.MachineCasing, 0);
|
||||
multiblock.addComponent(-1, 3, 0, ModBlocks.MachineCasing, 0);
|
||||
|
|
|
@ -38,7 +38,6 @@ import techreborn.client.multiblock.component.MultiblockComponent;
|
|||
import techreborn.lib.Location;
|
||||
|
||||
public class MultiblockRenderEvent {
|
||||
public static boolean rendering = false;
|
||||
|
||||
private static RenderBlocks blockRender = RenderBlocks.getInstance();
|
||||
public MultiblockSet currentMultiblock;
|
||||
|
@ -77,18 +76,9 @@ public class MultiblockRenderEvent {
|
|||
int anchorY = anchor != null ? anchor.posY +1 : src.blockY + 1;
|
||||
int anchorZ = anchor != null ? anchor.posZ : src.blockZ;
|
||||
|
||||
rendering = true;
|
||||
Multiblock mb =currentMultiblock.getForEntity(player);
|
||||
boolean didAny = false;
|
||||
for(MultiblockComponent comp : mb.getComponents())
|
||||
if(renderComponent(player.worldObj, mb, comp, anchorX, anchorY, anchorZ))
|
||||
didAny = true;
|
||||
rendering = false;
|
||||
|
||||
if(!didAny) {
|
||||
setMultiblock(null);
|
||||
player.addChatComponentMessage(new ChatComponentText("Structure Complete!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN)));
|
||||
}
|
||||
renderComponent(player.worldObj, mb, comp, anchorX, anchorY, anchorZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue