Feature: #0675 - Drag'n'Drop functionality when making patterns

Fixed a bug where pattern would not properly re-populate the pattern terminal when they were re-inserted.
Shift clicking into the inscriber is more intelligent.
This commit is contained in:
AlgorithmX2
2014-07-19 14:33:28 -05:00
parent e2288dafc7
commit 1747204928
7 changed files with 181 additions and 17 deletions
+12
View File
@@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import appeng.container.AEBaseContainer;
import appeng.tile.inventory.AppEngInternalInventory;
public class AppEngSlot extends Slot
@@ -16,6 +17,7 @@ public class AppEngSlot extends Slot
public boolean isDraggable = true;
public boolean isPlayerSide = false;
public AEBaseContainer myContainer = null;
public Slot setNotDraggable()
{
@@ -90,7 +92,12 @@ public class AppEngSlot extends Slot
public void putStack(ItemStack par1ItemStack)
{
if ( isEnabled() )
{
super.putStack( par1ItemStack );
if ( myContainer != null )
myContainer.onSlotChange( this );
}
}
public void clearStack()
@@ -139,4 +146,9 @@ public class AppEngSlot extends Slot
return isPlayerSide;
}
public boolean shouldDisplay()
{
return isEnabled();
}
}