Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.theviolentsquirrels.questsystem.inventory;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.inventory.Container;
- import net.minecraft.inventory.Slot;
- public class ModContainer extends Container {
- @Override
- public boolean canInteractWith(EntityPlayer playerIn) {
- return (false);
- }
- protected void addPlayerSlots(InventoryPlayer playerInventory) {
- /**
- * This adds the player inventory slots to the container
- * Slots IDs from 9 to 35
- */
- for (int y = 0; y < 3; ++y) {
- for (int x = 0; x < 9; ++x) {
- this.addSlotToContainer(new Slot(playerInventory, x + y * 9 + 9, 8 + x * 18, 84 + y * 18));
- }
- }
- /**
- * This adds the player hotbar slots to the container
- * Slots IDs from 0 to 8
- */
- for (int x = 0; x < 9; ++x) {
- this.addSlotToContainer(new Slot(playerInventory, x, 8 + x * 18, 142));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement