Working spatial dimensions teleport.

This commit is contained in:
Sebastian Hartte
2020-06-13 01:11:31 +02:00
parent e83429e1bb
commit 94226f3219
22 changed files with 522 additions and 872 deletions
@@ -31,6 +31,7 @@ import net.minecraft.world.World;
import appeng.api.implementations.TransitionResult;
import appeng.api.storage.ISpatialDimension;
import appeng.api.util.WorldCoord;
import net.minecraft.world.dimension.DimensionType;
/**
@@ -53,12 +54,6 @@ public interface ISpatialStorageCell
*/
int getMaxStoredDim( ItemStack is );
/**
* @param is spatial storage cell
*
* @return the world for this cell
*/
ISpatialDimension getSpatialDimension();
/**
* get the currently stored size.
@@ -76,7 +71,7 @@ public interface ISpatialStorageCell
*
* @return dimension id or -1
*/
int getStoredDimensionID( ItemStack is );
DimensionType getStoredDimension(ItemStack is );
/**
* Perform a spatial swap with the contents of the cell, and the world.
@@ -21,21 +21,26 @@ package appeng.api.storage;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.server.ServerWorld;
import javax.annotation.Nullable;
public interface ISpatialDimension
{
World getWorld();
ServerWorld getWorld(DimensionType cellDim );
int createNewCellDimension( BlockPos contentSize, int playerId );
@Nullable
DimensionType createNewCellDimension(BlockPos contentSize, int playerId );
void deleteCellDimension( int cellDimId );
void deleteCellDimension( DimensionType cellDim );
boolean isCellDimension( int cellDimID );
boolean isCellDimension( DimensionType cellDim );
int getCellDimensionOwner( int cellDimId );
int getCellDimensionOwner( DimensionType cellDim );
BlockPos getCellDimensionOrigin( int cellDimId );
BlockPos getCellDimensionOrigin( DimensionType cellDim );
BlockPos getCellContentSize( int cellDimId );
BlockPos getCellContentSize( DimensionType cellDim );
}