Skip to content

Instantly share code, notes, and snippets.

Created May 20, 2015 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/401adaf95609faa2d117 to your computer and use it in GitHub Desktop.
Save anonymous/401adaf95609faa2d117 to your computer and use it in GitHub Desktop.
package fr.ah26.futura.common;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class SlotResult extends Slot {
public SlotResult(IInventory inventory, int id, int x, int y)
{
super(inventory, id, x, y);
}
@Override
public boolean isItemValid(ItemStack stack) //Interdit la pose d'items dans le slot
{
return false;
}
public ItemStack decrStackSize(int amount)
{
return super.decrStackSize(amount);
}
public void onPickupFromSlot(EntityPlayer player, ItemStack stack)
{
super.onCrafting(stack);
super.onPickupFromSlot(player, stack);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment