it compiles :D

This commit is contained in:
modmuss50 2019-06-12 19:29:04 +01:00
parent 500ff29dbd
commit 6b9f6cb4f8
142 changed files with 755 additions and 1724 deletions

View file

@ -25,7 +25,7 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.builder.widget.GuiButtonExtended;
@ -72,15 +72,13 @@ public class GuiAESU extends GuiBase {
builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
buttons.add(new GuiButtonUpDown(300, 121, 79, this, layer).clickHandler(this::onClick));
buttons.add(new GuiButtonUpDown(301, 121 + 12, 79, this, layer).clickHandler(this::onClick));
buttons.add(new GuiButtonUpDown(302, 121 + 24, 79, this, layer).clickHandler(this::onClick));
buttons.add(new GuiButtonUpDown(303, 121 + 36, 79, this, layer).clickHandler(this::onClick));
buttons.add(new GuiButtonUpDown(121, 79, this, layer, this::onClick));
buttons.add(new GuiButtonUpDown(121 + 12, 79, this, layer, this::onClick));
buttons.add(new GuiButtonUpDown(121 + 24, 79, this, layer, this::onClick));
buttons.add(new GuiButtonUpDown(121 + 36, 79, this, layer, this::onClick));
}
public void onClick(GuiButtonExtended button, Double x, Double y){
if (button.id >= 300 && button.id <= 303) {
NetworkManager.sendToServer(ServerboundPackets.createPacketAesu(button.id, tile));
}
public void onClick(ButtonWidget button){
NetworkManager.sendToServer(ServerboundPackets.createPacketAesu(1, tile));
}
}

View file

