1.15 port
This commit is contained in:
@@ -26,13 +26,12 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.inventory.container.IContainerListener;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -81,7 +80,7 @@ import appeng.util.item.AEItemStack;
|
||||
|
||||
public abstract class AEBaseContainer extends Container
|
||||
{
|
||||
private final InventoryPlayer invPlayer;
|
||||
private final PlayerInventory invPlayer;
|
||||
private final IActionSource mySrc;
|
||||
private final HashSet<Integer> locked = new HashSet<>();
|
||||
private final TileEntity tileEntity;
|
||||
@@ -97,12 +96,12 @@ public abstract class AEBaseContainer extends Container
|
||||
private int ticksSinceCheck = 900;
|
||||
private IAEItemStack clientRequestedTargetItem = null;
|
||||
|
||||
public AEBaseContainer( final InventoryPlayer ip, final TileEntity myTile, final IPart myPart )
|
||||
public AEBaseContainer( final PlayerInventory ip, final TileEntity myTile, final IPart myPart )
|
||||
{
|
||||
this( ip, myTile, myPart, null );
|
||||
}
|
||||
|
||||
public AEBaseContainer( final InventoryPlayer ip, final TileEntity myTile, final IPart myPart, final IGuiItemObject gio )
|
||||
public AEBaseContainer( final PlayerInventory ip, final TileEntity myTile, final IPart myPart, final IGuiItemObject gio )
|
||||
{
|
||||
this.invPlayer = ip;
|
||||
this.tileEntity = myTile;
|
||||
@@ -151,7 +150,7 @@ public abstract class AEBaseContainer extends Container
|
||||
}
|
||||
}
|
||||
|
||||
public AEBaseContainer( final InventoryPlayer ip, final Object anchor )
|
||||
public AEBaseContainer( final PlayerInventory ip, final Object anchor )
|
||||
{
|
||||
this.invPlayer = ip;
|
||||
this.tileEntity = anchor instanceof TileEntity ? (TileEntity) anchor : null;
|
||||
@@ -237,7 +236,7 @@ public abstract class AEBaseContainer extends Container
|
||||
}
|
||||
|
||||
final ISecurityGrid sg = g.getCache( ISecurityGrid.class );
|
||||
if( sg.hasPermission( this.getInventoryPlayer().player, perm ) )
|
||||
if( sg.hasPermission( this.getPlayerInventory().player, perm ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -270,9 +269,9 @@ public abstract class AEBaseContainer extends Container
|
||||
return null;
|
||||
}
|
||||
|
||||
public InventoryPlayer getPlayerInv()
|
||||
public PlayerInventory getPlayerInv()
|
||||
{
|
||||
return this.getInventoryPlayer();
|
||||
return this.getPlayerInventory();
|
||||
}
|
||||
|
||||
public TileEntity getTileEntity()
|
||||
@@ -299,9 +298,9 @@ public abstract class AEBaseContainer extends Container
|
||||
}
|
||||
}
|
||||
|
||||
protected void bindPlayerInventory( final InventoryPlayer inventoryPlayer, final int offsetX, final int offsetY )
|
||||
protected void bindPlayerInventory( final PlayerInventory PlayerInventory, final int offsetX, final int offsetY )
|
||||
{
|
||||
IItemHandler ih = new PlayerInvWrapper( inventoryPlayer );
|
||||
IItemHandler ih = new PlayerInvWrapper( PlayerInventory );
|
||||
|
||||
// bind player inventory
|
||||
for( int i = 0; i < 3; i++ )
|
||||
@@ -373,7 +372,7 @@ public abstract class AEBaseContainer extends Container
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot( final EntityPlayer p, final int idx )
|
||||
public ItemStack transferStackInSlot( final PlayerEntity p, final int idx )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
@@ -635,13 +634,13 @@ public abstract class AEBaseContainer extends Container
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith( final EntityPlayer entityplayer )
|
||||
public boolean canInteractWith( final PlayerEntity PlayerEntity )
|
||||
{
|
||||
if( this.isValidContainer() )
|
||||
{
|
||||
if( this.tileEntity instanceof IInventory )
|
||||
{
|
||||
return ( (IInventory) this.tileEntity ).isUsableByPlayer( entityplayer );
|
||||
return ( (IInventory) this.tileEntity ).isUsableByPlayer( PlayerEntity );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -654,7 +653,7 @@ public abstract class AEBaseContainer extends Container
|
||||
return ( (AppEngSlot) s ).isDraggable();
|
||||
}
|
||||
|
||||
public void doAction( final EntityPlayerMP player, final InventoryAction action, final int slot, final long id )
|
||||
public void doAction( final PlayerEntityMP player, final InventoryAction action, final int slot, final long id )
|
||||
{
|
||||
if( slot >= 0 && slot < this.inventorySlots.size() )
|
||||
{
|
||||
@@ -1012,7 +1011,7 @@ public abstract class AEBaseContainer extends Container
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateHeld( final EntityPlayerMP p )
|
||||
protected void updateHeld( final PlayerEntityMP p )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
@@ -1099,7 +1098,7 @@ public abstract class AEBaseContainer extends Container
|
||||
{
|
||||
NetworkHandler.instance()
|
||||
.sendTo( new PacketValueConfig( "CustomName", this.getCustomName() ),
|
||||
(EntityPlayerMP) this.getInventoryPlayer().player );
|
||||
(PlayerEntityMP) this.getPlayerInventory().player );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
@@ -1133,12 +1132,12 @@ public abstract class AEBaseContainer extends Container
|
||||
|
||||
// can take?
|
||||
|
||||
if( !isA.isEmpty() && !a.canTakeStack( this.getInventoryPlayer().player ) )
|
||||
if( !isA.isEmpty() && !a.canTakeStack( this.getPlayerInventory().player ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( !isB.isEmpty() && !b.canTakeStack( this.getInventoryPlayer().player ) )
|
||||
if( !isB.isEmpty() && !b.canTakeStack( this.getPlayerInventory().player ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1226,7 +1225,7 @@ public abstract class AEBaseContainer extends Container
|
||||
this.customName = customName;
|
||||
}
|
||||
|
||||
public InventoryPlayer getInventoryPlayer()
|
||||
public PlayerInventory getPlayerInventory()
|
||||
{
|
||||
return this.invPlayer;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.container;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
|
||||
|
||||
/*
|
||||
@@ -29,8 +29,13 @@ import net.minecraft.inventory.Container;
|
||||
public class ContainerNull extends Container
|
||||
{
|
||||
|
||||
public ContainerNull()
|
||||
{
|
||||
super( null, 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith( final EntityPlayer entityplayer )
|
||||
public boolean canInteractWith( final PlayerEntity PlayerEntity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
@@ -86,9 +86,9 @@ public class SyncData
|
||||
{
|
||||
if( val instanceof String )
|
||||
{
|
||||
if( o instanceof EntityPlayerMP )
|
||||
if( o instanceof PlayerEntityMP )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( new PacketValueConfig( "SyncDat." + this.channel, (String) val ), (EntityPlayerMP) o );
|
||||
NetworkHandler.instance().sendTo( new PacketValueConfig( "SyncDat." + this.channel, (String) val ), (PlayerEntityMP) o );
|
||||
}
|
||||
}
|
||||
else if( this.field.getType().isEnum() )
|
||||
@@ -97,9 +97,9 @@ public class SyncData
|
||||
}
|
||||
else if( val instanceof Long || val.getClass() == long.class )
|
||||
{
|
||||
if( o instanceof EntityPlayerMP )
|
||||
if( o instanceof PlayerEntityMP )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( new PacketProgressBar( this.channel, (Long) val ), (EntityPlayerMP) o );
|
||||
NetworkHandler.instance().sendTo( new PacketProgressBar( this.channel, (Long) val ), (PlayerEntityMP) o );
|
||||
}
|
||||
}
|
||||
else if( val instanceof Boolean || val.getClass() == boolean.class )
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.container.implementations;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -59,7 +59,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
private ItemStack prevStack = ItemStack.EMPTY;
|
||||
private int lastUpgrades = 0;
|
||||
|
||||
public ContainerCellWorkbench( final InventoryPlayer ip, final TileCellWorkbench te )
|
||||
public ContainerCellWorkbench( final PlayerInventory ip, final TileCellWorkbench te )
|
||||
{
|
||||
super( ip, te );
|
||||
this.workBench = te;
|
||||
@@ -119,7 +119,7 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
final int iSLot = zz * 8 + z;
|
||||
this.addSlotToContainer(
|
||||
new OptionalSlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgradeInventory, this, iSLot, 187 + zz * 18, 8 + 18 * z, iSLot, this
|
||||
.getInventoryPlayer() ) );
|
||||
.getPlayerInventory() ) );
|
||||
}
|
||||
}
|
||||
/*
|
||||
@@ -164,9 +164,9 @@ public class ContainerCellWorkbench extends ContainerUpgradeable
|
||||
}
|
||||
}
|
||||
|
||||
if( listener instanceof EntityPlayerMP )
|
||||
if( listener instanceof PlayerEntityMP )
|
||||
{
|
||||
( (EntityPlayerMP) listener ).isChangingQuantityOnly = false;
|
||||
( (PlayerEntityMP) listener ).isChangingQuantityOnly = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
@@ -31,13 +31,13 @@ public class ContainerChest extends AEBaseContainer
|
||||
|
||||
private final TileChest chest;
|
||||
|
||||
public ContainerChest( final InventoryPlayer ip, final TileChest chest )
|
||||
public ContainerChest( final PlayerInventory ip, final TileChest chest )
|
||||
{
|
||||
super( ip, chest, null );
|
||||
this.chest = chest;
|
||||
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, this.chest.getInternalInventory(), 1, 80, 37, this
|
||||
.getInventoryPlayer() ) );
|
||||
.getPlayerInventory() ) );
|
||||
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.CondenserOutput;
|
||||
@@ -44,7 +44,7 @@ public class ContainerCondenser extends AEBaseContainer implements IProgressProv
|
||||
@GuiSync( 2 )
|
||||
public CondenserOutput output = CondenserOutput.TRASH;
|
||||
|
||||
public ContainerCondenser( final InventoryPlayer ip, final TileCondenser condenser )
|
||||
public ContainerCondenser( final PlayerInventory ip, final TileCondenser condenser )
|
||||
{
|
||||
super( ip, condenser, null );
|
||||
this.condenser = condenser;
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.container.implementations;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ContainerCraftAmount extends AEBaseContainer
|
||||
private final Slot craftingItem;
|
||||
private IAEItemStack itemToCreate;
|
||||
|
||||
public ContainerCraftAmount( final InventoryPlayer ip, final ITerminalHost te )
|
||||
public ContainerCraftAmount( final PlayerInventory ip, final ITerminalHost te )
|
||||
{
|
||||
super( ip, te );
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
@@ -89,7 +89,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
@GuiSync( 7 )
|
||||
public String myName = "";
|
||||
|
||||
public ContainerCraftConfirm( final InventoryPlayer ip, final ITerminalHost te )
|
||||
public ContainerCraftConfirm( final PlayerInventory ip, final ITerminalHost te )
|
||||
{
|
||||
super( ip, te );
|
||||
}
|
||||
@@ -261,13 +261,13 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
|
||||
for( final Object g : this.listeners )
|
||||
{
|
||||
if( g instanceof EntityPlayer )
|
||||
if( g instanceof PlayerEntity )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( a, (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( b, (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( a, (PlayerEntityMP) g );
|
||||
NetworkHandler.instance().sendTo( b, (PlayerEntityMP) g );
|
||||
if( c != null )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( c, (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( c, (PlayerEntityMP) g );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -354,7 +354,7 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
if( g != null && originalGui != null && this.getOpenContext() != null )
|
||||
{
|
||||
final TileEntity te = this.getOpenContext().getTile();
|
||||
Platform.openGUI( this.getInventoryPlayer().player, te, this.getOpenContext().getSide(), originalGui );
|
||||
Platform.openGUI( this.getPlayerInventory().player, te, this.getOpenContext().getSide(), originalGui );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,9 +376,9 @@ public class ContainerCraftConfirm extends AEBaseContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed( final EntityPlayer par1EntityPlayer )
|
||||
public void onContainerClosed( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
super.onContainerClosed( par1EntityPlayer );
|
||||
super.onContainerClosed( par1PlayerEntity );
|
||||
if( this.getJob() != null )
|
||||
{
|
||||
this.getJob().cancel( true );
|
||||
|
||||
@@ -21,9 +21,9 @@ package appeng.container.implementations;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -61,7 +61,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
@GuiSync( 0 )
|
||||
public long eta = -1;
|
||||
|
||||
public ContainerCraftingCPU( final InventoryPlayer ip, final Object te )
|
||||
public ContainerCraftingCPU( final PlayerInventory ip, final Object te )
|
||||
{
|
||||
super( ip, te );
|
||||
final IActionHost host = (IActionHost) ( te instanceof IActionHost ? te : null );
|
||||
@@ -96,11 +96,11 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
|
||||
for( final Object g : this.listeners )
|
||||
{
|
||||
if( g instanceof EntityPlayer )
|
||||
if( g instanceof PlayerEntity )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance().sendTo( new PacketValueConfig( "CraftingStatus", "Clear" ), (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( new PacketValueConfig( "CraftingStatus", "Clear" ), (PlayerEntityMP) g );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
@@ -147,7 +147,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed( final EntityPlayer player )
|
||||
public void onContainerClosed( final PlayerEntity player )
|
||||
{
|
||||
super.onContainerClosed( player );
|
||||
if( this.getMonitor() != null )
|
||||
@@ -187,21 +187,21 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
||||
|
||||
for( final Object g : this.listeners )
|
||||
{
|
||||
if( g instanceof EntityPlayer )
|
||||
if( g instanceof PlayerEntity )
|
||||
{
|
||||
if( !a.isEmpty() )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( a, (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( a, (PlayerEntityMP) g );
|
||||
}
|
||||
|
||||
if( !b.isEmpty() )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( b, (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( b, (PlayerEntityMP) g );
|
||||
}
|
||||
|
||||
if( !c.isEmpty() )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( c, (EntityPlayerMP) g );
|
||||
NetworkHandler.instance().sendTo( c, (PlayerEntityMP) g );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingCPU;
|
||||
import appeng.api.networking.crafting.ICraftingGrid;
|
||||
@@ -45,7 +45,7 @@ public class ContainerCraftingStatus extends ContainerCraftingCPU
|
||||
@GuiSync( 7 )
|
||||
public String myName = "";
|
||||
|
||||
public ContainerCraftingStatus( final InventoryPlayer ip, final ITerminalHost te )
|
||||
public ContainerCraftingStatus( final PlayerInventory ip, final ITerminalHost te )
|
||||
{
|
||||
super( ip, te );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -49,7 +49,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
|
||||
private final SlotCraftingTerm outputSlot;
|
||||
private IRecipe currentRecipe;
|
||||
|
||||
public ContainerCraftingTerm( final InventoryPlayer ip, final ITerminalHost monitorable )
|
||||
public ContainerCraftingTerm( final PlayerInventory ip, final ITerminalHost monitorable )
|
||||
{
|
||||
super( ip, monitorable, false );
|
||||
this.ct = (PartCraftingTerminal) monitorable;
|
||||
@@ -121,7 +121,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
|
||||
{
|
||||
if( name.equals( "player" ) )
|
||||
{
|
||||
return new PlayerInvWrapper( this.getInventoryPlayer() );
|
||||
return new PlayerInvWrapper( this.getPlayerInventory() );
|
||||
}
|
||||
return this.ct.getInventoryByName( name );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
@@ -29,7 +29,7 @@ import appeng.tile.storage.TileDrive;
|
||||
public class ContainerDrive extends AEBaseContainer
|
||||
{
|
||||
|
||||
public ContainerDrive( final InventoryPlayer ip, final TileDrive drive )
|
||||
public ContainerDrive( final PlayerInventory ip, final TileDrive drive )
|
||||
{
|
||||
super( ip, drive, null );
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ContainerDrive extends AEBaseContainer
|
||||
for( int x = 0; x < 2; x++ )
|
||||
{
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, drive
|
||||
.getInternalInventory(), x + y * 2, 71 + x * 18, 14 + y * 18, this.getInventoryPlayer() ) );
|
||||
.getInternalInventory(), x + y * 2, 71 + x * 18, 14 + y * 18, this.getPlayerInventory() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -41,7 +41,7 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
@GuiSync( 6 )
|
||||
public YesNo placeMode;
|
||||
|
||||
public ContainerFormationPlane( final InventoryPlayer ip, final PartFormationPlane te )
|
||||
public ContainerFormationPlane( final PlayerInventory ip, final PartFormationPlane te )
|
||||
{
|
||||
super( ip, te );
|
||||
}
|
||||
@@ -75,19 +75,19 @@ public class ContainerFormationPlane extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
@@ -32,15 +32,15 @@ import appeng.tile.grindstone.TileGrinder;
|
||||
public class ContainerGrinder extends AEBaseContainer
|
||||
{
|
||||
|
||||
public ContainerGrinder( final InventoryPlayer ip, final TileGrinder grinder )
|
||||
public ContainerGrinder( final PlayerInventory ip, final TileGrinder grinder )
|
||||
{
|
||||
super( ip, grinder, null );
|
||||
|
||||
IItemHandler inv = grinder.getInternalInventory();
|
||||
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, inv, 0, 12, 17, this.getInventoryPlayer() ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, inv, 1, 12 + 18, 17, this.getInventoryPlayer() ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, inv, 2, 12 + 36, 17, this.getInventoryPlayer() ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, inv, 0, 12, 17, this.getPlayerInventory() ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, inv, 1, 12 + 18, 17, this.getPlayerInventory() ) );
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ORE, inv, 2, 12 + 36, 17, this.getPlayerInventory() ) );
|
||||
|
||||
this.addSlotToContainer( new SlotInaccessible( inv, 6, 80, 40 ) );
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.FullnessMode;
|
||||
@@ -42,7 +42,7 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||
@GuiSync( 3 )
|
||||
public OperationMode opMode = OperationMode.EMPTY;
|
||||
|
||||
public ContainerIOPort( final InventoryPlayer ip, final TileIOPort te )
|
||||
public ContainerIOPort( final PlayerInventory ip, final TileIOPort te )
|
||||
{
|
||||
super( ip, te );
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, this
|
||||
.getInventoryPlayer() ) );
|
||||
.getPlayerInventory() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ public class ContainerIOPort extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -56,7 +56,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
@GuiSync( 3 )
|
||||
public int processingTime = -1;
|
||||
|
||||
public ContainerInscriber( final InventoryPlayer ip, final TileInscriber te )
|
||||
public ContainerInscriber( final PlayerInventory ip, final TileInscriber te )
|
||||
{
|
||||
super( ip, te );
|
||||
this.ti = te;
|
||||
@@ -64,11 +64,11 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
IItemHandler inv = te.getInternalInventory();
|
||||
|
||||
this.addSlotToContainer(
|
||||
this.top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, inv, 0, 45, 16, this.getInventoryPlayer() ) );
|
||||
this.top = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, inv, 0, 45, 16, this.getPlayerInventory() ) );
|
||||
this.addSlotToContainer(
|
||||
this.bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, inv, 1, 45, 62, this.getInventoryPlayer() ) );
|
||||
this.bottom = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_PLATE, inv, 1, 45, 62, this.getPlayerInventory() ) );
|
||||
this.addSlotToContainer(
|
||||
this.middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, inv, 2, 63, 39, this.getInventoryPlayer() ) );
|
||||
this.middle = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.INSCRIBER_INPUT, inv, 2, 63, 39, this.getPlayerInventory() ) );
|
||||
|
||||
this.addSlotToContainer( new SlotOutput( inv, 3, 113, 40, -1 ) );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -44,7 +44,7 @@ public class ContainerInterface extends ContainerUpgradeable
|
||||
@GuiSync( 4 )
|
||||
public YesNo iTermMode = YesNo.YES;
|
||||
|
||||
public ContainerInterface( final InventoryPlayer ip, final IInterfaceHost te )
|
||||
public ContainerInterface( final PlayerInventory ip, final IInterfaceHost te )
|
||||
{
|
||||
super( ip, te.getInterfaceDuality().getHost() );
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ContainerInterface extends ContainerUpgradeable
|
||||
for( int x = 0; x < DualityInterface.NUMBER_OF_PATTERN_SLOTS; x++ )
|
||||
{
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality
|
||||
.getPatterns(), x, 8 + 18 * x, 90 + 7, this.getInventoryPlayer() ) );
|
||||
.getPatterns(), x, 8 + 18 * x, 90 + 7, this.getPlayerInventory() ) );
|
||||
}
|
||||
|
||||
for( int x = 0; x < DualityInterface.NUMBER_OF_CONFIG_SLOTS; x++ )
|
||||
|
||||
@@ -24,10 +24,10 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
@@ -67,9 +67,9 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
private final Map<IInterfaceHost, InvTracker> diList = new HashMap<>();
|
||||
private final Map<Long, InvTracker> byId = new HashMap<>();
|
||||
private IGrid grid;
|
||||
private NBTTagCompound data = new NBTTagCompound();
|
||||
private CompoundNBT data = new CompoundNBT();
|
||||
|
||||
public ContainerInterfaceTerminal( final InventoryPlayer ip, final PartInterfaceTerminal anchor )
|
||||
public ContainerInterfaceTerminal( final PlayerInventory ip, final PartInterfaceTerminal anchor )
|
||||
{
|
||||
super( ip, anchor );
|
||||
|
||||
@@ -188,19 +188,19 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance().sendTo( new PacketCompressedNBT( this.data ), (EntityPlayerMP) this.getPlayerInv().player );
|
||||
NetworkHandler.instance().sendTo( new PacketCompressedNBT( this.data ), (PlayerEntityMP) this.getPlayerInv().player );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
// :P
|
||||
}
|
||||
|
||||
this.data = new NBTTagCompound();
|
||||
this.data = new CompoundNBT();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAction( final EntityPlayerMP player, final InventoryAction action, final int slot, final long id )
|
||||
public void doAction( final PlayerEntityMP player, final InventoryAction action, final int slot, final long id )
|
||||
{
|
||||
final InvTracker inv = this.byId.get( id );
|
||||
if( inv != null )
|
||||
@@ -311,7 +311,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
}
|
||||
}
|
||||
|
||||
private void regenList( final NBTTagCompound data )
|
||||
private void regenList( final CompoundNBT data )
|
||||
{
|
||||
this.byId.clear();
|
||||
this.diList.clear();
|
||||
@@ -369,10 +369,10 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
return !ItemStack.areItemStacksEqual( a, b );
|
||||
}
|
||||
|
||||
private void addItems( final NBTTagCompound data, final InvTracker inv, final int offset, final int length )
|
||||
private void addItems( final CompoundNBT data, final InvTracker inv, final int offset, final int length )
|
||||
{
|
||||
final String name = '=' + Long.toString( inv.which, Character.MAX_RADIX );
|
||||
final NBTTagCompound tag = data.getCompoundTag( name );
|
||||
final CompoundNBT tag = data.getCompoundTag( name );
|
||||
|
||||
if( tag.hasNoTags() )
|
||||
{
|
||||
@@ -382,7 +382,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
||||
|
||||
for( int x = 0; x < length; x++ )
|
||||
{
|
||||
final NBTTagCompound itemNBT = new NBTTagCompound();
|
||||
final CompoundNBT itemNBT = new CompoundNBT();
|
||||
|
||||
final ItemStack is = inv.server.getStackInSlot( x + offset );
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -44,7 +44,7 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
|
||||
private final PartLevelEmitter lvlEmitter;
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
private GuiTextField textField;
|
||||
@GuiSync( 2 )
|
||||
public LevelType lvType;
|
||||
@@ -53,20 +53,20 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
@GuiSync( 4 )
|
||||
public YesNo cmType;
|
||||
|
||||
public ContainerLevelEmitter( final InventoryPlayer ip, final PartLevelEmitter te )
|
||||
public ContainerLevelEmitter( final PlayerInventory ip, final PartLevelEmitter te )
|
||||
{
|
||||
super( ip, te );
|
||||
this.lvlEmitter = te;
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public void setTextField( final GuiTextField level )
|
||||
{
|
||||
this.textField = level;
|
||||
this.textField.setText( String.valueOf( this.EmitterValue ) );
|
||||
}
|
||||
|
||||
public void setLevel( final long l, final EntityPlayer player )
|
||||
public void setLevel( final long l, final PlayerEntity player )
|
||||
{
|
||||
this.lvlEmitter.setReportingValue( l );
|
||||
this.EmitterValue = l;
|
||||
@@ -79,25 +79,25 @@ public class ContainerLevelEmitter extends ContainerUpgradeable
|
||||
if( this.availableUpgrades() > 0 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
if( this.availableUpgrades() > 1 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
if( this.availableUpgrades() > 2 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
if( this.availableUpgrades() > 3 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -46,7 +46,7 @@ public class ContainerMAC extends ContainerUpgradeable implements IProgressProvi
|
||||
@GuiSync( 4 )
|
||||
public int craftProgress = 0;
|
||||
|
||||
public ContainerMAC( final InventoryPlayer ip, final TileMolecularAssembler te )
|
||||
public ContainerMAC( final PlayerInventory ip, final TileMolecularAssembler te )
|
||||
{
|
||||
super( ip, te );
|
||||
this.tma = te;
|
||||
@@ -103,26 +103,26 @@ public class ContainerMAC extends ContainerUpgradeable implements IProgressProvi
|
||||
offY = 16;
|
||||
|
||||
this.addSlotToContainer(
|
||||
new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, this.getInventoryPlayer() ) );
|
||||
new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_CRAFTING_PATTERN, mac, 10, offX, offY, this.getPlayerInventory() ) );
|
||||
this.addSlotToContainer( new SlotOutput( mac, 9, offX, offY + 32, -1 ) );
|
||||
|
||||
offX = 122;
|
||||
offY = 17;
|
||||
|
||||
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.nio.BufferOverflowException;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -89,12 +89,12 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
private IConfigManager serverCM;
|
||||
private IGridNode networkNode;
|
||||
|
||||
public ContainerMEMonitorable( final InventoryPlayer ip, final ITerminalHost monitorable )
|
||||
public ContainerMEMonitorable( final PlayerInventory ip, final ITerminalHost monitorable )
|
||||
{
|
||||
this( ip, monitorable, true );
|
||||
}
|
||||
|
||||
protected ContainerMEMonitorable( final InventoryPlayer ip, final ITerminalHost monitorable, final boolean bindInventory )
|
||||
protected ContainerMEMonitorable( final PlayerInventory ip, final ITerminalHost monitorable, final boolean bindInventory )
|
||||
{
|
||||
super( ip, monitorable instanceof TileEntity ? (TileEntity) monitorable : null, monitorable instanceof IPart ? (IPart) monitorable : null );
|
||||
|
||||
@@ -167,7 +167,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
for( int y = 0; y < 5; y++ )
|
||||
{
|
||||
this.cellView[y] = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.VIEW_CELL, ( (IViewCellStorage) monitorable )
|
||||
.getViewCellStorage(), y, 206, y * 18 + 8, this.getInventoryPlayer() );
|
||||
.getViewCellStorage(), y, 206, y * 18 + 8, this.getPlayerInventory() );
|
||||
this.cellView[y].setAllowEdit( this.canAccessViewCells );
|
||||
this.addSlotToContainer( this.cellView[y] );
|
||||
}
|
||||
@@ -204,11 +204,11 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
this.clientCM.putSetting( set, sideLocal );
|
||||
for( final IContainerListener crafter : this.listeners )
|
||||
{
|
||||
if( crafter instanceof EntityPlayerMP )
|
||||
if( crafter instanceof PlayerEntityMP )
|
||||
{
|
||||
try
|
||||
{
|
||||
NetworkHandler.instance().sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (EntityPlayerMP) crafter );
|
||||
NetworkHandler.instance().sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (PlayerEntityMP) crafter );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
@@ -247,9 +247,9 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
|
||||
for( final Object c : this.listeners )
|
||||
{
|
||||
if( c instanceof EntityPlayer )
|
||||
if( c instanceof PlayerEntity )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
|
||||
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,7 +330,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
|
||||
private void queueInventory( final IContainerListener c )
|
||||
{
|
||||
if( Platform.isServer() && c instanceof EntityPlayer && this.monitor != null )
|
||||
if( Platform.isServer() && c instanceof PlayerEntity && this.monitor != null )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -345,14 +345,14 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
}
|
||||
catch( final BufferOverflowException boe )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
|
||||
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
|
||||
|
||||
piu = new PacketMEInventoryUpdate();
|
||||
piu.appendItem( send );
|
||||
}
|
||||
}
|
||||
|
||||
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
|
||||
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
|
||||
}
|
||||
catch( final IOException e )
|
||||
{
|
||||
@@ -373,7 +373,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed( final EntityPlayer player )
|
||||
public void onContainerClosed( final PlayerEntity player )
|
||||
{
|
||||
super.onContainerClosed( player );
|
||||
if( this.monitor != null )
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -37,7 +37,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable
|
||||
private int ticks = 0;
|
||||
private final int slot;
|
||||
|
||||
public ContainerMEPortableCell( final InventoryPlayer ip, final IPortableCell monitorable )
|
||||
public ContainerMEPortableCell( final PlayerInventory ip, final IPortableCell monitorable )
|
||||
{
|
||||
super( ip, monitorable, false );
|
||||
if( monitorable instanceof IInventorySlotAware )
|
||||
|
||||
@@ -21,9 +21,9 @@ package appeng.container.implementations;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -59,7 +59,7 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
private IGrid network;
|
||||
private int delay = 40;
|
||||
|
||||
public ContainerNetworkStatus( final InventoryPlayer ip, final INetworkTool te )
|
||||
public ContainerNetworkStatus( final PlayerInventory ip, final INetworkTool te )
|
||||
{
|
||||
super( ip, null, null );
|
||||
final IGridHost host = te.getGridHost();
|
||||
@@ -136,9 +136,9 @@ public class ContainerNetworkStatus extends AEBaseContainer
|
||||
|
||||
for( final Object c : this.listeners )
|
||||
{
|
||||
if( c instanceof EntityPlayer )
|
||||
if( c instanceof PlayerEntity )
|
||||
{
|
||||
NetworkHandler.instance().sendTo( piu, (EntityPlayerMP) c );
|
||||
NetworkHandler.instance().sendTo( piu, (PlayerEntityMP) c );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.implementations.guiobjects.INetworkTool;
|
||||
import appeng.container.AEBaseContainer;
|
||||
@@ -38,7 +38,7 @@ public class ContainerNetworkTool extends AEBaseContainer
|
||||
@GuiSync( 1 )
|
||||
public boolean facadeMode;
|
||||
|
||||
public ContainerNetworkTool( final InventoryPlayer ip, final INetworkTool te )
|
||||
public ContainerNetworkTool( final PlayerInventory ip, final INetworkTool te )
|
||||
{
|
||||
super( ip, null, null );
|
||||
this.toolInv = te;
|
||||
@@ -50,7 +50,7 @@ public class ContainerNetworkTool extends AEBaseContainer
|
||||
for( int x = 0; x < 3; x++ )
|
||||
{
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te
|
||||
.getInventory(), y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, this.getInventoryPlayer() ) ) );
|
||||
.getInventory(), y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, this.getPlayerInventory() ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ContainerNetworkTool extends AEBaseContainer
|
||||
|
||||
public void toggleFacadeMode()
|
||||
{
|
||||
final NBTTagCompound data = Platform.openNbtData( this.toolInv.getItemStack() );
|
||||
final CompoundNBT data = Platform.openNbtData( this.toolInv.getItemStack() );
|
||||
data.setBoolean( "hideFacades", !data.getBoolean( "hideFacades" ) );
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class ContainerNetworkTool extends AEBaseContainer
|
||||
|
||||
if( this.isValidContainer() )
|
||||
{
|
||||
final NBTTagCompound data = Platform.openNbtData( currentItem );
|
||||
final CompoundNBT data = Platform.openNbtData( currentItem );
|
||||
this.setFacadeMode( data.getBoolean( "hideFacades" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerEntityMP;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.inventory.InventoryCraftResult;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
@@ -35,7 +35,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -90,7 +90,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
@GuiSync( 96 )
|
||||
public boolean substitute = false;
|
||||
|
||||
public ContainerPatternTerm( final InventoryPlayer ip, final ITerminalHost monitorable )
|
||||
public ContainerPatternTerm( final PlayerInventory ip, final ITerminalHost monitorable )
|
||||
{
|
||||
super( ip, monitorable, false );
|
||||
this.patternTerminal = (PartPatternTerminal) monitorable;
|
||||
@@ -121,10 +121,10 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
this.addSlotToContainer(
|
||||
this.patternSlotIN = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.BLANK_PATTERN, patternInv, 0, 147, -72 - 9, this
|
||||
.getInventoryPlayer() ) );
|
||||
.getPlayerInventory() ) );
|
||||
this.addSlotToContainer(
|
||||
this.patternSlotOUT = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, patternInv, 1, 147, -72 + 34, this
|
||||
.getInventoryPlayer() ) );
|
||||
.getPlayerInventory() ) );
|
||||
|
||||
this.patternSlotOUT.setStackLimit( 1 );
|
||||
|
||||
@@ -246,7 +246,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
|
||||
// encode the slot.
|
||||
final NBTTagCompound encodedValue = new NBTTagCompound();
|
||||
final CompoundNBT encodedValue = new CompoundNBT();
|
||||
|
||||
final NBTTagList tagIn = new NBTTagList();
|
||||
final NBTTagList tagOut = new NBTTagList();
|
||||
@@ -344,7 +344,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
|
||||
private NBTBase createItemTag( final ItemStack i )
|
||||
{
|
||||
final NBTTagCompound c = new NBTTagCompound();
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
|
||||
if( !i.isEmpty() )
|
||||
{
|
||||
@@ -390,14 +390,14 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
|
||||
final IAEItemStack extracted = Platform.poweredExtraction( this.getPowerSource(), this.getCellInventory(), out, this.getActionSource() );
|
||||
final EntityPlayer p = this.getPlayerInv().player;
|
||||
final PlayerEntity p = this.getPlayerInv().player;
|
||||
|
||||
if( extracted != null )
|
||||
{
|
||||
inv.addItems( extracted.createItemStack() );
|
||||
if( p instanceof EntityPlayerMP )
|
||||
if( p instanceof PlayerEntityMP )
|
||||
{
|
||||
this.updateHeld( (EntityPlayerMP) p );
|
||||
this.updateHeld( (PlayerEntityMP) p );
|
||||
}
|
||||
this.detectAndSendChanges();
|
||||
return;
|
||||
@@ -455,9 +455,9 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
}
|
||||
|
||||
inv.addItems( is );
|
||||
if( p instanceof EntityPlayerMP )
|
||||
if( p instanceof PlayerEntityMP )
|
||||
{
|
||||
this.updateHeld( (EntityPlayerMP) p );
|
||||
this.updateHeld( (PlayerEntityMP) p );
|
||||
}
|
||||
this.detectAndSendChanges();
|
||||
}
|
||||
@@ -519,9 +519,9 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
listener.sendSlotContents( this, slot.slotNumber, slot.getStack() );
|
||||
}
|
||||
}
|
||||
if( listener instanceof EntityPlayerMP )
|
||||
if( listener instanceof PlayerEntityMP )
|
||||
{
|
||||
( (EntityPlayerMP) listener ).isChangingQuantityOnly = false;
|
||||
( (PlayerEntityMP) listener ).isChangingQuantityOnly = false;
|
||||
}
|
||||
}
|
||||
this.detectAndSendChanges();
|
||||
@@ -554,7 +554,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
|
||||
{
|
||||
if( name.equals( "player" ) )
|
||||
{
|
||||
return new PlayerInvWrapper( this.getInventoryPlayer() );
|
||||
return new PlayerInvWrapper( this.getPlayerInventory() );
|
||||
}
|
||||
return this.getPatternTerminal().getInventoryByName( name );
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.parts.IPart;
|
||||
@@ -39,25 +39,25 @@ public class ContainerPriority extends AEBaseContainer
|
||||
|
||||
private final IPriorityHost priHost;
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
private GuiTextField textField;
|
||||
@GuiSync( 2 )
|
||||
public long PriorityValue = -1;
|
||||
|
||||
public ContainerPriority( final InventoryPlayer ip, final IPriorityHost te )
|
||||
public ContainerPriority( final PlayerInventory ip, final IPriorityHost te )
|
||||
{
|
||||
super( ip, (TileEntity) ( te instanceof TileEntity ? te : null ), (IPart) ( te instanceof IPart ? te : null ) );
|
||||
this.priHost = te;
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public void setTextField( final GuiTextField level )
|
||||
{
|
||||
this.textField = level;
|
||||
this.textField.setText( String.valueOf( this.PriorityValue ) );
|
||||
}
|
||||
|
||||
public void setPriority( final int newValue, final EntityPlayer player )
|
||||
public void setPriority( final int newValue, final PlayerEntity player )
|
||||
{
|
||||
this.priHost.setPriority( newValue );
|
||||
this.PriorityValue = newValue;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
@@ -29,12 +29,12 @@ import appeng.tile.qnb.TileQuantumBridge;
|
||||
public class ContainerQNB extends AEBaseContainer
|
||||
{
|
||||
|
||||
public ContainerQNB( final InventoryPlayer ip, final TileQuantumBridge quantumBridge )
|
||||
public ContainerQNB( final PlayerInventory ip, final TileQuantumBridge quantumBridge )
|
||||
{
|
||||
super( ip, quantumBridge, null );
|
||||
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.QE_SINGULARITY, quantumBridge
|
||||
.getInternalInventory(), 0, 80, 37, this.getInventoryPlayer() ) ).setStackLimit( 1 ) );
|
||||
.getInternalInventory(), 0, 80, 37, this.getPlayerInventory() ) ).setStackLimit( 1 ) );
|
||||
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ package appeng.container.implementations;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -46,7 +46,7 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
private final IItemHandler inSlot = new AppEngInternalInventory( null, 1, 1 );
|
||||
private String myName = "";
|
||||
|
||||
public ContainerQuartzKnife( final InventoryPlayer ip, final QuartzKnifeObj te )
|
||||
public ContainerQuartzKnife( final PlayerInventory ip, final QuartzKnifeObj te )
|
||||
{
|
||||
super( ip, null, null );
|
||||
this.toolInv = te;
|
||||
@@ -92,11 +92,11 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed( final EntityPlayer par1EntityPlayer )
|
||||
public void onContainerClosed( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
if( this.inSlot.getStackInSlot( 0 ) != null )
|
||||
{
|
||||
par1EntityPlayer.dropItem( this.inSlot.getStackInSlot( 0 ), false );
|
||||
par1PlayerEntity.dropItem( this.inSlot.getStackInSlot( 0 ), false );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class ContainerQuartzKnife extends AEBaseContainer
|
||||
{
|
||||
return AEApi.instance().definitions().materials().namePress().maybeStack( 1 ).map( namePressStack ->
|
||||
{
|
||||
final NBTTagCompound compound = Platform.openNbtData( namePressStack );
|
||||
final CompoundNBT compound = Platform.openNbtData( namePressStack );
|
||||
compound.setString( "InscribeName", ContainerQuartzKnife.this.myName );
|
||||
|
||||
return namePressStack;
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IContainerListener;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -54,7 +54,7 @@ public class ContainerSecurityStation extends ContainerMEMonitorable implements
|
||||
@GuiSync( 0 )
|
||||
public int permissionMode = 0;
|
||||
|
||||
public ContainerSecurityStation( final InventoryPlayer ip, final ITerminalHost monitorable )
|
||||
public ContainerSecurityStation( final PlayerInventory ip, final ITerminalHost monitorable )
|
||||
{
|
||||
super( ip, monitorable, false );
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ContainerSecurityStation extends ContainerMEMonitorable implements
|
||||
this.bindPlayerInventory( ip, 0, 0 );
|
||||
}
|
||||
|
||||
public void toggleSetting( final String value, final EntityPlayer player )
|
||||
public void toggleSetting( final String value, final PlayerEntity player )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -120,7 +120,7 @@ public class ContainerSecurityStation extends ContainerMEMonitorable implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed( final EntityPlayer player )
|
||||
public void onContainerClosed( final PlayerEntity player )
|
||||
{
|
||||
super.onContainerClosed( player );
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.slot.SlotNormal;
|
||||
@@ -32,7 +32,7 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
|
||||
private final TileSkyChest chest;
|
||||
|
||||
public ContainerSkyChest( final InventoryPlayer ip, final TileSkyChest chest )
|
||||
public ContainerSkyChest( final PlayerInventory ip, final TileSkyChest chest )
|
||||
{
|
||||
super( ip, chest, null );
|
||||
this.chest = chest;
|
||||
@@ -51,9 +51,9 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed( final EntityPlayer par1EntityPlayer )
|
||||
public void onContainerClosed( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
super.onContainerClosed( par1EntityPlayer );
|
||||
this.chest.closeInventory( par1EntityPlayer );
|
||||
super.onContainerClosed( par1PlayerEntity );
|
||||
this.chest.closeInventory( par1PlayerEntity );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGrid;
|
||||
@@ -56,7 +56,7 @@ public class ContainerSpatialIOPort extends AEBaseContainer
|
||||
@GuiSync( 33 )
|
||||
public int zSize;
|
||||
|
||||
public ContainerSpatialIOPort( final InventoryPlayer ip, final TileSpatialIOPort spatialIOPort )
|
||||
public ContainerSpatialIOPort( final PlayerInventory ip, final TileSpatialIOPort spatialIOPort )
|
||||
{
|
||||
super( ip, spatialIOPort, null );
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ContainerSpatialIOPort extends AEBaseContainer
|
||||
}
|
||||
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS, spatialIOPort
|
||||
.getInternalInventory(), 0, 52, 48, this.getInventoryPlayer() ) );
|
||||
.getInternalInventory(), 0, 52, 48, this.getPlayerInventory() ) );
|
||||
this.addSlotToContainer(
|
||||
new SlotOutput( spatialIOPort.getInternalInventory(), 1, 113, 48, SlotRestrictedInput.PlacableItemType.SPATIAL_STORAGE_CELLS.IIcon ) );
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.container.implementations;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
@GuiSync( 4 )
|
||||
public StorageFilter storageFilter = StorageFilter.EXTRACTABLE_ONLY;
|
||||
|
||||
public ContainerStorageBus( final InventoryPlayer ip, final PartStorageBus te )
|
||||
public ContainerStorageBus( final PlayerInventory ip, final PartStorageBus te )
|
||||
{
|
||||
super( ip, te );
|
||||
this.storageBus = te;
|
||||
@@ -92,19 +92,19 @@ public class ContainerStorageBus extends ContainerUpgradeable
|
||||
}
|
||||
|
||||
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187, 8 + 18 * 4, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -66,7 +66,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
private int tbSlot;
|
||||
private NetworkToolViewer tbInventory;
|
||||
|
||||
public ContainerUpgradeable( final InventoryPlayer ip, final IUpgradeableHost te )
|
||||
public ContainerUpgradeable( final PlayerInventory ip, final IUpgradeableHost te )
|
||||
{
|
||||
super( ip, (TileEntity) ( te instanceof TileEntity ? te : null ), (IPart) ( te instanceof IPart ? te : null ) );
|
||||
this.upgradeable = te;
|
||||
@@ -114,7 +114,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
for( int u = 0; u < 3; u++ )
|
||||
{
|
||||
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, this.tbInventory
|
||||
.getInternalInventory(), u + v * 3, 186 + u * 18, this.getHeight() - 82 + v * 18, this.getInventoryPlayer() ) ).setPlayerSide() );
|
||||
.getInternalInventory(), u + v * 3, 186 + u * 18, this.getHeight() - 82 + v * 18, this.getPlayerInventory() ) ).setPlayerSide() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,25 +163,25 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
if( this.availableUpgrades() > 0 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
if( this.availableUpgrades() > 1 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
if( this.availableUpgrades() > 2 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
if( this.availableUpgrades() > 3 )
|
||||
{
|
||||
this.addSlotToContainer(
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getInventoryPlayer() ) )
|
||||
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187, 8 + 18 * 3, this.getPlayerInventory() ) )
|
||||
.setNotDraggable() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
@@ -37,13 +37,13 @@ public class ContainerVibrationChamber extends AEBaseContainer implements IProgr
|
||||
@GuiSync( 1 )
|
||||
public int remainingBurnTime = 0;
|
||||
|
||||
public ContainerVibrationChamber( final InventoryPlayer ip, final TileVibrationChamber vibrationChamber )
|
||||
public ContainerVibrationChamber( final PlayerInventory ip, final TileVibrationChamber vibrationChamber )
|
||||
{
|
||||
super( ip, vibrationChamber, null );
|
||||
this.vibrationChamber = vibrationChamber;
|
||||
|
||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.FUEL, vibrationChamber.getInternalInventory(), 0, 80, 37, this
|
||||
.getInventoryPlayer() ) );
|
||||
.getPlayerInventory() ) );
|
||||
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
@@ -38,13 +38,13 @@ public class ContainerWireless extends AEBaseContainer
|
||||
@GuiSync( 2 )
|
||||
public long drain = 0;
|
||||
|
||||
public ContainerWireless( final InventoryPlayer ip, final TileWireless te )
|
||||
public ContainerWireless( final PlayerInventory ip, final TileWireless te )
|
||||
{
|
||||
super( ip, te, null );
|
||||
this.wirelessTerminal = te;
|
||||
|
||||
this.addSlotToContainer( this.boosterSlot = new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.RANGE_BOOSTER, this.wirelessTerminal
|
||||
.getInternalInventory(), 0, 80, 47, this.getInventoryPlayer() ) );
|
||||
.getInternalInventory(), 0, 80, 47, this.getPlayerInventory() ) );
|
||||
|
||||
this.bindPlayerInventory( ip, 0, 166 - /* height of player inventory */82 );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.implementations;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
@@ -32,7 +32,7 @@ public class ContainerWirelessTerm extends ContainerMEPortableCell
|
||||
|
||||
private final WirelessTerminalGuiObject wirelessTerminalGUIObject;
|
||||
|
||||
public ContainerWirelessTerm( final InventoryPlayer ip, final WirelessTerminalGuiObject gui )
|
||||
public ContainerWirelessTerm( final PlayerInventory ip, final WirelessTerminalGuiObject gui )
|
||||
{
|
||||
super( ip, gui );
|
||||
this.wirelessTerminalGUIObject = gui;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
@@ -42,17 +42,17 @@ public class AppEngCraftingSlot extends AppEngSlot
|
||||
/**
|
||||
* The player that is using the GUI where this slot resides.
|
||||
*/
|
||||
private final EntityPlayer thePlayer;
|
||||
private final PlayerEntity thePlayer;
|
||||
|
||||
/**
|
||||
* The number of items that have been crafted so far. Gets passed to ItemStack.onCrafting before being reset.
|
||||
*/
|
||||
private int amountCrafted;
|
||||
|
||||
public AppEngCraftingSlot( final EntityPlayer par1EntityPlayer, final IItemHandler par2IInventory, final IItemHandler par3IInventory, final int par4, final int par5, final int par6 )
|
||||
public AppEngCraftingSlot( final PlayerEntity par1PlayerEntity, final IItemHandler par2IInventory, final IItemHandler par3IInventory, final int par4, final int par5, final int par6 )
|
||||
{
|
||||
super( par3IInventory, par4, par5, par6 );
|
||||
this.thePlayer = par1EntityPlayer;
|
||||
this.thePlayer = par1PlayerEntity;
|
||||
this.craftMatrix = par2IInventory;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class AppEngCraftingSlot extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onTake( final EntityPlayer playerIn, final ItemStack stack )
|
||||
public ItemStack onTake( final PlayerEntity playerIn, final ItemStack stack )
|
||||
{
|
||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, new WrapperInvItemHandler( this.craftMatrix ) );
|
||||
this.onCrafting( stack );
|
||||
|
||||
@@ -21,13 +21,13 @@ package appeng.container.slot;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryBasic;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.container.AEBaseContainer;
|
||||
@@ -153,7 +153,7 @@ public class AppEngSlot extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
if( this.isSlotEnabled() )
|
||||
{
|
||||
@@ -176,7 +176,7 @@ public class AppEngSlot extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return this.isSlotEnabled();
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.container.slot;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -42,7 +42,7 @@ public class NullSlot extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onTake( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
|
||||
public ItemStack onTake( final PlayerEntity par1PlayerEntity, final ItemStack par2ItemStack )
|
||||
{
|
||||
return par2ItemStack;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class NullSlot extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class OptionalSlotRestrictedInput extends SlotRestrictedInput
|
||||
private final int groupNum;
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public OptionalSlotRestrictedInput( final PlacableItemType valid, final IItemHandler i, final IOptionalSlotHost host, final int slotIndex, final int x, final int y, final int grpNum, final InventoryPlayer invPlayer )
|
||||
public OptionalSlotRestrictedInput( final PlacableItemType valid, final IItemHandler i, final IOptionalSlotHost host, final int slotIndex, final int x, final int y, final int grpNum, final PlayerInventory invPlayer )
|
||||
{
|
||||
super( valid, i, slotIndex, x, y, invPlayer );
|
||||
this.groupNum = grpNum;
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -68,7 +68,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
private final IStorageMonitorable storage;
|
||||
private final IContainerCraftingPacket container;
|
||||
|
||||
public SlotCraftingTerm( final EntityPlayer player, final IActionSource mySrc, final IEnergySource energySrc, final IStorageMonitorable storage, final IItemHandler cMatrix, final IItemHandler secondMatrix, final IItemHandler output, final int x, final int y, final IContainerCraftingPacket ccp )
|
||||
public SlotCraftingTerm( final PlayerEntity player, final IActionSource mySrc, final IEnergySource energySrc, final IStorageMonitorable storage, final IItemHandler cMatrix, final IItemHandler secondMatrix, final IItemHandler output, final int x, final int y, final IContainerCraftingPacket ccp )
|
||||
{
|
||||
super( player, cMatrix, output, 0, x, y );
|
||||
this.energySrc = energySrc;
|
||||
@@ -85,18 +85,18 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onTake( final EntityPlayer p, final ItemStack is )
|
||||
public ItemStack onTake( final PlayerEntity p, final ItemStack is )
|
||||
{
|
||||
return is;
|
||||
}
|
||||
|
||||
public void doClick( final InventoryAction action, final EntityPlayer who )
|
||||
public void doClick( final InventoryAction action, final PlayerEntity who )
|
||||
{
|
||||
if( this.getStack().isEmpty() )
|
||||
{
|
||||
@@ -199,7 +199,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
return maxTimesToCraft;
|
||||
}
|
||||
|
||||
private ItemStack craftItem( final EntityPlayer p, final ItemStack request, final IMEMonitor<IAEItemStack> inv, final IItemList all )
|
||||
private ItemStack craftItem( final PlayerEntity p, final ItemStack request, final IMEMonitor<IAEItemStack> inv, final IItemList all )
|
||||
{
|
||||
// update crafting matrix...
|
||||
ItemStack is = this.getStack();
|
||||
@@ -281,17 +281,17 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
private boolean preCraft( final EntityPlayer p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
|
||||
private boolean preCraft( final PlayerEntity p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private void makeItem( final EntityPlayer p, final ItemStack is )
|
||||
private void makeItem( final PlayerEntity p, final ItemStack is )
|
||||
{
|
||||
super.onTake( p, is );
|
||||
}
|
||||
|
||||
private void postCraft( final EntityPlayer p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
|
||||
private void postCraft( final PlayerEntity p, final IMEMonitor<IAEItemStack> inv, final ItemStack[] set, final ItemStack result )
|
||||
{
|
||||
final List<ItemStack> drops = new ArrayList<>();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SlotDisabled extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class SlotFake extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onTake( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
|
||||
public ItemStack onTake( final PlayerEntity par1PlayerEntity, final ItemStack par2ItemStack )
|
||||
{
|
||||
return par2ItemStack;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class SlotFake extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SlotInaccessible extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.container.slot;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class SlotPatternTerm extends SlotCraftingTerm
|
||||
private final int groupNum;
|
||||
private final IOptionalSlotHost host;
|
||||
|
||||
public SlotPatternTerm( final EntityPlayer player, final IActionSource mySrc, final IEnergySource energySrc, final IStorageMonitorable storage, final IItemHandler cMatrix, final IItemHandler secondMatrix, final IItemHandler output, final int x, final int y, final IOptionalSlotHost h, final int groupNumber, final IContainerCraftingPacket c )
|
||||
public SlotPatternTerm( final PlayerEntity player, final IActionSource mySrc, final IEnergySource energySrc, final IStorageMonitorable storage, final IItemHandler cMatrix, final IItemHandler secondMatrix, final IItemHandler output, final int x, final int y, final IOptionalSlotHost h, final int groupNumber, final IContainerCraftingPacket c )
|
||||
{
|
||||
super( player, mySrc, energySrc, storage, cMatrix, secondMatrix, output, x, y, c );
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
package appeng.container.slot;
|
||||
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
@@ -55,11 +55,11 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
{
|
||||
|
||||
private final PlacableItemType which;
|
||||
private final InventoryPlayer p;
|
||||
private final PlayerInventory p;
|
||||
private boolean allowEdit = true;
|
||||
private int stackLimit = -1;
|
||||
|
||||
public SlotRestrictedInput( final PlacableItemType valid, final IItemHandler i, final int slotIndex, final int x, final int y, final InventoryPlayer p )
|
||||
public SlotRestrictedInput( final PlacableItemType valid, final IItemHandler i, final int slotIndex, final int x, final int y, final PlayerInventory p )
|
||||
{
|
||||
super( i, slotIndex, x, y );
|
||||
this.which = valid;
|
||||
@@ -234,7 +234,7 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
|
||||
{
|
||||
return this.isAllowEdit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user