Spatial rework (#3048)

* Moved all spatial cells into a single dimension instead of one dimension per cell

Each cell will now be backed by a single region file each. So  backups and restores can still be done on a per cell level.

Old cells will not be migrated.

* Moved custom cell tracking to a capability based one on the world

The size and owner of a cell is now stored inside the capabilities of the world/dimension not a custom system and we can rely on forge handling the persistence of it.

* Added the cell id to the actual item tooltip, as this is now a real identifier and not an arbitrary dimension id.

* Added vanilla banners to the whitelist

* Added unittests to the dimension manager to ensure the algorithm mapping to the correct region file

* Updated the API to conform with the new dimenion/types/biomes registration and mappings

* Fixed a couple of bugs related to world/dimension/biome registration 

* Fixed a bug when transfering certain blocks due to passing missing/incorrect blockstate
This commit is contained in:
fscan
2017-08-24 11:24:33 +02:00
committed by yueh
parent 1513ba3f6a
commit bbf4d4a9ce
21 changed files with 615 additions and 427 deletions
@@ -147,13 +147,12 @@ public class CachedPlane
else
{
final Object[] details = this.myColumns[tePOS.getX() - minX][tePOS.getZ() - minZ].getDetails( tePOS.getY() );
final Block blk = (Block) details[0];
final IBlockState blkState = (IBlockState) details[0];
// don't skip air, just let the code replace it...
if( blk != null && blk.isAir( c.getWorld().getBlockState( tePOS ), c.getWorld(), tePOS ) && blk.isReplaceable( c.getWorld(),
tePOS ) )
if( blkState != null && blkState.getBlock() == Platform.AIR_BLOCK && blkState.getMaterial().isReplaceable() )
{
c.getWorld().setBlockToAir( tePOS );
w.setBlockToAir( tePOS );
}
else
{
@@ -241,8 +241,9 @@ public class StorageHelper
@Override
public void visit( final BlockPos pos )
{
final Block blk = this.dst.getBlockState( pos ).getBlock();
blk.neighborChanged( Platform.AIR_BLOCK.getDefaultState(), this.dst, pos, Platform.AIR_BLOCK, pos );
final IBlockState state = this.dst.getBlockState( pos );
final Block blk = state.getBlock();
blk.neighborChanged( state, this.dst, pos, blk, pos );
}
}