AE2 First Commit, the dawn of 1.7 hast arrived.
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AppEngSlot extends Slot
|
||||
{
|
||||
|
||||
public enum hasCalculatedValidness
|
||||
{
|
||||
NotAvailable, Valid, Invalid
|
||||
};
|
||||
|
||||
public int icon = -1;
|
||||
public hasCalculatedValidness isValid;
|
||||
public int defX, defY;
|
||||
|
||||
public String getTooltip()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSlotChanged()
|
||||
{
|
||||
super.onSlotChanged();
|
||||
isValid = hasCalculatedValidness.NotAvailable;
|
||||
}
|
||||
|
||||
public AppEngSlot(IInventory inv, int idx, int x, int y) {
|
||||
super( inv, idx, x, y );
|
||||
defX = x;
|
||||
defY = y;
|
||||
isValid = hasCalculatedValidness.NotAvailable;
|
||||
}
|
||||
|
||||
public boolean isDisplay = false;
|
||||
|
||||
@Override
|
||||
public ItemStack getStack()
|
||||
{
|
||||
if ( isDisplay )
|
||||
{
|
||||
isDisplay = false;
|
||||
return getDisplayStack();
|
||||
}
|
||||
return super.getStack();
|
||||
}
|
||||
|
||||
public ItemStack getDisplayStack()
|
||||
{
|
||||
return super.getStack();
|
||||
}
|
||||
|
||||
public float getOpacityOfIcon()
|
||||
{
|
||||
return 0.4f;
|
||||
}
|
||||
|
||||
public boolean renderIconWithItem()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getIcon()
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user