Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DisplayCaseScreen extends ContainerScreen<DisplayCaseContainer> {
- private static final ResourceLocation DISPLAY_CASE_GUI = new ResourceLocation(GuiWork.MOD_ID, "textures/gui/display_case.png");
- public DisplayCaseScreen(DisplayCaseContainer screenContainer, PlayerInventory inv, ITextComponent titleIn) {
- super(screenContainer, inv, titleIn);
- this.guiLeft = 0;
- this.guiTop = 0;
- this.xSize = 175;
- this.ySize = 201;
- }
- @Override
- public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
- this.renderBackground(matrixStack);
- super.render(matrixStack, mouseX, mouseY, partialTicks);
- this.renderHoveredTooltip(matrixStack, mouseX, mouseY);
- }
- @SuppressWarnings("deprecation")
- @Override
- protected void drawGuiContainerBackgroundLayer(MatrixStack matrixStack, float partialTicks, int mouseX, int mouseY) {
- RenderSystem.color4f(1f, 1f, 1f, 1f);
- this.minecraft.getTextureManager().bindTexture(DISPLAY_CASE_GUI);
- this.blit(matrixStack, (this.width - this.xSize) / 2, (this.height - this.ySize) / 2, 0, 0, this.xSize, this.ySize);
- }
- @Override
- protected void drawGuiContainerForegroundLayer(MatrixStack matrixStack, int mouseX, int mouseY) {
- this.font.func_243248_b(matrixStack, this.playerInventory.getDisplayName(), (float) this.playerInventoryTitleX, (float) this.playerInventoryTitleY, 4210752);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment