1.15 port
This commit is contained in:
@@ -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() ) );
|
||||
|
||||
Reference in New Issue
Block a user