Most of the 1.8 Port.
This commit is contained in:
@@ -32,7 +32,13 @@ public class AEGlassMaterial extends Material
|
||||
{
|
||||
super( color );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSolid()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaque()
|
||||
{
|
||||
|
||||
@@ -26,8 +26,6 @@ import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@@ -37,11 +35,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -73,6 +71,7 @@ import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.core.settings.TickRates;
|
||||
@@ -96,6 +95,8 @@ import appeng.util.inv.IInventoryDestination;
|
||||
import appeng.util.inv.WrapperInvSlot;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
|
||||
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory, IConfigManagerHost, ICraftingProvider, IUpgradeableHost, IPriorityHost
|
||||
{
|
||||
@@ -429,9 +430,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
}
|
||||
|
||||
TileEntity te = this.iHost.getTileEntity();
|
||||
if( te != null && te.getWorldObj() != null )
|
||||
if( te != null && te.getWorld() != null )
|
||||
{
|
||||
Platform.notifyBlocksOfNeighbors( te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord );
|
||||
Platform.notifyBlocksOfNeighbors( te.getWorld(), te.getPos() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +446,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
if( is.getItem() instanceof ICraftingPatternItem )
|
||||
{
|
||||
ICraftingPatternItem cpi = (ICraftingPatternItem) is.getItem();
|
||||
ICraftingPatternDetails details = cpi.getPatternForItem( is, this.iHost.getTileEntity().getWorldObj() );
|
||||
ICraftingPatternDetails details = cpi.getPatternForItem( is, this.iHost.getTileEntity().getWorld() );
|
||||
|
||||
if( details != null )
|
||||
{
|
||||
@@ -505,7 +506,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
this.notifyNeighbors();
|
||||
}
|
||||
|
||||
public AECableType getCableConnectionType( ForgeDirection dir )
|
||||
public AECableType getCableConnectionType( AEPartLocation dir )
|
||||
{
|
||||
return AECableType.SMART;
|
||||
}
|
||||
@@ -528,7 +529,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
}
|
||||
}
|
||||
|
||||
public int[] getAccessibleSlotsFromSide( int side )
|
||||
public int[] getSlotsForFace( EnumFacing side )
|
||||
{
|
||||
return this.sides;
|
||||
}
|
||||
@@ -556,7 +557,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
return this.hasWorkToDo() ? ( couldDoWork ? TickRateModulation.URGENT : TickRateModulation.SLOWER ) : TickRateModulation.SLEEP;
|
||||
}
|
||||
|
||||
private void pushItemsOut( EnumSet<ForgeDirection> possibleDirections )
|
||||
private void pushItemsOut( EnumSet<EnumFacing> possibleDirections )
|
||||
{
|
||||
if( !this.hasItemsToSend() )
|
||||
{
|
||||
@@ -564,16 +565,16 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
}
|
||||
|
||||
TileEntity tile = this.iHost.getTileEntity();
|
||||
World w = tile.getWorldObj();
|
||||
World w = tile.getWorld();
|
||||
|
||||
Iterator<ItemStack> i = this.waitingToSend.iterator();
|
||||
while( i.hasNext() )
|
||||
{
|
||||
ItemStack whatToSend = i.next();
|
||||
|
||||
for( ForgeDirection s : possibleDirections )
|
||||
for( EnumFacing s : possibleDirections )
|
||||
{
|
||||
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
|
||||
TileEntity te = w.getTileEntity( tile.getPos().offset( s ) );
|
||||
if( te == null )
|
||||
{
|
||||
continue;
|
||||
@@ -730,7 +731,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
{
|
||||
if( this.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 && itemStack != null )
|
||||
{
|
||||
return this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorldObj(), this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
|
||||
return this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(), this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
|
||||
}
|
||||
}
|
||||
catch( GridAccessException e )
|
||||
@@ -837,7 +838,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
this.craftingTracker.cancel();
|
||||
}
|
||||
|
||||
public IStorageMonitorable getMonitorable( ForgeDirection side, BaseActionSource src, IStorageMonitorable myInterface )
|
||||
public IStorageMonitorable getMonitorable( EnumFacing side, BaseActionSource src, IStorageMonitorable myInterface )
|
||||
{
|
||||
if( Platform.canAccess( this.gridProxy, src ) )
|
||||
{
|
||||
@@ -872,12 +873,12 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
}
|
||||
|
||||
TileEntity tile = this.iHost.getTileEntity();
|
||||
World w = tile.getWorldObj();
|
||||
World w = tile.getWorld();
|
||||
|
||||
EnumSet<ForgeDirection> possibleDirections = this.iHost.getTargets();
|
||||
for( ForgeDirection s : possibleDirections )
|
||||
EnumSet<EnumFacing> possibleDirections = this.iHost.getTargets();
|
||||
for( EnumFacing s : possibleDirections )
|
||||
{
|
||||
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
|
||||
TileEntity te = w.getTileEntity( tile.getPos().offset( s ) );
|
||||
if( te instanceof IInterfaceHost )
|
||||
{
|
||||
try
|
||||
@@ -949,15 +950,15 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
|
||||
if( this.isBlocking() )
|
||||
{
|
||||
EnumSet<ForgeDirection> possibleDirections = this.iHost.getTargets();
|
||||
EnumSet<EnumFacing> possibleDirections = this.iHost.getTargets();
|
||||
TileEntity tile = this.iHost.getTileEntity();
|
||||
World w = tile.getWorldObj();
|
||||
World w = tile.getWorld();
|
||||
|
||||
boolean allAreBusy = true;
|
||||
|
||||
for( ForgeDirection s : possibleDirections )
|
||||
for( EnumFacing s : possibleDirections )
|
||||
{
|
||||
TileEntity te = w.getTileEntity( tile.xCoord + s.offsetX, tile.yCoord + s.offsetY, tile.zCoord + s.offsetZ );
|
||||
TileEntity te = w.getTileEntity( tile.getPos().offset( s ) );
|
||||
|
||||
InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
|
||||
if( ad != null )
|
||||
@@ -1110,20 +1111,18 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
public String getTermName()
|
||||
{
|
||||
final TileEntity hostTile = this.iHost.getTileEntity();
|
||||
final World hostWorld = hostTile.getWorldObj();
|
||||
final World hostWorld = hostTile.getWorld();
|
||||
|
||||
if( ( (ICustomNameObject) this.iHost ).hasCustomName() )
|
||||
{
|
||||
return ( (ICustomNameObject) this.iHost ).getCustomName();
|
||||
}
|
||||
|
||||
final EnumSet<ForgeDirection> possibleDirections = this.iHost.getTargets();
|
||||
for( ForgeDirection direction : possibleDirections )
|
||||
final EnumSet<EnumFacing> possibleDirections = this.iHost.getTargets();
|
||||
for( EnumFacing direction : possibleDirections )
|
||||
{
|
||||
final int xPos = hostTile.xCoord + direction.offsetX;
|
||||
final int yPos = hostTile.yCoord + direction.offsetY;
|
||||
final int zPos = hostTile.zCoord + direction.offsetZ;
|
||||
final TileEntity directedTile = hostWorld.getTileEntity( xPos, yPos, zPos );
|
||||
BlockPos targ = hostTile.getPos().offset( direction );
|
||||
final TileEntity directedTile = hostWorld.getTileEntity( targ );
|
||||
|
||||
if( directedTile == null )
|
||||
{
|
||||
@@ -1155,7 +1154,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
|
||||
if( directedTile instanceof ISidedInventory )
|
||||
{
|
||||
int[] sides = ( (ISidedInventory) directedTile ).getAccessibleSlotsFromSide( direction.getOpposite().ordinal() );
|
||||
int[] sides = ( (ISidedInventory) directedTile ).getSlotsForFace( direction.getOpposite() );
|
||||
|
||||
if( sides == null || sides.length == 0 )
|
||||
{
|
||||
@@ -1163,19 +1162,19 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
}
|
||||
}
|
||||
|
||||
final Block directedBlock = hostWorld.getBlock( xPos, yPos, zPos );
|
||||
ItemStack what = new ItemStack( directedBlock, 1, directedBlock.getDamageValue( hostWorld, xPos, yPos, zPos ) );
|
||||
final Block directedBlock = hostWorld.getBlockState( targ ).getBlock();
|
||||
ItemStack what = new ItemStack( directedBlock, 1, directedBlock.getDamageValue( hostWorld, targ ) );
|
||||
try
|
||||
{
|
||||
Vec3 from = Vec3.createVectorHelper( hostTile.xCoord + 0.5, hostTile.yCoord + 0.5, hostTile.zCoord + 0.5 );
|
||||
from = from.addVector( direction.offsetX * 0.501, direction.offsetY * 0.501, direction.offsetZ * 0.501 );
|
||||
Vec3 to = from.addVector( direction.offsetX, direction.offsetY, direction.offsetZ );
|
||||
Vec3 from = new Vec3( hostTile.getPos().getX() + 0.5, hostTile.getPos().getY() + 0.5, hostTile.getPos().getZ() + 0.5 );
|
||||
from = from.addVector( direction.getFrontOffsetX() * 0.501, direction.getFrontOffsetY() * 0.501, direction.getFrontOffsetZ() * 0.501 );
|
||||
Vec3 to = from.addVector( direction.getFrontOffsetX(), direction.getFrontOffsetY(), direction.getFrontOffsetZ() );
|
||||
MovingObjectPosition mop = hostWorld.rayTraceBlocks( from, to, true );
|
||||
if( mop != null && !BAD_BLOCKS.contains( directedBlock ) )
|
||||
{
|
||||
if( mop.blockX == directedTile.xCoord && mop.blockY == directedTile.yCoord && mop.blockZ == directedTile.zCoord )
|
||||
if( mop.getBlockPos().equals( directedTile.getPos() ) )
|
||||
{
|
||||
ItemStack g = directedBlock.getPickBlock( mop, hostWorld, directedTile.xCoord, directedTile.yCoord, directedTile.zCoord, null );
|
||||
ItemStack g = directedBlock.getPickBlock( mop, hostWorld, directedTile.getPos() );
|
||||
if( g != null )
|
||||
{
|
||||
what = g;
|
||||
@@ -1207,7 +1206,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
||||
public long getSortValue()
|
||||
{
|
||||
TileEntity te = this.iHost.getTileEntity();
|
||||
return ( te.zCoord << 24 ) ^ ( te.xCoord << 8 ) ^ te.yCoord;
|
||||
return ( te.getPos().getZ() << 24 ) ^ ( te.getPos().getX() << 8 ) ^ te.getPos().getY();
|
||||
}
|
||||
|
||||
public void initialize()
|
||||
|
||||
@@ -21,7 +21,6 @@ package appeng.helpers;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
|
||||
|
||||
@@ -23,12 +23,13 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public interface ICustomCollision
|
||||
{
|
||||
Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity thePlayer, boolean b );
|
||||
Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, BlockPos pos, Entity thePlayer, boolean b );
|
||||
|
||||
void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e );
|
||||
void addCollidingBlockToList( World w, BlockPos pos, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e );
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ package appeng.helpers;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.networking.crafting.ICraftingProvider;
|
||||
import appeng.api.networking.crafting.ICraftingRequester;
|
||||
@@ -34,7 +33,7 @@ public interface IInterfaceHost extends ICraftingProvider, IUpgradeableHost, ICr
|
||||
|
||||
DualityInterface getInterfaceDuality();
|
||||
|
||||
EnumSet<ForgeDirection> getTargets();
|
||||
EnumSet<EnumFacing> getTargets();
|
||||
|
||||
TileEntity getTileEntity();
|
||||
|
||||
|
||||
@@ -19,9 +19,8 @@
|
||||
package appeng.helpers;
|
||||
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.util.IOrientable;
|
||||
|
||||
|
||||
@@ -48,24 +47,24 @@ public class LocationRotation implements IOrientable
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getForward()
|
||||
public EnumFacing getForward()
|
||||
{
|
||||
if( this.getUp().offsetY == 0 )
|
||||
if( this.getUp().getFrontOffsetY() == 0 )
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
return ForgeDirection.SOUTH;
|
||||
return EnumFacing.SOUTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getUp()
|
||||
public EnumFacing getUp()
|
||||
{
|
||||
int num = Math.abs( this.x + this.y + this.z ) % 6;
|
||||
return ForgeDirection.getOrientation( num );
|
||||
return EnumFacing.VALUES[ num ];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( ForgeDirection forward, ForgeDirection up )
|
||||
public void setOrientation( EnumFacing forward, EnumFacing up )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -19,27 +19,29 @@
|
||||
package appeng.helpers;
|
||||
|
||||
|
||||
import net.minecraft.block.BlockTorch;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumFacing.Axis;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.block.AEBaseBlock;
|
||||
|
||||
|
||||
public class MetaRotation implements IOrientable
|
||||
{
|
||||
|
||||
final boolean useFacing;
|
||||
final IBlockAccess w;
|
||||
final int x;
|
||||
final int y;
|
||||
final int z;
|
||||
final BlockPos pos;
|
||||
|
||||
public MetaRotation( IBlockAccess world, int x, int y, int z )
|
||||
public MetaRotation( IBlockAccess world, BlockPos pos, boolean FullFacing )
|
||||
{
|
||||
this.w = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.pos = pos;
|
||||
this.useFacing = FullFacing;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,27 +51,52 @@ public class MetaRotation implements IOrientable
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getForward()
|
||||
public EnumFacing getForward()
|
||||
{
|
||||
if( this.getUp().offsetY == 0 )
|
||||
if( this.getUp().getFrontOffsetY() == 0 )
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
return ForgeDirection.SOUTH;
|
||||
return EnumFacing.SOUTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getUp()
|
||||
public EnumFacing getUp()
|
||||
{
|
||||
return ForgeDirection.getOrientation( this.w.getBlockMetadata( this.x, this.y, this.z ) );
|
||||
IBlockState state = w.getBlockState( pos );
|
||||
|
||||
if (useFacing )
|
||||
{
|
||||
EnumFacing f = state == null ? EnumFacing.UP : (EnumFacing) state.getValue( BlockTorch.FACING );
|
||||
return f;
|
||||
}
|
||||
|
||||
Axis a = state == null ? null : (Axis) state.getValue( AEBaseBlock.AXIS_ORIENTATION );
|
||||
|
||||
if ( a == null )
|
||||
a = Axis.Y;
|
||||
|
||||
switch( a )
|
||||
{
|
||||
case X:
|
||||
return EnumFacing.EAST;
|
||||
case Z:
|
||||
return EnumFacing.SOUTH;
|
||||
default:
|
||||
case Y:
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( ForgeDirection forward, ForgeDirection up )
|
||||
public void setOrientation( EnumFacing forward, EnumFacing up )
|
||||
{
|
||||
if( this.w instanceof World )
|
||||
{
|
||||
( (World) this.w ).setBlockMetadataWithNotify( this.x, this.y, this.z, up.ordinal(), 1 + 2 );
|
||||
if ( useFacing )
|
||||
( (World) this.w ).setBlockState( pos, w.getBlockState( pos ).withProperty( BlockTorch.FACING, up ) );
|
||||
else
|
||||
( (World) this.w ).setBlockState( pos, w.getBlockState( pos ).withProperty( AEBaseBlock.AXIS_ORIENTATION, up.getAxis() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -22,11 +22,8 @@ package appeng.helpers;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.IGrid;
|
||||
import appeng.api.networking.crafting.ICraftingGrid;
|
||||
@@ -38,6 +35,8 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.parts.automation.NonNullArrayIterator;
|
||||
import appeng.util.InventoryAdaptor;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
|
||||
public class MultiCraftingTracker
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
package appeng.helpers;
|
||||
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import appeng.api.util.IOrientable;
|
||||
|
||||
|
||||
@@ -39,19 +38,19 @@ public class NullRotation implements IOrientable
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getForward()
|
||||
public EnumFacing getForward()
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
return EnumFacing.SOUTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getUp()
|
||||
public EnumFacing getUp()
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation( ForgeDirection forward, ForgeDirection up )
|
||||
public void setOrientation( EnumFacing forward, EnumFacing up )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
@@ -20,22 +20,20 @@ package appeng.helpers;
|
||||
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
|
||||
public class Splotch
|
||||
{
|
||||
|
||||
public final ForgeDirection side;
|
||||
public final EnumFacing side;
|
||||
public final boolean lumen;
|
||||
public final AEColor color;
|
||||
private final int pos;
|
||||
|
||||
public Splotch( AEColor col, boolean lit, ForgeDirection side, Vec3 position )
|
||||
public Splotch( AEColor col, boolean lit, EnumFacing side, Vec3 position )
|
||||
{
|
||||
this.color = col;
|
||||
this.lumen = lit;
|
||||
@@ -43,13 +41,13 @@ public class Splotch
|
||||
double x;
|
||||
double y;
|
||||
|
||||
if( side == ForgeDirection.SOUTH || side == ForgeDirection.NORTH )
|
||||
if( side == EnumFacing.SOUTH || side == EnumFacing.NORTH )
|
||||
{
|
||||
x = position.xCoord;
|
||||
y = position.yCoord;
|
||||
}
|
||||
|
||||
else if( side == ForgeDirection.UP || side == ForgeDirection.DOWN )
|
||||
else if( side == EnumFacing.UP || side == EnumFacing.DOWN )
|
||||
{
|
||||
x = position.xCoord;
|
||||
y = position.zCoord;
|
||||
@@ -74,7 +72,7 @@ public class Splotch
|
||||
this.pos = data.readByte();
|
||||
int val = data.readByte();
|
||||
|
||||
this.side = ForgeDirection.getOrientation( val & 0x07 );
|
||||
this.side = EnumFacing.VALUES[ val & 0x07 ];
|
||||
this.color = AEColor.values()[( val >> 3 ) & 0x0F];
|
||||
this.lumen = ( ( val >> 7 ) & 0x01 ) > 0;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ package appeng.helpers;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.Actionable;
|
||||
@@ -46,6 +44,7 @@ import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.container.interfaces.IInventorySlotAware;
|
||||
@@ -89,7 +88,7 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost, II
|
||||
|
||||
if( obj instanceof IGridHost )
|
||||
{
|
||||
IGridNode n = ( (IGridHost) obj ).getGridNode( ForgeDirection.UNKNOWN );
|
||||
IGridNode n = ( (IGridHost) obj ).getGridNode( AEPartLocation.INTERNAL );
|
||||
if( n != null )
|
||||
{
|
||||
this.targetGrid = n.getGrid();
|
||||
@@ -281,13 +280,13 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public IGridNode getGridNode( ForgeDirection dir )
|
||||
public IGridNode getGridNode( AEPartLocation dir )
|
||||
{
|
||||
return this.getActionableNode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType( ForgeDirection dir )
|
||||
public AECableType getCableConnectionType( AEPartLocation dir )
|
||||
{
|
||||
return AECableType.NONE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user