public class Template
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Template.BlockInfo |
static class |
Template.EntityInfo |
Constructor and Description |
---|
Template() |
Modifier and Type | Method and Description |
---|---|
void |
addBlocksToWorld(World worldIn,
BlockPos pos,
ITemplateProcessor templateProcessor,
PlacementSettings placementIn,
int flags)
Adds blocks and entities from this structure to the given world.
|
void |
addBlocksToWorld(World worldIn,
BlockPos pos,
PlacementSettings placementIn)
This takes the data stored in this instance and puts them into the world.
|
void |
addBlocksToWorld(World worldIn,
BlockPos pos,
PlacementSettings placementIn,
int flags)
Adds blocks and entities from this structure to the given world.
|
void |
addBlocksToWorldChunk(World worldIn,
BlockPos pos,
PlacementSettings placementIn)
Add blocks and entities from this structure to the given world, restricting placement to within the chunk
bounding box.
|
BlockPos |
calculateConnectedPos(PlacementSettings placementIn,
BlockPos p_186262_2_,
PlacementSettings p_186262_3_,
BlockPos p_186262_4_) |
java.lang.String |
getAuthor() |
java.util.Map<BlockPos,java.lang.String> |
getDataBlocks(BlockPos pos,
PlacementSettings placementIn) |
BlockPos |
getSize() |
BlockPos |
getZeroPositionWithTransform(BlockPos p_189961_1_,
Mirror p_189961_2_,
Rotation p_189961_3_) |
static BlockPos |
getZeroPositionWithTransform(BlockPos p_191157_0_,
Mirror p_191157_1_,
Rotation p_191157_2_,
int p_191157_3_,
int p_191157_4_) |
void |
read(NBTTagCompound compound) |
static void |
registerFixes(DataFixer fixer) |
void |
setAuthor(java.lang.String authorIn) |
void |
takeBlocksFromWorld(World worldIn,
BlockPos startPos,
BlockPos endPos,
boolean takeEntities,
Block toIgnore)
takes blocks from the world and puts the data them into this template
|
static BlockPos |
transformedBlockPos(PlacementSettings placementIn,
BlockPos pos) |
BlockPos |
transformedSize(Rotation rotationIn) |
NBTTagCompound |
writeToNBT(NBTTagCompound nbt) |
public BlockPos getSize()
public void setAuthor(java.lang.String authorIn)
public java.lang.String getAuthor()
public void takeBlocksFromWorld(World worldIn, BlockPos startPos, BlockPos endPos, boolean takeEntities, Block toIgnore)
public java.util.Map<BlockPos,java.lang.String> getDataBlocks(BlockPos pos, PlacementSettings placementIn)
public BlockPos calculateConnectedPos(PlacementSettings placementIn, BlockPos p_186262_2_, PlacementSettings p_186262_3_, BlockPos p_186262_4_)
public static BlockPos transformedBlockPos(PlacementSettings placementIn, BlockPos pos)
public void addBlocksToWorldChunk(World worldIn, BlockPos pos, PlacementSettings placementIn)
worldIn
- The world to usepos
- The origin position for the structurePlacementSettings.setBoundingBoxFromChunk()
public void addBlocksToWorld(World worldIn, BlockPos pos, PlacementSettings placementIn)
worldIn
- The world to usepos
- The origin position for the structureplacementIn
- Placement settings to usepublic void addBlocksToWorld(World worldIn, BlockPos pos, PlacementSettings placementIn, int flags)
worldIn
- The world to usepos
- The origin position for the structureplacementIn
- Placement settings to useflags
- Flags to pass to World.setBlockState(BlockPos, IBlockState, int)
public void addBlocksToWorld(World worldIn, BlockPos pos, ITemplateProcessor templateProcessor, PlacementSettings placementIn, int flags)
worldIn
- The world to usepos
- The origin position for the structuretemplateProcessor
- The template processor to useplacementIn
- Placement settings to useflags
- Flags to pass to World.setBlockState(BlockPos, IBlockState, int)
public BlockPos getZeroPositionWithTransform(BlockPos p_189961_1_, Mirror p_189961_2_, Rotation p_189961_3_)
public static BlockPos getZeroPositionWithTransform(BlockPos p_191157_0_, Mirror p_191157_1_, Rotation p_191157_2_, int p_191157_3_, int p_191157_4_)
public static void registerFixes(DataFixer fixer)
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
public void read(NBTTagCompound compound)