Do not cast widgets without checking the instance of the class.
@@ -409,6 +409,7 @@ public class TinkerStationScreen extends BaseStationScreen<TinkerStationTileEnti
// draw the decoration for the buttons
for (Widget widget : this.buttonsScreen.getButtons()) {
+ if(widget instanceof SlotButtonItem) {
SlotButtonItem button = (SlotButtonItem) widget;
this.buttonDecorationTop.draw(matrices, button.x, button.y - this.buttonDecorationTop.h);
@@ -417,6 +418,7 @@ public class TinkerStationScreen extends BaseStationScreen<TinkerStationTileEnti
this.buttonDecorationBot.draw(matrices, button.x, button.y + button.getHeight());
}
}
+ }
// draw the decorations for the panels
this.panelDecorationL.draw(matrices, this.tinkerInfo.guiLeft + 5, this.tinkerInfo.guiTop - this.panelDecorationL.h);
