Most of the 1.8 Port.
This commit is contained in:
@@ -24,8 +24,7 @@ import java.util.concurrent.Callable;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.config.YesNo;
|
||||
@@ -38,6 +37,7 @@ import appeng.api.networking.events.MENetworkEvent;
|
||||
import appeng.api.networking.events.MENetworkSpatialEvent;
|
||||
import appeng.api.networking.spatial.ISpatialCache;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.me.cache.SpatialPylonCache;
|
||||
@@ -88,7 +88,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements Callable
|
||||
|
||||
public void updateRedstoneState()
|
||||
{
|
||||
YesNo currentState = this.worldObj.isBlockIndirectlyGettingPowered( this.xCoord, this.yCoord, this.zCoord ) ? YesNo.YES : YesNo.NO;
|
||||
YesNo currentState = this.worldObj.isBlockIndirectlyGettingPowered( pos ) != 0 ? YesNo.YES : YesNo.NO;
|
||||
if( this.lastRedstoneState != currentState )
|
||||
{
|
||||
this.lastRedstoneState = currentState;
|
||||
@@ -159,7 +159,7 @@ public class TileSpatialIOPort extends AENetworkInvTile implements Callable
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType( ForgeDirection dir )
|
||||
public AECableType getCableConnectionType( AEPartLocation dir )
|
||||
{
|
||||
return AECableType.SMART;
|
||||
}
|
||||
@@ -189,19 +189,19 @@ public class TileSpatialIOPort extends AENetworkInvTile implements Callable
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem( int slotIndex, ItemStack insertingItem, int side )
|
||||
public boolean canInsertItem( int slotIndex, ItemStack insertingItem, EnumFacing side )
|
||||
{
|
||||
return this.isItemValidForSlot( slotIndex, insertingItem );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem( int slotIndex, ItemStack extractedItem, int side )
|
||||
public boolean canExtractItem( int slotIndex, ItemStack extractedItem, EnumFacing side )
|
||||
{
|
||||
return slotIndex == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsBySide( ForgeDirection side )
|
||||
public int[] getAccessibleSlotsBySide( EnumFacing side )
|
||||
{
|
||||
return this.sides;
|
||||
}
|
||||
|
||||
@@ -19,12 +19,11 @@
|
||||
package appeng.tile.spatial;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
@@ -63,7 +62,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
{
|
||||
this.gridProxy.setFlags( GridFlags.REQUIRE_CHANNEL, GridFlags.MULTIBLOCK );
|
||||
this.gridProxy.setIdlePowerUsage( 0.5 );
|
||||
this.gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
|
||||
this.gridProxy.setValidSides( EnumSet.noneOf( EnumFacing.class ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,7 +122,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
public void updateStatus( SpatialPylonCluster c )
|
||||
{
|
||||
this.cluster = c;
|
||||
this.gridProxy.setValidSides( c == null ? EnumSet.noneOf( ForgeDirection.class ) : EnumSet.allOf( ForgeDirection.class ) );
|
||||
this.gridProxy.setValidSides( c == null ? EnumSet.noneOf( EnumFacing.class ) : EnumSet.allOf( EnumFacing.class ) );
|
||||
this.recalculateDisplay();
|
||||
}
|
||||
|
||||
@@ -196,7 +195,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
if( hasLight != this.didHaveLight )
|
||||
{
|
||||
this.didHaveLight = hasLight;
|
||||
this.worldObj.func_147451_t( this.xCoord, this.yCoord, this.zCoord );
|
||||
this.worldObj.checkLight( pos );
|
||||
// worldObj.updateAllLightTypes( xCoord, yCoord, zCoord );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user