Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PlatingPressScreen extends AbstractContainerScreen<PlatingPressContainer> {
- private static final ResourceLocation TEXTURE = new ResourceLocation(TankMod.MOD_ID, "textures/gui/plating_press.png");
- public PlatingPressScreen(PlatingPressContainer container, Inventory playerInv, Component title) {
- super(container, playerInv, title);
- this.leftPos = 0;
- this.topPos = 0;
- this.imageWidth = 175;
- this.imageHeight = 165;
- }
- @Override
- protected void renderBg(PoseStack stack, float mouseX, int mouseY, int partialTicks) {
- RenderSystem.setShader(GameRenderer::getPositionTexShader);
- RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
- RenderSystem.setShaderTexture(0, TEXTURE);
- blit(stack, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight);
- }
- @Override
- public void render(PoseStack stack, int mouseX, int mouseY, float partialTicks) {
- this.renderBackground(stack);
- super.render(stack, mouseX, mouseY, partialTicks);
- this.renderTooltip(stack, mouseX, mouseY);
- this.font.draw(stack, this.title, this.leftPos + 20, this.topPos + 5, 0x404040);
- this.font.draw(stack, this.playerInventoryTitle, this.leftPos + 8, this.topPos + 75, 0x404040);
- }
- @Override
- protected void renderLabels(PoseStack stack, int mouseX, int mouseY) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment