parent
4f8bfcb2df
commit
32785e4f5b
3 changed files with 45 additions and 43 deletions
|
@ -69,7 +69,7 @@ public class GuiBlastFurnace extends GuiContainer {
|
||||||
int l = (this.height - this.ySize) / 2;
|
int l = (this.height - this.ySize) / 2;
|
||||||
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
|
||||||
|
|
||||||
if (hasMultiBlock) {
|
if (containerBlastFurnace.heat == 0) {
|
||||||
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
GuiUtil.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
|
||||||
this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
|
this.fontRendererObj.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
|
||||||
l + 52 + 12 - 0, -1);
|
l + 52 + 12 - 0, -1);
|
||||||
|
@ -147,10 +147,6 @@ public class GuiBlastFurnace extends GuiContainer {
|
||||||
addComponent(1, 3, -1, ModBlocks.machineCasing.getDefaultState(), multiblock);
|
addComponent(1, 3, -1, ModBlocks.machineCasing.getDefaultState(), multiblock);
|
||||||
addComponent(1, 3, 1, ModBlocks.machineCasing.getDefaultState(), multiblock);
|
addComponent(1, 3, 1, ModBlocks.machineCasing.getDefaultState(), multiblock);
|
||||||
|
|
||||||
addComponent(1, 4, 0, ModBlocks.LESUStorage.getDefaultState(), multiblock);
|
|
||||||
addComponent(1, 4, 1, ModBlocks.LESU.getDefaultState(), multiblock);
|
|
||||||
addComponent(1, 4, 2, ModBlocks.alloyFurnace.getDefaultState(), multiblock);
|
|
||||||
|
|
||||||
MultiblockSet set = new MultiblockSet(multiblock);
|
MultiblockSet set = new MultiblockSet(multiblock);
|
||||||
ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
||||||
ClientProxy.multiblockRenderEvent.parent = new Location(blastfurnace.getPos().getX(),
|
ClientProxy.multiblockRenderEvent.parent = new Location(blastfurnace.getPos().getX(),
|
||||||
|
|
|
@ -4,10 +4,17 @@ import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.translation.I18n;
|
import net.minecraft.util.text.translation.I18n;
|
||||||
|
import reborncore.client.multiblock.MultiblockSet;
|
||||||
|
import reborncore.common.misc.Location;
|
||||||
|
import reborncore.common.multiblock.CoordTriplet;
|
||||||
import reborncore.common.powerSystem.PowerSystem;
|
import reborncore.common.powerSystem.PowerSystem;
|
||||||
|
import techreborn.client.ClientMultiBlocks;
|
||||||
import techreborn.client.container.ContainerFusionReactor;
|
import techreborn.client.container.ContainerFusionReactor;
|
||||||
|
import techreborn.proxies.ClientProxy;
|
||||||
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -46,23 +53,23 @@ public class GuiFusionReactor extends GuiContainer {
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
int k = (this.width - this.xSize) / 2;
|
int k = (this.width - this.xSize) / 2;
|
||||||
int l = (this.height - this.ySize) / 2;
|
int l = (this.height - this.ySize) / 2;
|
||||||
// GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20,
|
GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20,
|
||||||
// 20, "");
|
20, "");
|
||||||
// buttonList.add(button);
|
buttonList.add(button);
|
||||||
super.initGui();
|
super.initGui();
|
||||||
// CoordTriplet coordinates = new
|
BlockPos coordinates = new
|
||||||
// CoordTriplet(fusionController.getPos().getX() -
|
BlockPos(fusionController.getPos().getX() -
|
||||||
// (EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetX()
|
(EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetX()
|
||||||
// * 2), fusionController.getPos().getY() - 1,
|
* 2), fusionController.getPos().getY() - 1,
|
||||||
// fusionController.getPos().getZ() -
|
fusionController.getPos().getZ() -
|
||||||
// (EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetZ()
|
(EnumFacing.getFront(fusionController.getFacingInt()).getFrontOffsetZ()
|
||||||
// * 2));
|
* 2));
|
||||||
// if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
|
if (coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)) {
|
||||||
// ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
// button.displayString = "B";
|
button.displayString = "B";
|
||||||
// } else {
|
} else {
|
||||||
// button.displayString = "A";
|
button.displayString = "A";
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -89,26 +96,25 @@ public class GuiFusionReactor extends GuiContainer {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(GuiButton button) throws IOException {
|
public void actionPerformed(GuiButton button) throws IOException {
|
||||||
super.actionPerformed(button);
|
super.actionPerformed(button);
|
||||||
// if(button.id == 212){
|
if (button.id == 212) {
|
||||||
// if(ClientProxy.multiblockRenderEvent.currentMultiblock == null){
|
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
|
||||||
// {//This code here makes a basic multiblock and then sets to the
|
//This code here makes a basic multiblock and then sets to theselected one.
|
||||||
// selected one.
|
MultiblockSet set = new MultiblockSet(ClientMultiBlocks.reactor);
|
||||||
// MultiblockSet set = new MultiblockSet(ClientMultiBlocks.reactor);
|
ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
||||||
// ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
ClientProxy.multiblockRenderEvent.parent = new
|
||||||
// ClientProxy.multiblockRenderEvent.partent = new
|
Location(fusionController.getPos().getX(),
|
||||||
// Location(fusionController.getPos().getX(),
|
fusionController.getPos().getY(), fusionController.getPos().getZ(),
|
||||||
// fusionController.getPos().getY(), fusionController.getPos().getZ(),
|
fusionController.getWorld());
|
||||||
// fusionController.getWorld());
|
ClientProxy.multiblockRenderEvent.anchor = new
|
||||||
// ClientProxy.multiblockRenderEvent.anchor = new
|
BlockPos(fusionController.getPos().getX(),
|
||||||
// CoordTriplet(fusionController.getPos().getX() ,
|
fusionController.getPos().getY() - 1,
|
||||||
// fusionController.getPos().getY() -1 ,
|
fusionController.getPos().getZ());
|
||||||
// fusionController.getPos().getZ());
|
|
||||||
// }
|
button.displayString = "A";
|
||||||
// button.displayString = "A";
|
} else {
|
||||||
// } else {
|
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||||
// ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
button.displayString = "B";
|
||||||
// button.displayString = "B";
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class ClientProxy extends CommonProxy {
|
||||||
//MinecraftForge.EVENT_BUS.register(new VersionCheckerClient());
|
//MinecraftForge.EVENT_BUS.register(new VersionCheckerClient());
|
||||||
MinecraftForge.EVENT_BUS.register(new StackToolTipEvent());
|
MinecraftForge.EVENT_BUS.register(new StackToolTipEvent());
|
||||||
multiblockRenderEvent = new MultiblockRenderEvent();
|
multiblockRenderEvent = new MultiblockRenderEvent();
|
||||||
// MinecraftForge.EVENT_BUS.register(multiblockRenderEvent);
|
MinecraftForge.EVENT_BUS.register(multiblockRenderEvent);
|
||||||
// TODO FIX ME
|
// TODO FIX ME
|
||||||
ClientRegistry.registerKeyBinding(KeyBindings.config);
|
ClientRegistry.registerKeyBinding(KeyBindings.config);
|
||||||
ClientMultiBlocks.init();
|
ClientMultiBlocks.init();
|
||||||
|
|
Loading…
Reference in a new issue