Switch over from SmallerButton to vanilla's button

This commit is contained in:
Mrbysco 2024-03-08 00:21:39 +01:00
parent 85a8ade648
commit fc7032fa4d
2 changed files with 4 additions and 2 deletions

View file

@ -52,7 +52,8 @@ public class CrusherScreen extends AAScreen<CrusherContainer> {
: 42), this.topPos + 5, this.tileGrinder.storage);
if (this.isDouble) {
this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, Component.literal("S"), (button) -> actionPerformed(0));
this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> actionPerformed(0))
.bounds(this.leftPos - 10, this.topPos, 16, 16).build();
this.addRenderableWidget(this.buttonAutoSplit);
}

View file

@ -60,7 +60,8 @@ public class GuiFurnaceDouble extends AAScreen<ContainerFurnaceDouble> {
public void init() {
super.init();
this.energy = new EnergyDisplay(this.leftPos + 27, this.topPos + 5, this.tileFurnace.storage);
this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0));
this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0))
.bounds(this.leftPos + 27, this.topPos + 5, 16, 16).build();
buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor());
this.addRenderableWidget(this.buttonAutoSplit);
}