1.3.6.1
Adds in item scrubber Fixes vault item highlight issue with new vault GUI Begin adding some functions from Tinkers Construct, as well as assets. Add a nether resource dimension
This commit is contained in:
parent
f3bce6751b
commit
2a3fec5d66
140 changed files with 2984 additions and 215 deletions
|
@ -0,0 +1,68 @@
|
|||
package dev.zontreck.otemod.implementation.vault;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
|
||||
import dev.zontreck.otemod.OTEMod;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
|
||||
public class VaultScreen extends AbstractContainerScreen <VaultMenu>
|
||||
{
|
||||
// 176x224
|
||||
public final UUID VaultMenuID;
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(OTEMod.MOD_ID, "textures/gui/vault.png");
|
||||
|
||||
public VaultScreen(VaultMenu container, Inventory playerInv, Component comp){
|
||||
super(container, playerInv, comp);
|
||||
|
||||
this.VaultMenuID = container.VaultMenuID;
|
||||
this.leftPos = 0;
|
||||
this.topPos = 0;
|
||||
|
||||
this.imageWidth = 207;
|
||||
this.imageHeight = 238;
|
||||
}
|
||||
|
||||
@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);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderLabels(PoseStack stack, int mouseX, int mouseY)
|
||||
{
|
||||
this.font.draw(stack, this.title, 63, 12, 0xFFFFFF);
|
||||
this.font.draw(stack, this.playerInventoryTitle, 63, 146, 0xFFFFFF);
|
||||
//this.font.draw(stack, this.title.getString(), this.leftPos + 17, this.topPos + 15, 0xFFFFFF);
|
||||
|
||||
//this.font.draw(stack, this.playerInventoryTitle.getString(), this.leftPos + 17, this.topPos + 123, 0xFFFFFF);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init()
|
||||
{
|
||||
super.init();
|
||||
// This is where custom controls would be added!
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderBg(PoseStack stack, float mouseX, int mouseY, int partialTicks)
|
||||
{
|
||||
renderBackground(stack);
|
||||
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);
|
||||
}
|
||||
}
|
Reference in a new issue