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:
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2017, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.capabilities;
|
||||
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.storage.ISpatialDimension;
|
||||
|
||||
|
||||
class NullSpatialDimension implements ISpatialDimension
|
||||
{
|
||||
@Override
|
||||
public int createNewCellDimension( BlockPos size, int owner )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteCellDimension( int cellStorageId )
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCellDimensionOwner( int cellStorageId )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getCellDimensionOrigin( int cellStorageId )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCellDimension( int cellDimID )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getCellContentSize( int cellDimId )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user