添加重铸台背景

This commit is contained in:
Atsuihsio 2024-08-13 18:43:46 +08:00
parent eacc541282
commit ba7bd44f4e
3 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,6 @@
package net.mcreator.superbwarfare.client.screens;
import com.mojang.blaze3d.systems.RenderSystem;
import net.mcreator.superbwarfare.ModUtils;
import net.mcreator.superbwarfare.block.menu.ReforgingTableMenu;
import net.mcreator.superbwarfare.network.message.GunReforgeMessage;
@ -26,10 +27,12 @@ public class ReforgingTableScreen extends AbstractContainerScreen<ReforgingTable
}
@Override
protected void renderBg(GuiGraphics pGuiGraphics, float pPartialTick, int pMouseX, int pMouseY) {
int i = (this.width - this.imageWidth) / 2;
int j = (this.height - this.imageHeight) / 2;
pGuiGraphics.blit(TEXTURE, i, j, 0, 0, this.imageWidth, this.imageHeight);
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int gx, int gy) {
RenderSystem.setShaderColor(1, 1, 1, 1);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
guiGraphics.blit(TEXTURE, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight, this.imageWidth, this.imageHeight);
RenderSystem.disableBlend();
}
@Override

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB