bbf4d4a9ce
* 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
93 lines
2.6 KiB
Java
93 lines
2.6 KiB
Java
/*
|
|
* The MIT License (MIT)
|
|
*
|
|
* Copyright (c) 2013 AlgorithmX2
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
* this software and associated documentation files (the "Software"), to deal in
|
|
* the Software without restriction, including without limitation the rights to
|
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
* subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
package appeng.api.implementations.items;
|
|
|
|
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.world.World;
|
|
|
|
import appeng.api.implementations.TransitionResult;
|
|
import appeng.api.storage.ISpatialDimension;
|
|
import appeng.api.util.WorldCoord;
|
|
|
|
|
|
/**
|
|
* Implemented on a {@link Item}
|
|
*/
|
|
public interface ISpatialStorageCell
|
|
{
|
|
|
|
/**
|
|
* @param is spatial storage cell
|
|
*
|
|
* @return true if this item is a spatial storage cell
|
|
*/
|
|
boolean isSpatialStorage( ItemStack is );
|
|
|
|
/**
|
|
* @param is spatial storage cell
|
|
*
|
|
* @return the maximum size of the spatial storage cell along any given axis
|
|
*/
|
|
int getMaxStoredDim( ItemStack is );
|
|
|
|
/**
|
|
* @param is spatial storage cell
|
|
*
|
|
* @return the world for this cell
|
|
*/
|
|
ISpatialDimension getSpatialDimension();
|
|
|
|
/**
|
|
* get the currently stored size.
|
|
*
|
|
* @param is spatial storage cell
|
|
*
|
|
* @return size of spatial
|
|
*/
|
|
WorldCoord getStoredSize( ItemStack is );
|
|
|
|
/**
|
|
* get the currently stored Dimension id.
|
|
*
|
|
* @param is spatial storage cell
|
|
*
|
|
* @return dimension id or -1
|
|
*/
|
|
int getStoredDimensionID( ItemStack is );
|
|
|
|
/**
|
|
* Perform a spatial swap with the contents of the cell, and the world.
|
|
*
|
|
* @param is spatial storage cell
|
|
* @param w world of spatial
|
|
* @param min min coord
|
|
* @param max max coord
|
|
* @param playerId owner of current grid or -1
|
|
*
|
|
* @return result of transition
|
|
*/
|
|
TransitionResult doSpatialTransition( ItemStack is, World w, WorldCoord min, WorldCoord max, int playerId );
|
|
} |