AE2 First Commit, the dawn of 1.7 hast arrived.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotFakeTypeOnly extends SlotFake
|
||||
{
|
||||
|
||||
public SlotFakeTypeOnly(IInventory inv, int idx, int x, int y) {
|
||||
super( inv, idx, x, y );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addToInv(ItemStack is)
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
is = is.copy();
|
||||
is.stackSize = 1;
|
||||
}
|
||||
|
||||
super.putStack( is );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStack(ItemStack is)
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
is = is.copy();
|
||||
if ( is.stackSize > 1 )
|
||||
is.stackSize = 1;
|
||||
else if ( is.stackSize < -1 )
|
||||
is.stackSize = -1;
|
||||
}
|
||||
|
||||
super.putStack( is );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user