Advertisement
Raevox

SlotVendingMachine

Feb 22nd, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. package com.skcraft.creditvendor.gui;
  2.  
  3. import net.minecraft.inventory.IInventory;
  4. import net.minecraft.inventory.Slot;
  5. import net.minecraft.item.ItemStack;
  6.  
  7. public class SlotVendingMachine extends Slot {
  8.     public IInventory inventory;
  9.  
  10.     public SlotVendingMachine( IInventory inventory, int id, int x, int y ) {
  11.         super( inventory, id, x, y );
  12.         this.inventory = inventory;
  13.     }
  14.  
  15.     @Override
  16.     public boolean isItemValid( ItemStack itemStack ) {
  17.         return inventory.isItemValidForSlot( getSlotIndex(), itemStack );
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement