mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Replace bauble box slots with a player render because what else would i put there
This commit is contained in:
1 parent
eabdbd910a
commit
9253a541c4
3 files changed
+6
-19
No files matched your search
@@ -47,19 +47,6 @@ public class ContainerBaubleBox extends Container {
|
||||
this.box = box;
|
||||
IItemHandlerModifiable baubleBoxInv = (IItemHandlerModifiable) box.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).orElse(null);
|
||||
|
||||
/* todo 1.13 remove these slots from the gui texture and provide a button to open curios gui instead
|
||||
baubles = BaublesApi.getBaublesHandler(player);
|
||||
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 0, 8, 8 + 0 * 18));
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 1, 8, 8 + 1 * 18));
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 2, 8, 8 + 2 * 18));
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 3, 8, 8 + 3 * 18));
|
||||
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 4, 27, 8 + 0 * 18));
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 5, 27, 8 + 1 * 18));
|
||||
addSlotToContainer(new SlotBauble(player, baubles, 6, 27, 8 + 2 * 18));
|
||||
*/
|
||||
|
||||
for(i = 0; i < 4; ++i)
|
||||
for(j = 0; j < 6; ++j) {
|
||||
int k = j + i * 6;
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.gui.box;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.client.gui.screen.inventory.InventoryScreen;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -22,6 +23,8 @@ import vazkii.botania.client.lib.LibResources;
|
||||
public class GuiBaubleBox extends ContainerScreen<ContainerBaubleBox> {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_BAUBLE_BOX);
|
||||
private int mouseX;
|
||||
private int mouseY;
|
||||
|
||||
public GuiBaubleBox(ContainerBaubleBox container, PlayerInventory player, ITextComponent title) {
|
||||
super(container, player, title);
|
||||
@@ -31,6 +34,8 @@ public class GuiBaubleBox extends ContainerScreen<ContainerBaubleBox> {
|
||||
public void render(int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground();
|
||||
super.render(mouseX, mouseY, partialTicks);
|
||||
this.mouseX = mouseX;
|
||||
this.mouseY = mouseY;
|
||||
this.renderHoveredToolTip(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@@ -39,12 +44,7 @@ public class GuiBaubleBox extends ContainerScreen<ContainerBaubleBox> {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getInstance().getTextureManager().bindTexture(texture);
|
||||
blit(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
for(int i1 = 0; i1 < 7; ++i1) {
|
||||
Slot slot = container.inventorySlots.get(i1);
|
||||
if(slot.getHasStack() && slot.getSlotStackLimit() == 1)
|
||||
blit(guiLeft+slot.xPos, guiTop+slot.yPos, 200, 0, 16, 16);
|
||||
}
|
||||
InventoryScreen.drawEntityOnScreen(guiLeft + 31, guiTop + 75, 30, guiLeft + 31 - this.mouseX, guiTop + 75 - 50 - this.mouseY, this.minecraft.player);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user