1.15 port

This commit is contained in:
yueh
2020-05-18 14:02:45 +02:00
parent 0ea86c939c
commit 16d6d55d7f
630 changed files with 4211 additions and 12664 deletions
@@ -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;