Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Mrhand3.SOARYN.InventoryReg.gui;
- import java.lang.ref.WeakReference;
- import java.util.List;
- import net.minecraft.client.Minecraft;
- import net.minecraft.inventory.Container;
- import net.minecraft.inventory.Slot;
- import org.lwjgl.opengl.GL11;
- public class Panel extends Box
- {
- private WeakReference<Container> container;
- public Panel(int x, int y, int width, int height, Container container)
- {
- super(x, y, width, height, 0, 5, 0xFFFFFF);
- this.container = new WeakReference<Container>(container);
- }
- @SuppressWarnings("unchecked")
- @Override
- public void render(Minecraft minecraft, int x, int y, int mouseX, int mouseY)
- {
- super.render(minecraft, x, y, mouseX, mouseY);
- if (Base.IS_OVERLAY_PASS != isOverlay())
- {
- return;
- }
- GL11.glColor4f(1, 1, 1, 1);
- bindComponentsSheet();
- if (container != null && container.get() != null)
- {
- for (Slot slot : (List<Slot>)container.get().inventorySlots)
- {
- drawTexturedModalRect(slot.xDisplayPosition - 1, slot.yDisplayPosition - 1, 0, 20, 18, 18);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment