Most of the 1.8 Port.

This commit is contained in:
AlgorithmX2
2015-06-15 19:44:59 -05:00
parent 17465e68e8
commit 38afde724b
824 changed files with 12120 additions and 9158 deletions
@@ -2,9 +2,10 @@ package appeng.worldgen.meteorite;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import appeng.util.Platform;
@@ -48,22 +49,12 @@ public class ChunkOnly extends StandardWorld
return Math.min( in, ( this.cz + 1 ) << 4 );
}
@Override
public int getBlockMetadata( int x, int y, int z )
{
if( this.range( x, y, z ) )
{
return this.target.getBlockMetadata( x & 0xF, y, z & 0xF );
}
return 0;
}
@Override
public Block getBlock( int x, int y, int z )
{
if( this.range( x, y, z ) )
{
return this.target.getBlock( x & 0xF, y, z & 0xF );
return this.target.getBlock( x, y, z );
}
return Platform.AIR_BLOCK;
}
@@ -74,17 +65,17 @@ public class ChunkOnly extends StandardWorld
if( this.range( x, y, z ) )
{
this.verticalBits |= 1 << ( y >> 4 );
this.w.setBlock( x, y, z, blk, 0, 1 );
this.w.setBlockState( new BlockPos( x, y, z), blk.getDefaultState() );
}
}
@Override
public void setBlock( int x, int y, int z, Block block, int meta, int flags )
public void setBlock( int x, int y, int z, IBlockState state, int flags )
{
if( this.range( x, y, z ) )
{
this.verticalBits |= 1 << ( y >> 4 );
this.w.setBlock( x, y, z, block, meta, flags & ( ~2 ) );
this.w.setBlockState( new BlockPos( x, y, z ), state, flags & ( ~2 ) );
}
}