Guest User

Untitled

a guest
Apr 19th, 2022
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. public class PlatingPressScreen extends AbstractContainerScreen<PlatingPressContainer> {
  2. private static final ResourceLocation TEXTURE = new ResourceLocation(TankMod.MOD_ID, "textures/gui/plating_press.png");
  3. public PlatingPressScreen(PlatingPressContainer container, Inventory playerInv, Component title) {
  4. super(container, playerInv, title);
  5. this.leftPos = 0;
  6. this.topPos = 0;
  7. this.imageWidth = 175;
  8. this.imageHeight = 165;
  9. }
  10.  
  11. @Override
  12. protected void renderBg(PoseStack stack, float mouseX, int mouseY, int partialTicks) {
  13. RenderSystem.setShader(GameRenderer::getPositionTexShader);
  14. RenderSystem.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
  15. RenderSystem.setShaderTexture(0, TEXTURE);
  16. blit(stack, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight);
  17.  
  18. }
  19. @Override
  20. public void render(PoseStack stack, int mouseX, int mouseY, float partialTicks) {
  21. this.renderBackground(stack);
  22. super.render(stack, mouseX, mouseY, partialTicks);
  23. this.renderTooltip(stack, mouseX, mouseY);
  24. this.font.draw(stack, this.title, this.leftPos + 20, this.topPos + 5, 0x404040);
  25. this.font.draw(stack, this.playerInventoryTitle, this.leftPos + 8, this.topPos + 75, 0x404040);
  26. }
  27. @Override
  28. protected void renderLabels(PoseStack stack, int mouseX, int mouseY) {
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment