1.17: TechReborn compiles and runs, big thanks to @petabyteboy
Co-authored-by: Milan Pässler <milan@petabyte.dev>
This commit is contained in:
parent
c661de5254
commit
b33f4be5f4
212 changed files with 952 additions and 2025 deletions
|
@ -50,10 +50,10 @@ public class GuiAESU extends GuiBase<BuiltScreenHandler> {
|
|||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
addButton(new GuiButtonUpDown(x + 121, y + 79, this, b -> onClick(256), UpDownButtonType.FASTFORWARD));
|
||||
addButton(new GuiButtonUpDown(x + 121 + 12, y + 79, this, b -> onClick(64), UpDownButtonType.FORWARD));
|
||||
addButton(new GuiButtonUpDown(x + 121 + 24, y + 79, this, b -> onClick(-64), UpDownButtonType.REWIND));
|
||||
addButton(new GuiButtonUpDown(x + 121 + 36, y + 79, this, b -> onClick(-256), UpDownButtonType.FASTREWIND));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121, y + 79, this, b -> onClick(256), UpDownButtonType.FASTFORWARD));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121 + 12, y + 79, this, b -> onClick(64), UpDownButtonType.FORWARD));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121 + 24, y + 79, this, b -> onClick(-64), UpDownButtonType.REWIND));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121 + 36, y + 79, this, b -> onClick(-256), UpDownButtonType.FASTREWIND));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,12 +49,12 @@ public class GuiChunkLoader extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
public void init() {
|
||||
super.init();
|
||||
addButton(new GuiButtonUpDown(x + 64, y + 40, this, b -> onClick(5), UpDownButtonType.FASTFORWARD));
|
||||
addButton(new GuiButtonUpDown(x + 64 + 12, y + 40, this, b -> onClick(1), UpDownButtonType.FORWARD));
|
||||
addButton(new GuiButtonUpDown(x + 64 + 24, y + 40, this, b -> onClick(-1), UpDownButtonType.REWIND));
|
||||
addButton(new GuiButtonUpDown(x + 64 + 36, y + 40, this, b -> onClick(-5), UpDownButtonType.FASTREWIND));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 64, y + 40, this, b -> onClick(5), UpDownButtonType.FASTFORWARD));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 64 + 12, y + 40, this, b -> onClick(1), UpDownButtonType.FORWARD));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 64 + 24, y + 40, this, b -> onClick(-1), UpDownButtonType.REWIND));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 64 + 36, y + 40, this, b -> onClick(-5), UpDownButtonType.FASTREWIND));
|
||||
|
||||
addButton(new GuiButtonSimple(x + 10, y + 70, 155, 20, new LiteralText("Toggle Loaded Chunks"), b -> ClientChunkManager.toggleLoadedChunks(blockEntity.getPos())));
|
||||
addDrawableChild(new GuiButtonSimple(x + 10, y + 70, 155, 20, new LiteralText("Toggle Loaded Chunks"), b -> ClientChunkManager.toggleLoadedChunks(blockEntity.getPos())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -56,10 +56,10 @@ public class GuiFusionReactor extends GuiBase<BuiltScreenHandler> {
|
|||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
addButton(new GuiButtonUpDown(x + 121, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(5), UpDownButtonType.FASTFORWARD));
|
||||
addButton(new GuiButtonUpDown(x + 121 + 12, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(1), UpDownButtonType.FORWARD));
|
||||
addButton(new GuiButtonUpDown(x + 121 + 24, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(-5), UpDownButtonType.REWIND));
|
||||
addButton(new GuiButtonUpDown(x + 121 + 36, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(-1), UpDownButtonType.FASTREWIND));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(5), UpDownButtonType.FASTFORWARD));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121 + 12, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(1), UpDownButtonType.FORWARD));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121 + 24, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(-5), UpDownButtonType.REWIND));
|
||||
addDrawableChild(new GuiButtonUpDown(x + 121 + 36, y + 79, this, (ButtonWidget buttonWidget) -> sendSizeChange(-1), UpDownButtonType.FASTREWIND));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
|
@ -48,6 +49,7 @@ public class GuiIronFurnace extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
IronFurnaceBlockEntity blockEntity;
|
||||
|
||||
|
||||
public GuiIronFurnace(int syncID, PlayerEntity player, IronFurnaceBlockEntity furnace) {
|
||||
super(player, furnace, furnace.createScreenHandler(syncID, player));
|
||||
this.blockEntity = furnace;
|
||||
|
@ -60,14 +62,11 @@ public class GuiIronFurnace extends GuiBase<BuiltScreenHandler> {
|
|||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
addButton(new GuiButtonSimple(getGuiLeft() + 116, getGuiTop() + 57, 18, 18, LiteralText.EMPTY, b -> onClick()) {
|
||||
addSelectableChild(new GuiButtonSimple(getGuiLeft() + 116, getGuiTop() + 57, 18, 18, LiteralText.EMPTY, b -> onClick()) {
|
||||
|
||||
@Override
|
||||
public void renderToolTip(MatrixStack matrixStack, int mouseX, int mouseY) {
|
||||
PlayerEntity player = playerInventory.player;
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
PlayerEntity player = MinecraftClient.getInstance().player;
|
||||
String message = "Experience: ";
|
||||
|
||||
float furnaceExp = blockEntity.experience;
|
||||
|
@ -94,14 +93,13 @@ public class GuiIronFurnace extends GuiBase<BuiltScreenHandler> {
|
|||
List<Text> list = new ArrayList<>();
|
||||
list.add(new LiteralText(message));
|
||||
renderTooltip(matrixStack, list, mouseX, mouseY);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.color4f(1, 1, 1, 1);
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackground(MatrixStack matrixStack, MinecraftClient mc, int mouseX, int mouseY) {
|
||||
mc.getItemRenderer().renderInGuiWithOverrides(new ItemStack(Items.EXPERIENCE_BOTTLE), x, y);
|
||||
protected void renderBackground(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY) {
|
||||
client.getItemRenderer().renderInGuiWithOverrides(new ItemStack(Items.EXPERIENCE_BOTTLE), x, y);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -60,20 +60,20 @@ public class GuiManual extends Screen {
|
|||
public void init() {
|
||||
int y = (height / 2) - guiHeight / 2;
|
||||
y += 40;
|
||||
addButton(new GuiButtonExtended((width / 2 - 30), y + 10, 60, 20, new TranslatableText("techreborn.manual.wikibtn"), var1 -> client.openScreen(new ConfirmChatLinkScreen(t -> {
|
||||
addSelectableChild(new GuiButtonExtended((width / 2 - 30), y + 10, 60, 20, new TranslatableText("techreborn.manual.wikibtn"), var1 -> client.openScreen(new ConfirmChatLinkScreen(t -> {
|
||||
if (t) {
|
||||
Util.getOperatingSystem().open("http://wiki.techreborn.ovh");
|
||||
}
|
||||
this.client.openScreen(this);
|
||||
}, "http://wiki.techreborn.ovh", false))));
|
||||
addButton(new GuiButtonExtended((width / 2 - 30), y + 60, 60, 20, new TranslatableText("techreborn.manual.discordbtn"), var1 -> client.openScreen(new ConfirmChatLinkScreen(t -> {
|
||||
addSelectableChild(new GuiButtonExtended((width / 2 - 30), y + 60, 60, 20, new TranslatableText("techreborn.manual.discordbtn"), var1 -> client.openScreen(new ConfirmChatLinkScreen(t -> {
|
||||
if (t) {
|
||||
Util.getOperatingSystem().open("https://discord.gg/teamreborn");
|
||||
}
|
||||
this.client.openScreen(this);
|
||||
}, "https://discord.gg/teamreborn", false))));
|
||||
if (TechRebornConfig.allowManualRefund) {
|
||||
addButton(new GuiButtonExtended((width / 2 - 30), y + 110, 60, 20, new TranslatableText("techreborn.manual.refundbtn"), var1 -> {
|
||||
addSelectableChild(new GuiButtonExtended((width / 2 - 30), y + 110, 60, 20, new TranslatableText("techreborn.manual.refundbtn"), var1 -> {
|
||||
NetworkManager.sendToServer(ServerboundPackets.createRefundPacket());
|
||||
this.client.openScreen(null);
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue