backpack background fixed
This commit is contained in:
		| @@ -1,5 +1,7 @@ | ||||
| package de.jottyfan.minecraft.quickiefabric.container; | ||||
|  | ||||
| import com.mojang.blaze3d.systems.RenderSystem; | ||||
|  | ||||
| import de.jottyfan.minecraft.quickiefabric.init.RegistryManager; | ||||
| import de.jottyfan.minecraft.quickiefabric.items.ItemBackpack; | ||||
| import net.fabricmc.api.EnvType; | ||||
| @@ -36,7 +38,8 @@ public class BackpackScreen extends HandledScreen<BackpackScreenHandler> | ||||
| 	} | ||||
|  | ||||
| 	private void drawSlots(MatrixStack matrices, int guiX, int guiY) { | ||||
| 		this.client.getTextureManager().bindTexture(SLOT_TEXTURE); | ||||
| 		RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); | ||||
| 		RenderSystem.setShaderTexture(0, SLOT_TEXTURE); | ||||
| 		for (int y = 0; y < (ItemBackpack.SLOTSIZE / 9); y++) { | ||||
| 			for (int x = 0; x < 9; x++) { | ||||
| 				this.drawTexture(matrices, guiX + 7 + (x * 18), guiY + 17 + (y * 18), 0, 0, 18, 18); | ||||
| @@ -53,7 +56,8 @@ public class BackpackScreen extends HandledScreen<BackpackScreenHandler> | ||||
|  | ||||
| 	@Override | ||||
| 	protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) { | ||||
| 		this.client.getTextureManager().bindTexture(TEXTURE); | ||||
| 		RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); | ||||
| 		RenderSystem.setShaderTexture(0, TEXTURE); | ||||
| 		int guiX = this.titleX; | ||||
| 		int guiY = (this.height - this.containerHeight) / 2; | ||||
| 		this.drawTexture(matrices, guiX, guiY, 0, 0, this.containerWidth, this.containerHeight); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user