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:
@@ -18,20 +18,14 @@
|
||||
|
||||
package appeng.spatial;
|
||||
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
|
||||
public class BiomeGenStorage extends BiomeGenBase
|
||||
public class BiomeGenStorage extends Biome
|
||||
{
|
||||
|
||||
public BiomeGenStorage( final int id )
|
||||
public BiomeGenStorage()
|
||||
{
|
||||
super( id );
|
||||
this.setBiomeName( "Storage Cell" );
|
||||
|
||||
this.setDisableRain();
|
||||
this.temperature = -100;
|
||||
super(new BiomeProperties( "Storage Cell" ).setRainDisabled().setTemperature( -100 ));
|
||||
|
||||
this.theBiomeDecorator.treesPerChunk = 0;
|
||||
this.theBiomeDecorator.flowersPerChunk = 0;
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.Map.Entry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.NextTickListEntry;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
@@ -137,7 +137,7 @@ public class CachedPlane
|
||||
final Block blk = (Block) details[0];
|
||||
|
||||
// don't skip air, just let the code replace it...
|
||||
if( blk != null && blk.isAir( c.getWorld(), tePOS ) && blk.isReplaceable( c.getWorld(), tePOS ) )
|
||||
if( blk != null && blk.isAir( c.getWorld().getBlockState( tePOS ), c.getWorld(), tePOS ) && blk.isReplaceable( c.getWorld(), tePOS ) )
|
||||
{
|
||||
c.getWorld().setBlockToAir( tePOS );
|
||||
}
|
||||
@@ -312,6 +312,7 @@ public class CachedPlane
|
||||
if( c.c.isLoaded() )
|
||||
{
|
||||
this.world.addTileEntity( te );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
this.world.markBlockForUpdate( pos );
|
||||
}
|
||||
}
|
||||
@@ -428,7 +429,7 @@ public class CachedPlane
|
||||
private boolean doNotSkip( final int y )
|
||||
{
|
||||
final ExtendedBlockStorage extendedblockstorage = this.storage[y >> 4];
|
||||
if( CachedPlane.this.reg.isBlacklisted( extendedblockstorage.getBlockByExtId( this.x, y & 15, this.z ) ) )
|
||||
if( CachedPlane.this.reg.isBlacklisted( extendedblockstorage.get( this.x, y & 15, this.z ).getBlock() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.spatial;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
@@ -55,6 +55,7 @@ public class DefaultSpatialHandler implements IMovableHandler
|
||||
if( c.isLoaded() )
|
||||
{
|
||||
w.addTileEntity( te );
|
||||
//TODO 1.9.4 - markBlockForUpdate => ?
|
||||
w.markBlockForUpdate( newPosition );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.spatial;
|
||||
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
||||
public interface ISpatialVisitor
|
||||
|
||||
@@ -24,17 +24,16 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.ChunkProviderGenerate;
|
||||
import net.minecraft.world.gen.ChunkProviderOverworld;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.core.AEConfig;
|
||||
|
||||
|
||||
public class StorageChunkProvider extends ChunkProviderGenerate
|
||||
public class StorageChunkProvider extends ChunkProviderOverworld
|
||||
{
|
||||
private static final int SQUARE_CHUNK_SIZE = 256;
|
||||
private static final Block[] BLOCKS;
|
||||
@@ -83,17 +82,11 @@ public class StorageChunkProvider extends ChunkProviderGenerate
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populate( final IChunkProvider par1iChunkProvider, final int par2, final int par3 )
|
||||
public void populate( final int par2, final int par3 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean unloadQueuedChunks()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List getPossibleCreatures( final EnumCreatureType creatureType, final BlockPos pos )
|
||||
{
|
||||
|
||||
@@ -27,9 +27,9 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityHanging;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.Teleporter;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
@@ -88,16 +88,18 @@ public class StorageHelper
|
||||
return entity;
|
||||
}
|
||||
|
||||
//TODO 1.9.4 - Multiple passangers & cell transfers. Take a look at portals.
|
||||
|
||||
// Is something riding? Handle it first.
|
||||
if( entity.riddenByEntity != null )
|
||||
if( entity.isBeingRidden() )
|
||||
{
|
||||
return this.teleportEntity( entity.riddenByEntity, link );
|
||||
}
|
||||
// Are we riding something? Dismount and tell the mount to go first.
|
||||
Entity cart = entity.ridingEntity;
|
||||
Entity cart = entity.getRidingEntity();
|
||||
if( cart != null )
|
||||
{
|
||||
entity.mountEntity( null );
|
||||
entity.dismountRidingEntity();
|
||||
cart = this.teleportEntity( cart, link );
|
||||
// We keep track of both so we can remount them on the other side.
|
||||
}
|
||||
@@ -115,10 +117,11 @@ public class StorageHelper
|
||||
Achievements.SpatialIOExplorer.addToPlayer( player );
|
||||
}
|
||||
|
||||
player.mcServer.getConfigurationManager().transferPlayerToDimension( player, link.dim.provider.getDimensionId(), new METeleporter( newWorld, link ) );
|
||||
player.mcServer.getPlayerList().transferPlayerToDimension( player, link.dim.provider.getDimension(), new METeleporter( newWorld, link ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO 1.9.4 - Whole entity transfer part, we now have changeDimension method. Evaluate it and remove this s...
|
||||
final int entX = entity.chunkCoordX;
|
||||
final int entZ = entity.chunkCoordZ;
|
||||
|
||||
@@ -142,7 +145,7 @@ public class StorageHelper
|
||||
}
|
||||
|
||||
newEntity.copyDataFromOld( entity );
|
||||
newEntity.dimension = newWorld.provider.getDimensionId();
|
||||
newEntity.dimension = newWorld.provider.getDimension();
|
||||
newEntity.forceSpawn = true;
|
||||
|
||||
entity.isDead = true;
|
||||
@@ -169,7 +172,7 @@ public class StorageHelper
|
||||
entity.worldObj.updateEntityWithOptionalForce( entity, true );
|
||||
}
|
||||
|
||||
entity.mountEntity( cart );
|
||||
entity.startRiding( cart, false );
|
||||
}
|
||||
|
||||
return entity;
|
||||
@@ -214,9 +217,9 @@ public class StorageHelper
|
||||
this.transverseEdges( i - 1, j - 1, k - 1, i + scaleX + 1, j + scaleY + 1, k + scaleZ + 1, new WrapInMatrixFrame( matrixFrameBlock.getDefaultState(), dst ) );
|
||||
}
|
||||
|
||||
final AxisAlignedBB srcBox = AxisAlignedBB.fromBounds( x, y, z, x + scaleX + 1, y + scaleY + 1, z + scaleZ + 1 );
|
||||
final AxisAlignedBB srcBox = new AxisAlignedBB( x, y, z, x + scaleX + 1, y + scaleY + 1, z + scaleZ + 1 );
|
||||
|
||||
final AxisAlignedBB dstBox = AxisAlignedBB.fromBounds( i, j, k, i + scaleX + 1, j + scaleY + 1, k + scaleZ + 1 );
|
||||
final AxisAlignedBB dstBox = new AxisAlignedBB( i, j, k, i + scaleX + 1, j + scaleY + 1, k + scaleZ + 1 );
|
||||
|
||||
final CachedPlane cDst = new CachedPlane( dst, i, j, k, i + scaleX, j + scaleY, k + scaleZ );
|
||||
final CachedPlane cSrc = new CachedPlane( src, x, y, z, x + scaleX, y + scaleY, z + scaleZ );
|
||||
@@ -276,7 +279,7 @@ public class StorageHelper
|
||||
public void visit( final BlockPos pos )
|
||||
{
|
||||
final Block blk = this.dst.getBlockState( pos ).getBlock();
|
||||
blk.onNeighborBlockChange( this.dst, pos, Platform.AIR_BLOCK.getDefaultState(), Platform.AIR_BLOCK );
|
||||
blk.neighborChanged( Platform.AIR_BLOCK.getDefaultState(), this.dst, pos, Platform.AIR_BLOCK );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,20 +20,19 @@ package appeng.spatial;
|
||||
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.DimensionType;
|
||||
import net.minecraft.world.WorldProvider;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.WorldChunkManagerHell;
|
||||
import net.minecraft.world.biome.BiomeProviderSingle;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraftforge.client.IRenderHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.client.render.SpatialSkyRender;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.Registration;
|
||||
|
||||
|
||||
public class StorageWorldProvider extends WorldProvider
|
||||
@@ -42,20 +41,11 @@ public class StorageWorldProvider extends WorldProvider
|
||||
public StorageWorldProvider()
|
||||
{
|
||||
this.hasNoSky = true;
|
||||
this.biomeProvider = new BiomeProviderSingle( AppEng.instance().getRegistration().getStorageBiome() );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void registerWorldChunkManager()
|
||||
{
|
||||
final AppEng ae2internal = AppEng.instance();
|
||||
final Registration ae2registration = ae2internal.getRegistration();
|
||||
final BiomeGenBase storageBiome = ae2registration.getStorageBiome();
|
||||
|
||||
super.worldChunkMgr = new WorldChunkManagerHell( storageBiome, 0.0F );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkProvider createChunkGenerator()
|
||||
public IChunkGenerator createChunkGenerator()
|
||||
{
|
||||
return new StorageChunkProvider( this.worldObj, 0 );
|
||||
}
|
||||
@@ -80,9 +70,9 @@ public class StorageWorldProvider extends WorldProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getFogColor( final float par1, final float par2 )
|
||||
public Vec3d getFogColor( final float par1, final float par2 )
|
||||
{
|
||||
return new Vec3( 0.07, 0.07, 0.07 );
|
||||
return new Vec3d( 0.07, 0.07, 0.07 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,9 +95,9 @@ public class StorageWorldProvider extends WorldProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDimensionName()
|
||||
public DimensionType getDimensionType()
|
||||
{
|
||||
return "Storage Cell";
|
||||
return AppEng.instance().getRegistration().getStorageDimensionType();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,9 +113,9 @@ public class StorageWorldProvider extends WorldProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getSkyColor( final Entity cameraEntity, final float partialTicks )
|
||||
public Vec3d getSkyColor( final Entity cameraEntity, final float partialTicks )
|
||||
{
|
||||
return new Vec3( 0.07, 0.07, 0.07 );
|
||||
return new Vec3d( 0.07, 0.07, 0.07 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -157,10 +147,4 @@ public class StorageWorldProvider extends WorldProvider
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInternalNameSuffix()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user