@ -28,6 +28,7 @@ import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.util.Identifier;
import techreborn.tiles.machine.iron.TileIronAlloyFurnace;
@ -39,7 +40,7 @@ public class GuiAlloyFurnace extends AbstractContainerScreen {
TileIronAlloyFurnace alloyfurnace;
public GuiAlloyFurnace(final PlayerEntity player, final TileIronAlloyFurnace alloyFurnace) {
super(alloyFurnace.createContainer(player));
super(alloyFurnace.createContainer(player), player.inventory, new TextComponent("techreborn.alloy_furnace"));
this.containerWidth = 176;
this.containerHeight = 167;
this.alloyfurnace = alloyFurnace;
@ -47,7 +48,7 @@ public class GuiAlloyFurnace extends AbstractContainerScreen {
@Override
protected void drawBackground(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
this.drawDefaultBackground();
this.renderBackground();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.minecraft.getTextureManager().bindTexture(GuiAlloyFurnace.texture);
final int k = (this.width - this.containerWidth) / 2;

View file

@ -25,8 +25,8 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GuiLighting;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.recipe.Recipe;
@ -54,21 +54,7 @@ public class GuiAutoCrafting extends GuiBase {
}
public void renderItemStack(ItemStack stack, int x, int y) {
if (stack != EMPTY) {
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GuiLighting.enableForItems();
itemRenderer.renderGuiItem(stack, x, y);
GlStateManager.disableLighting();
GlStateManager.pushMatrix();
GlStateManager.disableDepthTest();
GlStateManager.color4f(1, 1, 1, 1F / 3F);
drawRect(x - 4, y- 4, x + 20, y + 20, -2139062144);
GlStateManager.enableDepthTest();
GlStateManager.color4f(1F, 1F, 1F, 1F);
GlStateManager.enableBlend();
GlStateManager.popMatrix();
}
MinecraftClient.getInstance().getItemRenderer().renderGuiItem(stack, x, y);
}
@Override
@ -95,7 +81,7 @@ public class GuiAutoCrafting extends GuiBase {
}
drawOutputSlot(145, 42, layer);
drawOutputSlot(95, 42, layer);
draw("Inventory", 8, 82, 4210752, layer);
drawString("Inventory", 8, 82, 4210752, layer);
builder.drawLockButton(this, 145, 4, mouseX, mouseY, layer, tileAutoCraftingTable.locked);
}

View file

@ -25,7 +25,6 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem;

View file

@ -24,8 +24,8 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
@ -50,8 +50,8 @@ public class GuiBlastFurnace extends GuiBase {
}
@Override
public void initGui() {
super.initGui();
public void init() {
super.init();
this.hasMultiBlock = this.tile.getCachedHeat() != 0;
ClientProxy.multiblockRenderEvent.setMultiblock(null);
}
@ -96,7 +96,7 @@ public class GuiBlastFurnace extends GuiBase {
}
public void onClick(GuiButtonExtended button, Double x, Double y){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -25,12 +25,11 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.gui.ContainerScreen;
import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.util.Identifier;
import reborncore.client.gui.builder.widget.GuiButtonSimple;
import techreborn.tiles.machine.tier3.TileChunkLoader;
@ -46,7 +45,7 @@ public class GuiChunkLoader extends AbstractContainerScreen {
private ButtonWidget minusTenButton;
public GuiChunkLoader(final PlayerEntity player, final TileChunkLoader chunkLoader) {
super(chunkLoader.createContainer(player));
super(chunkLoader.createContainer(player), player.inventory, new TextComponent("techreborn.chunkloader"));
this.containerWidth = 176;
this.containerHeight = 167;
this.chunkloader = chunkLoader;
@ -57,11 +56,11 @@ public class GuiChunkLoader extends AbstractContainerScreen {
super.init();
this.left = this.width / 2 - this.containerWidth / 2;
this.top = this.height / 2 - this.containerHeight / 2;
this.plusOneButton = new GuiButtonSimple(0, this.left + 5, this.top + 37, 40, 20, "+1");
this.plusTenButton = new GuiButtonSimple(0, this.left + 45, this.top + 37, 40, 20, "+10");
this.plusOneButton = new GuiButtonSimple(this.left + 5, this.top + 37, 40, 20, "+1", buttonWidget -> {});
this.plusTenButton = new GuiButtonSimple(this.left + 45, this.top + 37, 40, 20, "+10", buttonWidget -> {});
this.minusOneButton = new GuiButtonSimple(0, this.left + 90, this.top + 37, 40, 20, "-1");
this.minusTenButton = new GuiButtonSimple(0, this.left + 130, this.top + 37, 40, 20, "-10");
this.minusOneButton = new GuiButtonSimple(this.left + 90, this.top + 37, 40, 20, "-1", buttonWidget -> {});
this.minusTenButton = new GuiButtonSimple(this.left + 130, this.top + 37, 40, 20, "-10", buttonWidget -> {});
this.buttons.add(this.plusOneButton);
this.buttons.add(this.plusTenButton);
@ -71,7 +70,7 @@ public class GuiChunkLoader extends AbstractContainerScreen {
@Override
protected void drawBackground(final float p_146976_1_, final int p_146976_2_, final int p_146976_3_) {
this.drawDefaultBackground();
this.renderBackground();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
minecraft.getTextureManager().bindTexture(GuiChunkLoader.texture);
final int k = (this.width - this.containerWidth) / 2;

View file

@ -24,11 +24,12 @@
package techreborn.client.gui;
import net.minecraft.client.gui.ContainerScreen;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.AbstractContainerScreen;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.container.Container;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.util.Identifier;
public class GuiDestructoPack extends AbstractContainerScreen {
@ -37,16 +38,16 @@ public class GuiDestructoPack extends AbstractContainerScreen {
"textures/gui/destructopack.png");
public GuiDestructoPack(Container container) {
super(container);
super(container, MinecraftClient.getInstance().player.inventory, new TextComponent("techreborn.destructopack"));
this.containerWidth = 176;
this.containerHeight = 166;
}
@Override
protected void drawBackground(float arg0, int arg1, int arg2) {
this.drawDefaultBackground();
this.renderBackground();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(texture);
this.minecraft.getTextureManager().bindTexture(texture);
blit(left, top, 0, 0, 176, 166);
}

View file

@ -24,9 +24,9 @@
package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.tiles.generator.advanced.TileDieselGenerator;

View file

@ -26,7 +26,6 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
@ -38,20 +37,20 @@ import reborncore.client.multiblock.Multiblock;
import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileEnvTypeillationTower;
import techreborn.tiles.machine.multiblock.TileDistillationTower;
public class GuiEnvTypeillationTower extends GuiBase {
public class GuiDistillationTower extends GuiBase {
public TileEnvTypeillationTower tile;
public TileDistillationTower tile;
public GuiEnvTypeillationTower(final PlayerEntity player, final TileEnvTypeillationTower tile) {
public GuiDistillationTower(final PlayerEntity player, final TileDistillationTower tile) {
super(player, tile, tile.createContainer(player));
this.tile = tile;
}
@Override
public void initGui() {
super.initGui();
public void init() {
super.init();
ClientProxy.multiblockRenderEvent.setMultiblock(null);
}
@ -91,7 +90,7 @@ public class GuiEnvTypeillationTower extends GuiBase {
}
public void onClick(GuiButtonExtended button, Double x, Double y){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -100,7 +100,7 @@ public class GuiFluidReplicator extends GuiBase {
// GuiScreen
public void onClick(GuiButtonExtended button, Double x, Double y){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -25,6 +25,7 @@
package techreborn.client.gui;
import net.minecraft.block.BlockState;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import org.apache.commons.lang3.tuple.Pair;
@ -79,14 +80,14 @@ public class GuiFusionReactor extends GuiBase {
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
if (tile.getCoilStatus() > 0) {
addHologramButton(6, 4, 212, layer).clickHandler(this::onClick);
addHologramButton(6, 4, 212, layer).clickHandler(this::hologramToggle);
drawCentredString(tile.getStateString(), 20, Color.BLUE.darker().getRGB(), layer);
if(tile.state == 2){
drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) tile.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer);
}
} else {
builder.drawMultiblockMissingBar(this, layer);
addHologramButton(76, 56, 212, layer).clickHandler(this::onClick);
addHologramButton(76, 56, 212, layer).clickHandler(this::hologramToggle);
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
Optional<Pair<Integer, Integer>> stackSize = getCoilStackCount();
@ -103,31 +104,22 @@ public class GuiFusionReactor extends GuiBase {
drawString("Size: " + tile.size, 83, 81, 0xFFFFFF, layer);
drawString("" + tile.getPowerMultiplier() + "x", 10, 81, 0xFFFFFF, layer);
buttons.add(new GuiButtonUpDown(300, 121, 79, this, GuiBase.Layer.FOREGROUND));
buttons.add(new GuiButtonUpDown(301, 121 + 12, 79, this, GuiBase.Layer.FOREGROUND));
buttons.add(new GuiButtonUpDown(302, 121 + 24, 79, this, GuiBase.Layer.FOREGROUND));
buttons.add(new GuiButtonUpDown(303, 121 + 36, 79, this, GuiBase.Layer.FOREGROUND));
buttons.add(new GuiButtonUpDown(121, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(5)));
buttons.add(new GuiButtonUpDown(121 + 12, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(1)));
buttons.add(new GuiButtonUpDown(121 + 24, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(-5)));
buttons.add(new GuiButtonUpDown(121 + 36, 79, this, GuiBase.Layer.FOREGROUND, (ButtonWidget buttonWidget) -> sendSizeChange(-1)));
builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
public void onClick(GuiButtonExtended button, Double x, Double y){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
public void hologramToggle(GuiButtonExtended button, double x, double y){
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
updateMultiBlockRender();
} else {
ClientProxy.multiblockRenderEvent.setMultiblock(null);
}
}
if (button.id == 300){
sendSizeChange(5);
} else if (button.id == 301){
sendSizeChange(1);
} else if (button.id == 302){
sendSizeChange(-1);
} else if (button.id == 303){
sendSizeChange(-5);
}
}
private void sendSizeChange(int sizeDelta){

View file

@ -26,7 +26,6 @@ package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import reborncore.ClientProxy;
@ -93,7 +92,7 @@ public class GuiImplosionCompressor extends GuiBase {
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -96,8 +96,8 @@ public class GuiIndustrialGrinder extends GuiBase {
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
public void onClick(GuiButtonExtended button, double mouseX, double mouseY){
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -49,8 +49,8 @@ public class GuiIndustrialSawmill extends GuiBase {
}
@Override
public void initGui() {
super.initGui();
public void init() {
super.init();
ClientProxy.multiblockRenderEvent.setMultiblock(null);
}
@ -96,7 +96,7 @@ public class GuiIndustrialSawmill extends GuiBase {
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.

View file

@ -25,7 +25,6 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
@ -50,7 +49,7 @@ public class GuiIronFurnace extends GuiBase {
@Override
protected void drawBackground(float partialTicks, int mouseX, int mouseY) {
drawDefaultBackground();
renderBackground();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
builder.drawSlotTab(this, left - 24, top + 6, new ItemStack(TRContent.WRENCH));
minecraft.getTextureManager().bindTexture(GuiIronFurnace.texture);

View file

@ -25,7 +25,6 @@
package techreborn.client.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
import reborncore.common.powerSystem.PowerSystem;

View file

@ -24,18 +24,12 @@
package techreborn.client.gui;
import net.minecraft.client.gui.ingame.ConfirmChatLinkScreen;
import net.minecraft.client.gui.screen.ConfirmChatLinkScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.resource.language.I18n;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.util.Identifier;
import reborncore.client.gui.builder.widget.GuiButtonExtended;
import reborncore.common.network.NetworkManager;
import techreborn.items.ItemManual;
import techreborn.packets.ServerboundPackets;
import java.awt.*;
public class GuiManual extends Screen {
@ -51,27 +45,23 @@ public class GuiManual extends Screen {
private static final String text3 = I18n.translate("techreborn.manual.refund");
public GuiManual(PlayerEntity player) {
super(new TextComponent("gui.manual"));
this.player = player;
}
@Override
public boolean doesGuiPauseGame() {
return false;
}
@Override
public void init() {
int y = height / 4;
buttons.add(new GuiButtonExtended(1, (width / 2 - 30), y + 10, 60, 20, I18n.translate("techreborn.manual.wikibtn")));
buttons.add(new GuiButtonExtended(2, (width / 2 - 30), y + 60, 60, 20, I18n.translate("techreborn.manual.discordbtn")));
if(ItemManual.allowRefund){
buttons.add(new GuiButtonExtended(3, (width / 2 - 30), y + 110, 60, 20, I18n.translate("techreborn.manual.refundbtn")));
}
// buttons.add(new GuiButtonExtended((width / 2 - 30), y + 10, 60, 20, I18n.translate("techreborn.manual.wikibtn")));
// buttons.add(new GuiButtonExtended((width / 2 - 30), y + 60, 60, 20, I18n.translate("techreborn.manual.discordbtn")));
// if(ItemManual.allowRefund){
// buttons.add(new GuiButtonExtended((width / 2 - 30), y + 110, 60, 20, I18n.translate("techreborn.manual.refundbtn")));
// }
}
@Override
public void render(int mouseX, int mouseY, float partialTicks) {
drawDefaultBackground();
renderBackground();
minecraft.getTextureManager().bindTexture(GuiManual.texture);
int centerX = (width / 2) - guiWidth / 2;
int centerY = (height / 2) - guiHeight / 2;
@ -79,54 +69,55 @@ public class GuiManual extends Screen {
int y = height / 4;
font.draw(text1, ((width / 2) - font.getStringWidth(text1) / 2), height / 2 - (guiHeight / 4), 4210752);
font.draw(text2, ((width / 2) - font.getStringWidth(text2) / 2), height / 2 + 5, 4210752);
if(ItemManual.allowRefund){
if (ItemManual.allowRefund) {
font.draw(text3, ((width / 2) - font.getStringWidth(text3) / 2), y + 100, 4210752);
}
super.render(mouseX, mouseY, partialTicks);
}
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
switch (button.id) {
case 1:
minecraft.openScreen(new ConfirmChatLinkScreen(this, "http://wiki.techreborn.ovh", 1, false));
break;
case 2:
this.minecraft.openScreen(new ConfirmChatLinkScreen(this, "https://discord.gg/teamreborn", 2, false));
break;
case 3:
minecraft.openScreen(null);
NetworkManager.sendToServer(ServerboundPackets.createRefundPacket());
break;
}
}
@Override
public void confirmResult(boolean result, int id) {
switch(id) {
case 1:
if(result == true) {
try {
Desktop.getDesktop().browse(new java.net.URI("http://wiki.techreborn.ovh"));
} catch (Exception e) {
System.err.print(e);
}
}else {
minecraft.openScreen(this);
}
break;
case 2:
if(result == true) {
try {
Desktop.getDesktop().browse(new java.net.URI("https://discord.gg/teamreborn"));
} catch (Exception e) {
System.err.print(e);
}
}else {
minecraft.openScreen(this);
}
break;
}
}
}
// public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
// switch (button.id) {
// case 1:
// minecraft.openScreen(new ConfirmChatLinkScreen(this, "http://wiki.techreborn.ovh", 1, false));
// break;
// case 2:
// this.minecraft.openScreen(new ConfirmChatLinkScreen(this, "https://discord.gg/teamreborn", 2, false));
// break;
// case 3:
// minecraft.openScreen(null);
// NetworkManager.sendToServer(ServerboundPackets.createRefundPacket());
// break;
// }
// }
//
// @Override
// public void confirmResult(boolean result, int id) {
// switch(id) {
// case 1:
// if(result == true) {
// try {
// Desktop.getDesktop().browse(new java.net.URI("http://wiki.techreborn.ovh"));
// } catch (Exception e) {
// System.err.print(e);
// }
// }else {
// minecraft.openScreen(this);
// }
// break;
// case 2:
// if(result == true) {
// try {
// Desktop.getDesktop().browse(new java.net.URI("https://discord.gg/teamreborn"));
// } catch (Exception e) {
// System.err.print(e);
// }
// }else {
// minecraft.openScreen(this);
// }
// break;
// }
// }
// }

View file

@ -24,9 +24,9 @@
package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
import reborncore.client.gui.guibuilder.GuiBuilder;
import techreborn.tiles.generator.TilePlasmaGenerator;

View file

@ -25,8 +25,8 @@
package techreborn.client.gui;
import net.minecraft.entity.player.PlayerEntity;
import reborncore.client.gui.builder.GuiBase;
import reborncore.fluid.FluidStack;
import techreborn.tiles.machine.tier3.TileQuantumTank;
public class GuiQuantumTank extends GuiBase {

View file

@ -88,7 +88,7 @@ public class GuiVacuumFreezer extends GuiBase {
}
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
if (button.id == 212 && GuiBase.slotConfigType == SlotConfigType.NONE) {
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
if (ClientProxy.multiblockRenderEvent.currentMultiblock == null) {
{
// This code here makes a basic multiblock and then sets to the selected one.