1.15 port
This commit is contained in:
@@ -25,8 +25,8 @@ import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
@@ -46,16 +46,16 @@ public abstract class AEBaseInvTile extends AEBaseTile implements IAEAppEngInven
|
||||
{
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
final IItemHandler inv = this.getInternalInventory();
|
||||
if( inv != EmptyHandler.INSTANCE )
|
||||
{
|
||||
final NBTTagCompound opt = data.getCompoundTag( "inv" );
|
||||
final CompoundNBT opt = data.getCompoundTag( "inv" );
|
||||
for( int x = 0; x < inv.getSlots(); x++ )
|
||||
{
|
||||
final NBTTagCompound item = opt.getCompoundTag( "item" + x );
|
||||
final CompoundNBT item = opt.getCompoundTag( "item" + x );
|
||||
ItemHandlerUtil.setStackInSlot( inv, x, new ItemStack( item ) );
|
||||
}
|
||||
}
|
||||
@@ -64,16 +64,16 @@ public abstract class AEBaseInvTile extends AEBaseTile implements IAEAppEngInven
|
||||
public abstract @Nonnull IItemHandler getInternalInventory();
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
final IItemHandler inv = this.getInternalInventory();
|
||||
if( inv != EmptyHandler.INSTANCE )
|
||||
{
|
||||
final NBTTagCompound opt = new NBTTagCompound();
|
||||
final CompoundNBT opt = new CompoundNBT();
|
||||
for( int x = 0; x < inv.getSlots(); x++ )
|
||||
{
|
||||
final NBTTagCompound item = new NBTTagCompound();
|
||||
final CompoundNBT item = new CompoundNBT();
|
||||
final ItemStack is = inv.getStackInSlot( x );
|
||||
if( !is.isEmpty() )
|
||||
{
|
||||
@@ -111,16 +111,16 @@ public abstract class AEBaseInvTile extends AEBaseTile implements IAEAppEngInven
|
||||
{
|
||||
return new TextComponentString( this.getCustomInventoryName() );
|
||||
}
|
||||
return new TextComponentTranslation( this.getBlockType().getUnlocalizedName() );
|
||||
return new TextComponentTranslation( this.getBlockType().getTranslationKey() );
|
||||
}
|
||||
|
||||
protected @Nonnull IItemHandler getItemHandlerForSide( @Nonnull EnumFacing side )
|
||||
protected @Nonnull IItemHandler getItemHandlerForSide( @Nonnull Direction side )
|
||||
{
|
||||
return this.getInternalInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capability, Direction facing )
|
||||
{
|
||||
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
||||
{
|
||||
@@ -138,7 +138,7 @@ public abstract class AEBaseInvTile extends AEBaseTile implements IAEAppEngInven
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable Direction facing )
|
||||
{
|
||||
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
||||
{
|
||||
|
||||
@@ -31,14 +31,14 @@ import javax.annotation.Nullable;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -66,13 +66,13 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
private int renderFragment = 0;
|
||||
@Nullable
|
||||
private String customName;
|
||||
private EnumFacing forward = null;
|
||||
private EnumFacing up = null;
|
||||
private IBlockState state;
|
||||
private Direction forward = null;
|
||||
private Direction up = null;
|
||||
private BlockState state;
|
||||
private boolean markDirtyQueued = false;
|
||||
|
||||
@Override
|
||||
public boolean shouldRefresh( final World world, final BlockPos pos, final IBlockState oldState, final IBlockState newSate )
|
||||
public boolean shouldRefresh( final World world, final BlockPos pos, final BlockState oldState, final BlockState newSate )
|
||||
{
|
||||
return newSate.getBlock() != oldState.getBlock(); // state doesn't change tile entities in AE2.
|
||||
}
|
||||
@@ -110,22 +110,12 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
return src.stack( 1 );
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public IBlockState getBlockState()
|
||||
{
|
||||
if( this.state == null )
|
||||
{
|
||||
this.state = this.world.getBlockState( this.getPos() );
|
||||
}
|
||||
return this.state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void read( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
super.read( data );
|
||||
|
||||
if( data.hasKey( "customName" ) )
|
||||
if( data.contains( "customName" ) )
|
||||
{
|
||||
this.customName = data.getString( "customName" );
|
||||
}
|
||||
@@ -138,8 +128,8 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
{
|
||||
if( this.canBeRotated() )
|
||||
{
|
||||
this.forward = EnumFacing.valueOf( data.getString( "forward" ) );
|
||||
this.up = EnumFacing.valueOf( data.getString( "up" ) );
|
||||
this.forward = Direction.valueOf( data.getString( "forward" ) );
|
||||
this.up = Direction.valueOf( data.getString( "up" ) );
|
||||
}
|
||||
}
|
||||
catch( final IllegalArgumentException ignored )
|
||||
@@ -148,19 +138,19 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT write( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
super.write( data );
|
||||
|
||||
if( this.canBeRotated() )
|
||||
{
|
||||
data.setString( "forward", this.getForward().name() );
|
||||
data.setString( "up", this.getUp().name() );
|
||||
data.putString( "forward", this.getForward().name() );
|
||||
data.putString( "up", this.getUp().name() );
|
||||
}
|
||||
|
||||
if( this.customName != null )
|
||||
{
|
||||
data.setString( "customName", this.customName );
|
||||
data.putString( "customName", this.customName );
|
||||
}
|
||||
|
||||
return data;
|
||||
@@ -190,9 +180,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
* This builds a tag with the actual data that should be sent to the client for update syncs.
|
||||
* If the tile entity doesn't need update syncs, it returns null.
|
||||
*/
|
||||
private NBTTagCompound writeUpdateData()
|
||||
private CompoundNBT writeUpdateData()
|
||||
{
|
||||
final NBTTagCompound data = new NBTTagCompound();
|
||||
final CompoundNBT data = new CompoundNBT();
|
||||
|
||||
final ByteBuf stream = Unpooled.buffer();
|
||||
|
||||
@@ -210,7 +200,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
}
|
||||
|
||||
stream.capacity( stream.readableBytes() );
|
||||
data.setByteArray( "X", stream.array() );
|
||||
data.putByteArray( "X", stream.array() );
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -242,18 +232,18 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
* Handles tile entites that are being sent to the client as part of a full chunk.
|
||||
*/
|
||||
@Override
|
||||
public NBTTagCompound getUpdateTag()
|
||||
public CompoundNBT getUpdateTag()
|
||||
{
|
||||
final NBTTagCompound data = this.writeUpdateData();
|
||||
final CompoundNBT data = this.writeUpdateData();
|
||||
|
||||
if( data == null )
|
||||
{
|
||||
return new NBTTagCompound();
|
||||
return new CompoundNBT();
|
||||
}
|
||||
|
||||
data.setInteger( "x", this.pos.getX() );
|
||||
data.setInteger( "y", this.pos.getY() );
|
||||
data.setInteger( "z", this.pos.getZ() );
|
||||
data.putInt( "x", this.pos.getX() );
|
||||
data.putInt( "y", this.pos.getY() );
|
||||
data.putInt( "z", this.pos.getZ() );
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -261,7 +251,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
* Handles tile entites that are being received by the client as part of a full chunk.
|
||||
*/
|
||||
@Override
|
||||
public void handleUpdateTag( NBTTagCompound tag )
|
||||
public void handleUpdateTag( CompoundNBT tag )
|
||||
{
|
||||
final ByteBuf stream = Unpooled.copiedBuffer( tag.getByteArray( "X" ) );
|
||||
|
||||
@@ -275,12 +265,12 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
{
|
||||
if( this.canBeRotated() )
|
||||
{
|
||||
final EnumFacing old_Forward = this.forward;
|
||||
final EnumFacing old_Up = this.up;
|
||||
final Direction old_Forward = this.forward;
|
||||
final Direction old_Up = this.up;
|
||||
|
||||
final byte orientation = data.readByte();
|
||||
this.forward = EnumFacing.VALUES[orientation & 0x7];
|
||||
this.up = EnumFacing.VALUES[orientation >> 3];
|
||||
this.forward = Direction.values()[orientation & 0x7];
|
||||
this.up = Direction.values()[orientation >> 3];
|
||||
|
||||
return this.forward != old_Forward || this.up != old_Up;
|
||||
}
|
||||
@@ -325,27 +315,27 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getForward()
|
||||
public Direction getForward()
|
||||
{
|
||||
if( this.forward == null )
|
||||
{
|
||||
return EnumFacing.NORTH;
|
||||
return Direction.NORTH;
|
||||
}
|
||||
return this.forward;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getUp()
|
||||
public Direction getUp()
|
||||
{
|
||||
if( this.up == null )
|
||||
{
|
||||
return EnumFacing.UP;
|
||||
return Direction.UP;
|
||||
}
|
||||
return this.up;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
this.forward = inForward;
|
||||
this.up = inUp;
|
||||
@@ -353,11 +343,11 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
Platform.notifyBlocksOfNeighbors( this.world, this.pos );
|
||||
}
|
||||
|
||||
public void onPlacement( final ItemStack stack, final EntityPlayer player, final EnumFacing side )
|
||||
public void onPlacement( final ItemStack stack, final PlayerEntity player, final Direction side )
|
||||
{
|
||||
if( stack.hasTagCompound() )
|
||||
if( stack.hasTag() )
|
||||
{
|
||||
this.uploadSettings( SettingsFrom.DISMANTLE_ITEM, stack.getTagCompound() );
|
||||
this.uploadSettings( SettingsFrom.DISMANTLE_ITEM, stack.getTag() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,7 +357,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
* @param from source of settings
|
||||
* @param compound compound of source
|
||||
*/
|
||||
public void uploadSettings( final SettingsFrom from, final NBTTagCompound compound )
|
||||
public void uploadSettings( final SettingsFrom from, final CompoundNBT compound )
|
||||
{
|
||||
if( compound != null && this instanceof IConfigurableObject )
|
||||
{
|
||||
@@ -381,7 +371,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
if( this instanceof IPriorityHost )
|
||||
{
|
||||
final IPriorityHost pHost = (IPriorityHost) this;
|
||||
pHost.setPriority( compound.getInteger( "priority" ) );
|
||||
pHost.setPriority( compound.getInt( "priority" ) );
|
||||
}
|
||||
|
||||
if( this instanceof ISegmentedInventory )
|
||||
@@ -391,7 +381,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
{
|
||||
final AppEngInternalAEInventory target = (AppEngInternalAEInventory) inv;
|
||||
final AppEngInternalAEInventory tmp = new AppEngInternalAEInventory( null, target.getSlots() );
|
||||
tmp.readFromNBT( compound, "config" );
|
||||
tmp.read( compound, "config" );
|
||||
for( int x = 0; x < tmp.getSlots(); x++ )
|
||||
{
|
||||
target.setStackInSlot( x, tmp.getStackInSlot( x ) );
|
||||
@@ -427,13 +417,13 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
*
|
||||
* @return compound of source
|
||||
*/
|
||||
public NBTTagCompound downloadSettings( final SettingsFrom from )
|
||||
public CompoundNBT downloadSettings( final SettingsFrom from )
|
||||
{
|
||||
final NBTTagCompound output = new NBTTagCompound();
|
||||
final CompoundNBT output = new CompoundNBT();
|
||||
|
||||
if( this.hasCustomInventoryName() )
|
||||
{
|
||||
final NBTTagCompound dsp = new NBTTagCompound();
|
||||
final CompoundNBT dsp = new CompoundNBT();
|
||||
dsp.setString( "Name", this.getCustomInventoryName() );
|
||||
output.setTag( "display", dsp );
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ import java.util.Optional;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.implementations.tiles.IColorableTile;
|
||||
@@ -41,10 +41,10 @@ import appeng.util.item.AEItemStack;
|
||||
public class TileCraftingMonitorTile extends TileCraftingTile implements IColorableTile
|
||||
{
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
private Integer dspList;
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
private boolean updateList;
|
||||
|
||||
private IAEItemStack dspPlay;
|
||||
@@ -90,7 +90,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
if( data.hasKey( "paintedColor" ) )
|
||||
@@ -100,7 +100,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setByte( "paintedColor", (byte) this.paintedColor.ordinal() );
|
||||
@@ -154,7 +154,7 @@ public class TileCraftingMonitorTile extends TileCraftingTile implements IColora
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock( final EnumFacing side, final AEColor newPaintedColor, final EntityPlayer who )
|
||||
public boolean recolourBlock( final Direction side, final AEColor newPaintedColor, final PlayerEntity who )
|
||||
{
|
||||
if( this.paintedColor == newPaintedColor )
|
||||
{
|
||||
|
||||
@@ -25,11 +25,11 @@ import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -60,14 +60,14 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
{
|
||||
|
||||
private final CraftingCPUCalculator calc = new CraftingCPUCalculator( this );
|
||||
private NBTTagCompound previousState = null;
|
||||
private CompoundNBT previousState = null;
|
||||
private boolean isCoreBlock = false;
|
||||
private CraftingCPUCluster cluster;
|
||||
|
||||
public TileCraftingTile()
|
||||
{
|
||||
this.getProxy().setFlags( GridFlags.MULTIBLOCK, GridFlags.REQUIRE_CHANNEL );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,12 +160,12 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
power = this.getProxy().isActive();
|
||||
}
|
||||
|
||||
final IBlockState current = this.world.getBlockState( this.pos );
|
||||
final BlockState current = this.world.getBlockState( this.pos );
|
||||
|
||||
// The tile might try to update while being destroyed
|
||||
if( current.getBlock() instanceof BlockCraftingUnit )
|
||||
{
|
||||
final IBlockState newState = current.withProperty( BlockCraftingUnit.POWERED, power ).withProperty( BlockCraftingUnit.FORMED, formed );
|
||||
final BlockState newState = current.withProperty( BlockCraftingUnit.POWERED, power ).withProperty( BlockCraftingUnit.FORMED, formed );
|
||||
|
||||
if( current != newState )
|
||||
{
|
||||
@@ -179,11 +179,11 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
{
|
||||
if( formed )
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.allOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.allOf( Direction.class ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setBoolean( "core", this.isCoreBlock() );
|
||||
@@ -210,7 +210,7 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.setCoreBlock( data.getBoolean( "core" ) );
|
||||
@@ -372,12 +372,12 @@ public class TileCraftingTile extends AENetworkTile implements IAEMultiBlock, IP
|
||||
this.isCoreBlock = isCoreBlock;
|
||||
}
|
||||
|
||||
public NBTTagCompound getPreviousState()
|
||||
public CompoundNBT getPreviousState()
|
||||
{
|
||||
return this.previousState;
|
||||
}
|
||||
|
||||
public void setPreviousState( final NBTTagCompound previousState )
|
||||
public void setPreviousState( final CompoundNBT previousState )
|
||||
{
|
||||
this.previousState = previousState;
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@@ -115,7 +115,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table, final EnumFacing where )
|
||||
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table, final Direction where )
|
||||
{
|
||||
if( this.myPattern.isEmpty() )
|
||||
{
|
||||
@@ -213,7 +213,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
if( this.forcePlan && this.myPlan != null )
|
||||
@@ -221,7 +221,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
final ItemStack pattern = this.myPlan.getPattern();
|
||||
if( !pattern.isEmpty() )
|
||||
{
|
||||
final NBTTagCompound compound = new NBTTagCompound();
|
||||
final CompoundNBT compound = new CompoundNBT();
|
||||
pattern.writeToNBT( compound );
|
||||
data.setTag( "myPlan", compound );
|
||||
data.setInteger( "pushDirection", this.pushDirection.ordinal() );
|
||||
@@ -234,7 +234,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
if( data.hasKey( "myPlan" ) )
|
||||
@@ -346,7 +346,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( EnumFacing side )
|
||||
protected IItemHandler getItemHandlerForSide( Direction side )
|
||||
{
|
||||
return this.gridInvExt;
|
||||
}
|
||||
@@ -536,7 +536,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
{
|
||||
if( this.pushDirection == AEPartLocation.INTERNAL )
|
||||
{
|
||||
for( final EnumFacing d : EnumFacing.VALUES )
|
||||
for( final Direction d : Direction.VALUES )
|
||||
{
|
||||
output = this.pushTo( output, d );
|
||||
}
|
||||
@@ -555,7 +555,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
this.gridInv.setStackInSlot( 9, output );
|
||||
}
|
||||
|
||||
private ItemStack pushTo( ItemStack output, final EnumFacing d )
|
||||
private ItemStack pushTo( ItemStack output, final Direction d )
|
||||
{
|
||||
if( output.isEmpty() )
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.tile.grid;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
@@ -35,14 +35,14 @@ public abstract class AENetworkInvTile extends AEBaseInvTile implements IActionH
|
||||
private final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.getProxy().readFromNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.getProxy().writeToNBT( data );
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.tile.grid;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
@@ -37,14 +37,14 @@ public abstract class AENetworkPowerTile extends AEBasePoweredTile implements IA
|
||||
private final AENetworkProxy gridProxy = new AENetworkProxy( this, "proxy", this.getItemFromTile( this ), true );
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.getProxy().readFromNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.getProxy().writeToNBT( data );
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.tile.grid;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
@@ -37,14 +37,14 @@ public class AENetworkTile extends AEBaseTile implements IActionHost, IGridProxy
|
||||
private final AENetworkProxy gridProxy = this.createProxy();
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.getProxy().readFromNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.getProxy().writeToNBT( data );
|
||||
|
||||
@@ -25,10 +25,10 @@ import java.util.List;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -80,7 +80,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, ITickable
|
||||
return null;
|
||||
}
|
||||
|
||||
final EnumFacing grinder = this.getUp().getOpposite();
|
||||
final Direction grinder = this.getUp().getOpposite();
|
||||
final TileEntity te = this.world.getTileEntity( this.pos.offset( grinder ) );
|
||||
if( te instanceof ICrankable )
|
||||
{
|
||||
@@ -105,10 +105,10 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, ITickable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
final IBlockState state = this.world.getBlockState( this.pos );
|
||||
final BlockState state = this.world.getBlockState( this.pos );
|
||||
this.getBlockType().neighborChanged( state, this.world, this.pos, state.getBlock(), this.pos );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ package appeng.tile.grindstone;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.RangedWrapper;
|
||||
|
||||
@@ -48,10 +48,10 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
|
||||
private int points;
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
final IBlockState state = this.world.getBlockState( this.pos );
|
||||
final BlockState state = this.world.getBlockState( this.pos );
|
||||
this.getBlockType().neighborChanged( state, this.world, this.pos, state.getBlock(), this.pos );
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( EnumFacing side )
|
||||
protected IItemHandler getItemHandlerForSide( Direction side )
|
||||
{
|
||||
return this.invExt;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCrankAttach( final EnumFacing directionToCrank )
|
||||
public boolean canCrankAttach( final Direction directionToCrank )
|
||||
{
|
||||
return this.getUp() == directionToCrank;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Iterator;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
@@ -66,27 +66,27 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
|
||||
return this.inv[var1];
|
||||
}
|
||||
|
||||
public void writeToNBT( final NBTTagCompound data, final String name )
|
||||
public void writeToNBT( final CompoundNBT data, final String name )
|
||||
{
|
||||
final NBTTagCompound c = new NBTTagCompound();
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
this.writeToNBT( c );
|
||||
data.setTag( name, c );
|
||||
data.put( name, c );
|
||||
}
|
||||
|
||||
private void writeToNBT( final NBTTagCompound target )
|
||||
private void writeToNBT( final CompoundNBT target )
|
||||
{
|
||||
for( int x = 0; x < this.size; x++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
final NBTTagCompound c = new NBTTagCompound();
|
||||
final CompoundNBT c = new CompoundNBT();
|
||||
|
||||
if( this.inv[x] != null )
|
||||
{
|
||||
this.inv[x].writeToNBT( c );
|
||||
}
|
||||
|
||||
target.setTag( "#" + x, c );
|
||||
target.put( "#" + x, c );
|
||||
}
|
||||
catch( final Exception ignored )
|
||||
{
|
||||
@@ -94,22 +94,22 @@ public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterab
|
||||
}
|
||||
}
|
||||
|
||||
public void readFromNBT( final NBTTagCompound data, final String name )
|
||||
public void readFromNBT( final CompoundNBT data, final String name )
|
||||
{
|
||||
final NBTTagCompound c = data.getCompoundTag( name );
|
||||
final CompoundNBT c = data.getCompound( name );
|
||||
if( c != null )
|
||||
{
|
||||
this.readFromNBT( c );
|
||||
}
|
||||
}
|
||||
|
||||
private void readFromNBT( final NBTTagCompound target )
|
||||
private void readFromNBT( final CompoundNBT target )
|
||||
{
|
||||
for( int x = 0; x < this.size; x++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
final NBTTagCompound c = target.getCompoundTag( "#" + x );
|
||||
final CompoundNBT c = target.getCompound( "#" + x );
|
||||
|
||||
if( c != null )
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.Iterator;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
|
||||
import appeng.util.Platform;
|
||||
@@ -171,21 +171,21 @@ public class AppEngInternalInventory extends ItemStackHandler implements Iterabl
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeToNBT( final NBTTagCompound data, final String name )
|
||||
public void writeToNBT( final CompoundNBT data, final String name )
|
||||
{
|
||||
data.setTag( name, this.serializeNBT() );
|
||||
data.put( name, this.serializeNBT() );
|
||||
}
|
||||
|
||||
public void readFromNBT( final NBTTagCompound data, final String name )
|
||||
public void readFromNBT( final CompoundNBT data, final String name )
|
||||
{
|
||||
final NBTTagCompound c = data.getCompoundTag( name );
|
||||
final CompoundNBT c = data.getCompound( name );
|
||||
if( c != null )
|
||||
{
|
||||
this.readFromNBT( c );
|
||||
}
|
||||
}
|
||||
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
this.deserializeNBT( data );
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.tile.misc;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -103,7 +103,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.cell.writeToNBT( data, "cell" );
|
||||
@@ -113,7 +113,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.cell.readFromNBT( data, "cell" );
|
||||
|
||||
@@ -26,9 +26,9 @@ import java.util.List;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -67,7 +67,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
|
||||
|
||||
public TileCharger()
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
this.getProxy().setFlags();
|
||||
this.setInternalMaxPower( POWER_MAXIMUM_AMOUNT );
|
||||
this.getProxy().setIdlePowerUsage( 0 );
|
||||
@@ -108,7 +108,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
this.getProxy().setValidSides( EnumSet.of( this.getUp(), this.getUp().getOpposite() ) );
|
||||
@@ -147,7 +147,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCrankAttach( final EnumFacing directionToCrank )
|
||||
public boolean canCrankAttach( final Direction directionToCrank )
|
||||
{
|
||||
return this.getUp() == directionToCrank || this.getUp().getOpposite() == directionToCrank;
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class TileCharger extends AENetworkPowerTile implements ICrankable, IGrid
|
||||
this.markForUpdate();
|
||||
}
|
||||
|
||||
public void activate( final EntityPlayer player )
|
||||
public void activate( final PlayerEntity player )
|
||||
{
|
||||
if( !Platform.hasPermissions( new DimensionalCoord( this ), player ) )
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.tile.misc;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -85,7 +85,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.cm.writeToNBT( data );
|
||||
@@ -94,7 +94,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.cm.readFromNBT( data );
|
||||
@@ -220,7 +220,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capability, Direction facing )
|
||||
{
|
||||
if( capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY )
|
||||
{
|
||||
@@ -235,7 +235,7 @@ public class TileCondenser extends AEBaseInvTile implements IConfigManagerHost,
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable Direction facing )
|
||||
{
|
||||
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
||||
{
|
||||
|
||||
@@ -31,8 +31,8 @@ import com.google.common.collect.Lists;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -104,7 +104,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
|
||||
public TileInscriber()
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
this.setInternalMaxPower( 1600 );
|
||||
this.getProxy().setIdlePowerUsage( 0 );
|
||||
this.settings = new ConfigManager( this );
|
||||
@@ -132,7 +132,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.upgrades.writeToNBT( data, "upgrades" );
|
||||
@@ -141,7 +141,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.upgrades.readFromNBT( data, "upgrades" );
|
||||
@@ -205,7 +205,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
this.getProxy().setValidSides( EnumSet.complementOf( EnumSet.of( this.getForward() ) ) );
|
||||
@@ -470,7 +470,7 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( @Nonnull EnumFacing facing )
|
||||
protected IItemHandler getItemHandlerForSide( @Nonnull Direction facing )
|
||||
{
|
||||
if( facing == this.getUp() )
|
||||
{
|
||||
@@ -538,21 +538,21 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||
|
||||
if( !plateA.isEmpty() )
|
||||
{
|
||||
final NBTTagCompound tag = Platform.openNbtData( plateA );
|
||||
final CompoundNBT tag = Platform.openNbtData( plateA );
|
||||
name += tag.getString( "InscribeName" );
|
||||
}
|
||||
|
||||
if( !plateB.isEmpty() )
|
||||
{
|
||||
final NBTTagCompound tag = Platform.openNbtData( plateB );
|
||||
final CompoundNBT tag = Platform.openNbtData( plateB );
|
||||
name += " " + tag.getString( "InscribeName" );
|
||||
}
|
||||
|
||||
final ItemStack startingItem = input.copy();
|
||||
final ItemStack renamedItem = input.copy();
|
||||
final NBTTagCompound tag = Platform.openNbtData( renamedItem );
|
||||
final CompoundNBT tag = Platform.openNbtData( renamedItem );
|
||||
|
||||
final NBTTagCompound display = tag.getCompoundTag( "display" );
|
||||
final CompoundNBT display = tag.getCompoundTag( "display" );
|
||||
tag.setTag( "display", display );
|
||||
|
||||
if( name.length() > 0 )
|
||||
|
||||
@@ -31,9 +31,9 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
@@ -87,14 +87,14 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
this.duality.notifyNeighbors();
|
||||
}
|
||||
|
||||
public void setSide( final EnumFacing facing )
|
||||
public void setSide( final Direction facing )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EnumFacing newForward = facing;
|
||||
Direction newForward = facing;
|
||||
|
||||
if( !this.omniDirectional && this.getForward() == facing.getOpposite() )
|
||||
{
|
||||
@@ -116,14 +116,14 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
|
||||
if( this.omniDirectional )
|
||||
{
|
||||
this.setOrientation( EnumFacing.NORTH, EnumFacing.UP );
|
||||
this.setOrientation( Direction.NORTH, Direction.UP );
|
||||
}
|
||||
else
|
||||
{
|
||||
EnumFacing newUp = EnumFacing.UP;
|
||||
if( newForward == EnumFacing.UP || newForward == EnumFacing.DOWN )
|
||||
Direction newUp = Direction.UP;
|
||||
if( newForward == Direction.UP || newForward == Direction.DOWN )
|
||||
{
|
||||
newUp = EnumFacing.NORTH;
|
||||
newUp = Direction.NORTH;
|
||||
}
|
||||
this.setOrientation( newForward, newUp );
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
{
|
||||
if( this.omniDirectional )
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.allOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.allOf( Direction.class ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -167,7 +167,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setBoolean( "omniDirectional", this.omniDirectional );
|
||||
@@ -176,7 +176,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.omniDirectional = data.getBoolean( "omniDirectional" );
|
||||
@@ -255,11 +255,11 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<EnumFacing> getTargets()
|
||||
public EnumSet<Direction> getTargets()
|
||||
{
|
||||
if( this.omniDirectional )
|
||||
{
|
||||
return EnumSet.allOf( EnumFacing.class );
|
||||
return EnumSet.allOf( Direction.class );
|
||||
}
|
||||
return EnumSet.of( this.getForward() );
|
||||
}
|
||||
@@ -339,13 +339,13 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, @Nullable EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capability, @Nullable Direction facing )
|
||||
{
|
||||
return this.duality.hasCapability( capability, facing ) || super.hasCapability( capability, facing );
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable Direction facing )
|
||||
{
|
||||
T result = this.duality.getCapability( capability, facing );
|
||||
if( result != null )
|
||||
|
||||
@@ -29,10 +29,10 @@ import java.util.List;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
@@ -58,7 +58,7 @@ public class TilePaint extends AEBaseTile
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
final ByteBuf myDat = Unpooled.buffer();
|
||||
@@ -87,7 +87,7 @@ public class TilePaint extends AEBaseTile
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
if( data.hasKey( "dots" ) )
|
||||
@@ -160,7 +160,7 @@ public class TilePaint extends AEBaseTile
|
||||
return;
|
||||
}
|
||||
|
||||
for( final EnumFacing side : EnumFacing.VALUES )
|
||||
for( final Direction side : Direction.VALUES )
|
||||
{
|
||||
if( !this.isSideValid( side ) )
|
||||
{
|
||||
@@ -171,14 +171,14 @@ public class TilePaint extends AEBaseTile
|
||||
this.updateData();
|
||||
}
|
||||
|
||||
public boolean isSideValid( final EnumFacing side )
|
||||
public boolean isSideValid( final Direction side )
|
||||
{
|
||||
final BlockPos p = this.pos.offset( side );
|
||||
final IBlockState blk = this.world.getBlockState( p );
|
||||
final BlockState blk = this.world.getBlockState( p );
|
||||
return blk.getBlock().isSideSolid( this.world.getBlockState( p ), this.world, p, side.getOpposite() );
|
||||
}
|
||||
|
||||
private void removeSide( final EnumFacing side )
|
||||
private void removeSide( final Direction side )
|
||||
{
|
||||
final Iterator<Splotch> i = this.dots.iterator();
|
||||
while( i.hasNext() )
|
||||
@@ -218,7 +218,7 @@ public class TilePaint extends AEBaseTile
|
||||
}
|
||||
}
|
||||
|
||||
public void cleanSide( final EnumFacing side )
|
||||
public void cleanSide( final Direction side )
|
||||
{
|
||||
if( this.dots == null )
|
||||
{
|
||||
@@ -235,11 +235,11 @@ public class TilePaint extends AEBaseTile
|
||||
return this.isLit;
|
||||
}
|
||||
|
||||
public void addBlot( final ItemStack type, final EnumFacing side, final Vec3d hitVec )
|
||||
public void addBlot( final ItemStack type, final Direction side, final Vec3d hitVec )
|
||||
{
|
||||
final BlockPos p = this.pos.offset( side );
|
||||
|
||||
final IBlockState blk = this.world.getBlockState( p );
|
||||
final BlockState blk = this.world.getBlockState( p );
|
||||
if( blk.getBlock().isSideSolid( this.world.getBlockState( p ), this.world, p, side.getOpposite() ) )
|
||||
{
|
||||
final ItemPaintBall ipb = (ItemPaintBall) type.getItem();
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.EnumSet;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.api.implementations.IPowerChannelState;
|
||||
import appeng.api.implementations.tiles.ICrystalGrowthAccelerator;
|
||||
@@ -44,7 +44,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
|
||||
|
||||
public TileQuartzGrowthAccelerator()
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
this.getProxy().setFlags();
|
||||
this.getProxy().setIdlePowerUsage( 8 );
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class TileQuartzGrowthAccelerator extends AENetworkTile implements IPower
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
this.getProxy().setValidSides( EnumSet.of( this.getUp(), this.getUp().getOpposite() ) );
|
||||
|
||||
@@ -26,12 +26,12 @@ import java.util.Map;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -158,7 +158,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.cm.writeToNBT( data );
|
||||
@@ -167,12 +167,12 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
data.setLong( "securityKey", this.securityKey );
|
||||
this.getConfigSlot().writeToNBT( data, "config" );
|
||||
|
||||
final NBTTagCompound storedItems = new NBTTagCompound();
|
||||
final CompoundNBT storedItems = new CompoundNBT();
|
||||
|
||||
int offset = 0;
|
||||
for( final IAEItemStack ais : this.inventory.getStoredItems() )
|
||||
{
|
||||
final NBTTagCompound it = new NBTTagCompound();
|
||||
final CompoundNBT it = new CompoundNBT();
|
||||
ais.createItemStack().writeToNBT( it );
|
||||
storedItems.setTag( String.valueOf( offset ), it );
|
||||
offset++;
|
||||
@@ -183,7 +183,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.cm.readFromNBT( data );
|
||||
@@ -195,13 +195,13 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
this.securityKey = data.getLong( "securityKey" );
|
||||
this.getConfigSlot().readFromNBT( data, "config" );
|
||||
|
||||
final NBTTagCompound storedItems = data.getCompoundTag( "storedItems" );
|
||||
final CompoundNBT storedItems = data.getCompoundTag( "storedItems" );
|
||||
for( final Object key : storedItems.getKeySet() )
|
||||
{
|
||||
final NBTBase obj = storedItems.getTag( (String) key );
|
||||
if( obj instanceof NBTTagCompound )
|
||||
if( obj instanceof CompoundNBT )
|
||||
{
|
||||
this.inventory.getStoredItems().add( AEItemStack.fromItemStack( new ItemStack( (NBTTagCompound) obj ) ) );
|
||||
this.inventory.getStoredItems().add( AEItemStack.fromItemStack( new ItemStack( (CompoundNBT) obj ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,7 +355,7 @@ public class TileSecurityStation extends AENetworkTile implements ITerminalHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock( final EnumFacing side, final AEColor newPaintedColor, final EntityPlayer who )
|
||||
public boolean recolourBlock( final Direction side, final AEColor newPaintedColor, final PlayerEntity who )
|
||||
{
|
||||
if( this.paintedColor == newPaintedColor )
|
||||
{
|
||||
|
||||
@@ -27,9 +27,9 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -98,7 +98,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setDouble( "burnTime", this.getBurnTime() );
|
||||
@@ -108,7 +108,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.setBurnTime( data.getDouble( "burnTime" ) );
|
||||
@@ -117,7 +117,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( @Nonnull EnumFacing facing )
|
||||
protected IItemHandler getItemHandlerForSide( @Nonnull Direction facing )
|
||||
{
|
||||
return this.invExt;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.tile.networking;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.tile.AEBaseTile;
|
||||
@@ -40,7 +40,7 @@ public class CableBusTESR extends TileEntitySpecialRenderer<AEBaseTile>
|
||||
|
||||
TileCableBusTESR realTe = (TileCableBusTESR) te;
|
||||
|
||||
for( EnumFacing facing : EnumFacing.values() )
|
||||
for( Direction facing : Direction.values() )
|
||||
{
|
||||
IPart part = realTe.getPart( facing );
|
||||
if( part != null && part.requireDynamicRender() )
|
||||
|
||||
@@ -28,11 +28,11 @@ import javax.annotation.Nullable;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -65,14 +65,14 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
private int oldLV = -1; // on re-calculate light when it changes
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.getCableBus().readFromNBT( data );
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.getCableBus().writeToNBT( data );
|
||||
@@ -249,7 +249,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public AEPartLocation addPart( final ItemStack is, final AEPartLocation side, final EntityPlayer player, final EnumHand hand )
|
||||
public AEPartLocation addPart( final ItemStack is, final AEPartLocation side, final PlayerEntity player, final Hand hand )
|
||||
{
|
||||
return this.getCableBus().addPart( is, side, player, hand );
|
||||
}
|
||||
@@ -261,7 +261,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPart getPart( final EnumFacing side )
|
||||
public IPart getPart( final Direction side )
|
||||
{
|
||||
return this.getCableBus().getPart( side );
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlocked( final EnumFacing side )
|
||||
public boolean isBlocked( final Direction side )
|
||||
{
|
||||
// TODO 1.10.2-R - Stuff.
|
||||
return false;
|
||||
@@ -370,7 +370,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock( final EnumFacing side, final AEColor colour, final EntityPlayer who )
|
||||
public boolean recolourBlock( final Direction side, final AEColor colour, final PlayerEntity who )
|
||||
{
|
||||
return this.getCableBus().recolourBlock( side, colour, who );
|
||||
}
|
||||
@@ -386,7 +386,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capabilityClass, @Nullable EnumFacing fromSide )
|
||||
public boolean hasCapability( Capability<?> capabilityClass, @Nullable Direction fromSide )
|
||||
{
|
||||
// Note that null will be translated to INTERNAL here
|
||||
AEPartLocation partLocation = AEPartLocation.fromFacing( fromSide );
|
||||
@@ -398,7 +398,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capabilityClass, @Nullable EnumFacing fromSide )
|
||||
public <T> T getCapability( Capability<T> capabilityClass, @Nullable Direction fromSide )
|
||||
{
|
||||
// Note that null will be translated to INTERNAL here
|
||||
AEPartLocation partLocation = AEPartLocation.fromFacing( fromSide );
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.tile.networking;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.EmptyHandler;
|
||||
@@ -72,9 +72,9 @@ public class TileController extends AENetworkPowerTile
|
||||
|
||||
public void onNeighborChange( final boolean force )
|
||||
{
|
||||
final boolean xx = this.checkController( this.pos.offset( EnumFacing.EAST ) ) && this.checkController( this.pos.offset( EnumFacing.WEST ) );
|
||||
final boolean yy = this.checkController( this.pos.offset( EnumFacing.UP ) ) && this.checkController( this.pos.offset( EnumFacing.DOWN ) );
|
||||
final boolean zz = this.checkController( this.pos.offset( EnumFacing.NORTH ) ) && this.checkController( this.pos.offset( EnumFacing.SOUTH ) );
|
||||
final boolean xx = this.checkController( this.pos.offset( Direction.EAST ) ) && this.checkController( this.pos.offset( Direction.WEST ) );
|
||||
final boolean yy = this.checkController( this.pos.offset( Direction.UP ) ) && this.checkController( this.pos.offset( Direction.DOWN ) );
|
||||
final boolean zz = this.checkController( this.pos.offset( Direction.NORTH ) ) && this.checkController( this.pos.offset( Direction.SOUTH ) );
|
||||
|
||||
// int meta = world.getBlockMetadata( xCoord, yCoord, zCoord );
|
||||
// boolean hasPower = meta > 0;
|
||||
@@ -88,11 +88,11 @@ public class TileController extends AENetworkPowerTile
|
||||
{
|
||||
if( this.isValid )
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.allOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.allOf( Direction.class ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
}
|
||||
|
||||
this.updateMeta();
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.tile.networking;
|
||||
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -99,7 +99,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setDouble( "internalCurrentPower", this.internalCurrentPower );
|
||||
@@ -107,7 +107,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.internalCurrentPower = data.getDouble( "internalCurrentPower" );
|
||||
@@ -120,7 +120,7 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadSettings( final SettingsFrom from, final NBTTagCompound compound )
|
||||
public void uploadSettings( final SettingsFrom from, final CompoundNBT compound )
|
||||
{
|
||||
if( from == SettingsFrom.DISMANTLE_ITEM )
|
||||
{
|
||||
@@ -129,11 +129,11 @@ public class TileEnergyCell extends AENetworkTile implements IAEPowerStorage
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound downloadSettings( final SettingsFrom from )
|
||||
public CompoundNBT downloadSettings( final SettingsFrom from )
|
||||
{
|
||||
if( from == SettingsFrom.DISMANTLE_ITEM )
|
||||
{
|
||||
final NBTTagCompound tag = new NBTTagCompound();
|
||||
final CompoundNBT tag = new CompoundNBT();
|
||||
tag.setDouble( "internalCurrentPower", this.internalCurrentPower );
|
||||
tag.setDouble( "internalMaxPower", this.getInternalMaxPower() ); // used for tool tip.
|
||||
return tag;
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.EnumSet;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -62,11 +62,11 @@ public class TileWireless extends AENetworkInvTile implements IWirelessAccessPoi
|
||||
{
|
||||
this.inv.setFilter( new AEItemDefinitionFilter( AEApi.instance().definitions().materials().wirelessBooster() ) );
|
||||
this.getProxy().setFlags( GridFlags.REQUIRE_CHANNEL );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( final EnumFacing inForward, final EnumFacing inUp )
|
||||
public void setOrientation( final Direction inForward, final Direction inUp )
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
this.getProxy().setValidSides( EnumSet.of( this.getForward().getOpposite() ) );
|
||||
|
||||
@@ -23,8 +23,8 @@ import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
||||
@@ -50,7 +50,7 @@ public abstract class AEBasePoweredTile extends AEBaseInvTile implements IAEPowe
|
||||
private AccessRestriction internalPowerFlow = AccessRestriction.READ_WRITE;
|
||||
// the current power buffer.
|
||||
private double internalCurrentPower = 0;
|
||||
private EnumSet<EnumFacing> internalPowerSides = EnumSet.allOf( EnumFacing.class );
|
||||
private EnumSet<Direction> internalPowerSides = EnumSet.allOf( Direction.class );
|
||||
private final IEnergyStorage forgeEnergyAdapter;
|
||||
private Object teslaEnergyAdapter;
|
||||
|
||||
@@ -67,12 +67,12 @@ public abstract class AEBasePoweredTile extends AEBaseInvTile implements IAEPowe
|
||||
this.ic2Sink.setValidFaces( this.internalPowerSides );
|
||||
}
|
||||
|
||||
protected EnumSet<EnumFacing> getPowerSides()
|
||||
protected EnumSet<Direction> getPowerSides()
|
||||
{
|
||||
return this.internalPowerSides.clone();
|
||||
}
|
||||
|
||||
protected void setPowerSides( final EnumSet<EnumFacing> sides )
|
||||
protected void setPowerSides( final EnumSet<Direction> sides )
|
||||
{
|
||||
this.internalPowerSides = sides;
|
||||
this.ic2Sink.setValidFaces( sides );
|
||||
@@ -80,7 +80,7 @@ public abstract class AEBasePoweredTile extends AEBaseInvTile implements IAEPowe
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setDouble( "internalCurrentPower", this.getInternalCurrentPower() );
|
||||
@@ -88,7 +88,7 @@ public abstract class AEBasePoweredTile extends AEBaseInvTile implements IAEPowe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.setInternalCurrentPower( data.getDouble( "internalCurrentPower" ) );
|
||||
@@ -268,7 +268,7 @@ public abstract class AEBasePoweredTile extends AEBaseInvTile implements IAEPowe
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capability, Direction facing )
|
||||
{
|
||||
if( capability == Capabilities.FORGE_ENERGY )
|
||||
{
|
||||
@@ -290,7 +290,7 @@ public abstract class AEBasePoweredTile extends AEBaseInvTile implements IAEPowe
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable Direction facing )
|
||||
{
|
||||
if( capability == Capabilities.FORGE_ENERGY )
|
||||
{
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.tile.powersink;
|
||||
|
||||
|
||||
import net.darkhax.tesla.api.ITeslaConsumer;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerUnits;
|
||||
|
||||
|
||||
/**
|
||||
* Adapts an {@link IExternalPowerSink} to Forges {@link net.darkhax.tesla.api.ITeslaConsumer}.
|
||||
*/
|
||||
class TeslaEnergyAdapter implements ITeslaConsumer
|
||||
{
|
||||
|
||||
private final IExternalPowerSink sink;
|
||||
|
||||
TeslaEnergyAdapter( IExternalPowerSink sink )
|
||||
{
|
||||
this.sink = sink;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long givePower( long power, boolean simulated )
|
||||
{
|
||||
// Cut it down to what we can represent in a double
|
||||
double offeredPower = power;
|
||||
|
||||
final double overflow = this.sink.injectExternalPower( PowerUnits.RF, offeredPower, simulated ? Actionable.SIMULATE : Actionable.MODULATE );
|
||||
|
||||
return (long) ( power - overflow );
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,9 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.EmptyHandler;
|
||||
@@ -67,7 +67,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
public TileQuantumBridge()
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
this.getProxy().setFlags( GridFlags.DENSE_CAPACITY );
|
||||
this.getProxy().setIdlePowerUsage( 22 );
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( EnumFacing side )
|
||||
protected IItemHandler getItemHandlerForSide( Direction side )
|
||||
{
|
||||
if( this.isCenter() )
|
||||
{
|
||||
@@ -206,7 +206,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
if( affectWorld )
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,8 +236,8 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
|
||||
if( this.isCorner() || this.isCenter() )
|
||||
{
|
||||
final EnumSet<EnumFacing> sides = EnumSet.noneOf( EnumFacing.class );
|
||||
for( final EnumFacing dir : this.getAdjacentQuantumBridges() )
|
||||
final EnumSet<Direction> sides = EnumSet.noneOf( Direction.class );
|
||||
for( final Direction dir : this.getAdjacentQuantumBridges() )
|
||||
{
|
||||
sides.add( dir );
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getProxy().setValidSides( EnumSet.allOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.allOf( Direction.class ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -256,11 +256,11 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
return ( this.constructed & this.getCorner() ) == this.getCorner() && this.constructed != -1;
|
||||
}
|
||||
|
||||
public EnumSet<EnumFacing> getAdjacentQuantumBridges()
|
||||
public EnumSet<Direction> getAdjacentQuantumBridges()
|
||||
{
|
||||
final EnumSet<EnumFacing> set = EnumSet.noneOf( EnumFacing.class );
|
||||
final EnumSet<Direction> set = EnumSet.noneOf( Direction.class );
|
||||
|
||||
for( final EnumFacing d : EnumFacing.values() )
|
||||
for( final Direction d : Direction.values() )
|
||||
{
|
||||
final TileEntity te = this.world.getTileEntity( this.pos.offset( d ) );
|
||||
if( te instanceof TileQuantumBridge )
|
||||
@@ -277,7 +277,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
||||
final ItemStack is = this.internalInventory.getStackInSlot( 0 );
|
||||
if( !is.isEmpty() )
|
||||
{
|
||||
final NBTTagCompound c = is.getTagCompound();
|
||||
final CompoundNBT c = is.getTagCompound();
|
||||
if( c != null )
|
||||
{
|
||||
return c.getLong( "freq" );
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.tile.spatial;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setInteger( "lastRedstoneState", this.lastRedstoneState.ordinal() );
|
||||
@@ -73,7 +73,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
if( data.hasKey( "lastRedstoneState" ) )
|
||||
@@ -182,7 +182,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements IWorldCallabl
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @Nonnull IItemHandler getItemHandlerForSide( @Nonnull EnumFacing side )
|
||||
protected @Nonnull IItemHandler getItemHandlerForSide( @Nonnull Direction side )
|
||||
{
|
||||
return this.invExt;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.EnumSet;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
@@ -63,7 +63,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
{
|
||||
this.getProxy().setFlags( GridFlags.REQUIRE_CHANNEL, GridFlags.MULTIBLOCK );
|
||||
this.getProxy().setIdlePowerUsage( 0.5 );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( EnumSet.noneOf( Direction.class ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,7 +123,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
public void updateStatus( final SpatialPylonCluster c )
|
||||
{
|
||||
this.cluster = c;
|
||||
this.getProxy().setValidSides( c == null ? EnumSet.noneOf( EnumFacing.class ) : EnumSet.allOf( EnumFacing.class ) );
|
||||
this.getProxy().setValidSides( c == null ? EnumSet.noneOf( Direction.class ) : EnumSet.allOf( Direction.class ) );
|
||||
this.recalculateDisplay();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ import javax.annotation.Nullable;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -431,7 +431,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.config.readFromNBT( data );
|
||||
@@ -443,7 +443,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.config.writeToNBT( data );
|
||||
@@ -516,7 +516,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( @Nonnull EnumFacing side )
|
||||
protected IItemHandler getItemHandlerForSide( @Nonnull Direction side )
|
||||
{
|
||||
if( side == this.getForward() )
|
||||
{
|
||||
@@ -616,7 +616,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
|
||||
}
|
||||
|
||||
public boolean openGui( final EntityPlayer p )
|
||||
public boolean openGui( final PlayerEntity p )
|
||||
{
|
||||
this.updateHandler();
|
||||
if( this.cellHandler != null )
|
||||
@@ -645,7 +645,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock( final EnumFacing side, final AEColor newPaintedColor, final EntityPlayer who )
|
||||
public boolean recolourBlock( final Direction side, final AEColor newPaintedColor, final PlayerEntity who )
|
||||
{
|
||||
if( this.paintedColor == newPaintedColor )
|
||||
{
|
||||
@@ -745,7 +745,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
return super.injectItems( input, mode, src );
|
||||
}
|
||||
|
||||
private boolean securityCheck( final EntityPlayer player, final SecurityPermissions requiredPermission )
|
||||
private boolean securityCheck( final PlayerEntity player, final SecurityPermissions requiredPermission )
|
||||
{
|
||||
if( TileChest.this.getTile() instanceof IActionHost && requiredPermission != null )
|
||||
{
|
||||
@@ -791,7 +791,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability( Capability<?> capability, EnumFacing facing )
|
||||
public boolean hasCapability( Capability<?> capability, Direction facing )
|
||||
{
|
||||
this.updateHandler();
|
||||
if( capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY && this.fluidHandler != null && facing != this.getForward() )
|
||||
@@ -807,7 +807,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, ITerminal
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@Override
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable EnumFacing facing )
|
||||
public <T> T getCapability( Capability<T> capability, @Nullable Direction facing )
|
||||
{
|
||||
this.updateHandler();
|
||||
if( capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY && this.fluidHandler != null && facing != this.getForward() )
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Map;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -172,7 +172,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.isCached = false;
|
||||
@@ -180,7 +180,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
data.setInteger( "priority", this.priority );
|
||||
|
||||
@@ -25,8 +25,8 @@ import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
@@ -110,7 +110,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
public CompoundNBT writeToNBT( final CompoundNBT data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
this.manager.writeToNBT( data );
|
||||
@@ -120,7 +120,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound data )
|
||||
public void readFromNBT( final CompoundNBT data )
|
||||
{
|
||||
super.readFromNBT( data );
|
||||
this.manager.readFromNBT( data );
|
||||
@@ -251,7 +251,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IItemHandler getItemHandlerForSide( final EnumFacing facing )
|
||||
protected IItemHandler getItemHandlerForSide( final Direction facing )
|
||||
{
|
||||
if( facing == this.getUp() || facing == this.getUp().getOpposite() )
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.io.IOException;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ITickable;
|
||||
@@ -86,7 +86,7 @@ public class TileSkyChest extends AEBaseInvTile implements ITickable
|
||||
return this.inv;
|
||||
}
|
||||
|
||||
public void openInventory( final EntityPlayer player )
|
||||
public void openInventory( final PlayerEntity player )
|
||||
{
|
||||
if( !player.isSpectator() )
|
||||
{
|
||||
@@ -105,7 +105,7 @@ public class TileSkyChest extends AEBaseInvTile implements ITickable
|
||||
}
|
||||
}
|
||||
|
||||
public void closeInventory( final EntityPlayer player )
|
||||
public void closeInventory( final PlayerEntity player )
|
||||
{
|
||||
if( !player.isSpectator() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user