First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -27,10 +27,10 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.tile.events.TileEventType;
|
||||
@@ -202,13 +202,13 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
if( this.hasCustomName() )
|
||||
{
|
||||
return new ChatComponentText( this.getCustomName() );
|
||||
return new TextComponentString( this.getCustomName() );
|
||||
}
|
||||
return new ChatComponentTranslation( this.getBlockType().getUnlocalizedName() );
|
||||
return new TextComponentTranslation( this.getBlockType().getUnlocalizedName() );
|
||||
}
|
||||
|
||||
public abstract int[] getAccessibleSlotsBySide( EnumFacing whichSide );
|
||||
|
||||
@@ -40,11 +40,10 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||
@@ -160,7 +159,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
|
||||
@Override
|
||||
// NOTE: WAS FINAL, changed for Immibis
|
||||
public final void writeToNBT( final NBTTagCompound data )
|
||||
public final NBTTagCompound writeToNBT( final NBTTagCompound data )
|
||||
{
|
||||
super.writeToNBT( data );
|
||||
|
||||
@@ -179,6 +178,8 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
{
|
||||
h.writeToNBT( this, data );
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public final void update()
|
||||
@@ -188,9 +189,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
h.tick( this );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
public SPacketUpdateTileEntity getUpdatePacket()
|
||||
{
|
||||
final NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
@@ -211,7 +212,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
|
||||
stream.capacity( stream.readableBytes() );
|
||||
data.setByteArray( "X", stream.array() );
|
||||
return new S35PacketUpdateTileEntity( this.pos, 64, data );
|
||||
return new SPacketUpdateTileEntity( this.pos, 64, data );
|
||||
}
|
||||
|
||||
private boolean hasHandlerFor( final TileEventType type )
|
||||
@@ -222,7 +223,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket( final NetworkManager net, final S35PacketUpdateTileEntity pkt )
|
||||
public void onDataPacket( final NetworkManager net, final SPacketUpdateTileEntity pkt )
|
||||
{
|
||||
// / pkt.actionType
|
||||
if( pkt.getTileEntityType() == 64 )
|
||||
@@ -298,6 +299,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
||||
if( this.worldObj != null )
|
||||
{
|
||||
AELog.blockUpdate( this.pos, this );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
this.worldObj.markBlockForUpdate( this.pos );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
@@ -509,7 +509,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
||||
|
||||
try
|
||||
{
|
||||
final TargetPoint where = new TargetPoint( this.worldObj.provider.getDimensionId(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), 32 );
|
||||
final TargetPoint where = new TargetPoint( this.worldObj.provider.getDimension(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), 32 );
|
||||
final IAEItemStack item = AEItemStack.create( output );
|
||||
NetworkHandler.instance.sendToAllAround( new PacketAssemblerAnimation( this.pos, (byte) speed, item ), where );
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.implementations.tiles.ICrankable;
|
||||
@@ -108,7 +108,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, ITickable
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
final IBlockState state = this.worldObj.getBlockState( this.pos );
|
||||
this.getBlockType().onNeighborBlockChange( this.worldObj, this.pos, state, state.getBlock() );
|
||||
this.getBlockType().neighborChanged( state, this.worldObj, this.pos, state.getBlock() );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,7 +159,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, ITickable
|
||||
final double xOff = -0.15 * this.getUp().getFrontOffsetX();
|
||||
final double yOff = -0.15 * this.getUp().getFrontOffsetY();
|
||||
final double zOff = -0.15 * this.getUp().getFrontOffsetZ();
|
||||
return Collections.singletonList( AxisAlignedBB.fromBounds( xOff + 0.15, yOff + 0.15, zOff + 0.15, xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
|
||||
return Collections.singletonList( new AxisAlignedBB( xOff + 0.15, yOff + 0.15, zOff + 0.15, xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -168,7 +168,7 @@ public class TileCrank extends AEBaseTile implements ICustomCollision, ITickable
|
||||
final double xOff = -0.15 * this.getUp().getFrontOffsetX();
|
||||
final double yOff = -0.15 * this.getUp().getFrontOffsetY();
|
||||
final double zOff = -0.15 * this.getUp().getFrontOffsetZ();
|
||||
out.add( AxisAlignedBB.fromBounds( xOff + 0.15, yOff + 0.15, zOff + 0.15,// ahh
|
||||
out.add( new AxisAlignedBB( xOff + 0.15, yOff + 0.15, zOff + 0.15,// ahh
|
||||
xOff + 0.85, yOff + 0.85, zOff + 0.85 ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class TileGrinder extends AEBaseInvTile implements ICrankable
|
||||
{
|
||||
super.setOrientation( inForward, inUp );
|
||||
final IBlockState state = this.worldObj.getBlockState( this.pos );
|
||||
this.getBlockType().onNeighborBlockChange( this.worldObj, this.pos, state, state.getBlock() );
|
||||
this.getBlockType().neighborChanged( state, this.worldObj, this.pos, state.getBlock() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -269,7 +269,7 @@ public class AppEngInternalAEInventory implements IInventory, Iterable<ItemStack
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.core.AELog;
|
||||
@@ -274,7 +274,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
|
||||
public class AppEngNullInventory implements IInventory
|
||||
@@ -104,7 +104,7 @@ public class AppEngNullInventory implements IInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.CopyMode;
|
||||
|
||||
@@ -32,8 +32,8 @@ import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -29,8 +29,8 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
|
||||
@@ -32,9 +32,9 @@ import io.netty.buffer.Unpooled;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -150,7 +150,7 @@ public class TilePaint extends AEBaseTile
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange()
|
||||
public void neighborChanged()
|
||||
{
|
||||
if( this.dots == null )
|
||||
{
|
||||
@@ -172,7 +172,7 @@ public class TilePaint extends AEBaseTile
|
||||
{
|
||||
final BlockPos p = this.pos.offset( side );
|
||||
final IBlockState blk = this.worldObj.getBlockState( p );
|
||||
return blk.getBlock().isSideSolid( this.worldObj, p, side.getOpposite() );
|
||||
return blk.getBlock().isSideSolid( this.worldObj.getBlockState( p ), this.worldObj, p, side.getOpposite() );
|
||||
}
|
||||
|
||||
private void removeSide( final EnumFacing side )
|
||||
@@ -232,12 +232,12 @@ public class TilePaint extends AEBaseTile
|
||||
return this.isLit;
|
||||
}
|
||||
|
||||
public void addBlot( final ItemStack type, final EnumFacing side, final Vec3 hitVec )
|
||||
public void addBlot( final ItemStack type, final EnumFacing side, final Vec3d hitVec )
|
||||
{
|
||||
final BlockPos p = this.pos.offset( side );
|
||||
|
||||
final IBlockState blk = this.worldObj.getBlockState( p );
|
||||
if( blk.getBlock().isSideSolid( this.worldObj, p, side.getOpposite() ) )
|
||||
if( blk.getBlock().isSideSolid( this.worldObj.getBlockState( p ), this.worldObj, p, side.getOpposite() ) )
|
||||
{
|
||||
final ItemPaintBall ipb = (ItemPaintBall) type.getItem();
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
||||
@Override
|
||||
public boolean canExtractItem( final int slotIndex, final ItemStack extractedItem, final EnumFacing side )
|
||||
{
|
||||
return extractedItem.getItem() == Items.bucket;
|
||||
return extractedItem.getItem() == Items.BUCKET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,10 +29,10 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
@@ -294,7 +294,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectedPart selectPart( final Vec3 pos )
|
||||
public SelectedPart selectPart( final Vec3d pos )
|
||||
{
|
||||
return this.getCableBus().selectPart( pos );
|
||||
}
|
||||
@@ -349,7 +349,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
{
|
||||
for( final AxisAlignedBB bx : this.getSelectedBoundingBoxesFromPool( w, pos, e, false ) )
|
||||
{
|
||||
out.add( AxisAlignedBB.fromBounds( bx.minX, bx.minY, bx.minZ, bx.maxX, bx.maxY, bx.maxZ ) );
|
||||
out.add( new AxisAlignedBB( bx.minX, bx.minY, bx.minZ, bx.maxX, bx.maxY, bx.maxZ ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.GridFlags;
|
||||
@@ -219,7 +219,7 @@ public class TileController extends AENetworkPowerTile
|
||||
private boolean checkController( final BlockPos pos )
|
||||
{
|
||||
final BlockPos ownPos = this.getPos();
|
||||
if( this.worldObj.getChunkProvider().chunkExists( ownPos.getX() >> 4, ownPos.getZ() >> 4 ) )
|
||||
if( this.worldObj.getChunkProvider().getLoadedChunk( ownPos.getX() >> 4, ownPos.getZ() >> 4 ) != null )
|
||||
{
|
||||
return this.worldObj.getTileEntity( pos ) instanceof TileController;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
public void onReady()
|
||||
{
|
||||
super.onReady();
|
||||
this.onNeighborBlockChange();
|
||||
this.neighborChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,7 +94,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange()
|
||||
public void neighborChanged()
|
||||
{
|
||||
this.calc.calculateMultiblock( this.worldObj, this.getLocation() );
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
|
||||
@@ -22,9 +22,11 @@ package appeng.tile.storage;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
|
||||
import appeng.tile.AEBaseInvTile;
|
||||
import appeng.tile.TileEvent;
|
||||
@@ -89,7 +91,7 @@ public class TileSkyChest extends AEBaseInvTile
|
||||
|
||||
if( this.getPlayerOpen() == 1 )
|
||||
{
|
||||
this.getWorld().playSoundEffect( this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, "random.chestopen", 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
||||
this.getWorld().playSound( player, this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
||||
this.markForUpdate();
|
||||
}
|
||||
}
|
||||
@@ -111,7 +113,7 @@ public class TileSkyChest extends AEBaseInvTile
|
||||
|
||||
if( this.getPlayerOpen() == 0 )
|
||||
{
|
||||
this.getWorld().playSoundEffect( this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, "random.chestclosed", 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
||||
this.getWorld().playSound( player, this.pos.getX() + 0.5D, this.pos.getY() + 0.5D, this.pos.getZ() + 0.5D, SoundEvents.BLOCK_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, this.getWorld().rand.nextFloat() * 0.1F + 0.9F );
|
||||
this.markForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user