public abstract class AbstractGelStructurePiece
extends net.minecraft.world.gen.feature.structure.AbstractVillagePiece
AbstractVillagePiece
for jigsaw structures that
allows for data structure block interaction and contains more functional
methods to go along with that. Use this as your piece type if you're doing
anything with jigsaw structures, as you'll have more options.Constructor and Description |
---|
AbstractGelStructurePiece(net.minecraft.world.gen.feature.template.TemplateManager templateManager,
net.minecraft.nbt.CompoundNBT nbt) |
AbstractGelStructurePiece(net.minecraft.world.gen.feature.template.TemplateManager templateManager,
net.minecraft.world.gen.feature.jigsaw.JigsawPiece jigsawPiece,
net.minecraft.util.math.BlockPos pos,
int groundLevelDelta,
net.minecraft.util.Rotation rotation,
net.minecraft.util.math.MutableBoundingBox bounds) |
Modifier and Type | Method and Description |
---|---|
<T extends net.minecraft.entity.Entity> |
createEntity(net.minecraft.entity.EntityType<T> entityType,
net.minecraft.world.IServerWorld worldIn,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Rotation rotation)
Shorthand method to create an entity with the given pos (offset by 0.5) and
rotation.
|
void |
extendDown(net.minecraft.world.IWorld worldIn,
net.minecraft.block.BlockState stateIn,
net.minecraft.util.math.MutableBoundingBox bounds,
net.minecraft.util.Rotation rotation,
java.util.Random random)
Fills the air and liquid below the lowest part of this structure with
stateIn.
|
void |
extendDown(net.minecraft.world.IWorld worldIn,
java.util.function.Function<java.util.Random,net.minecraft.block.BlockState> randStateIn,
net.minecraft.util.math.MutableBoundingBox bounds,
net.minecraft.util.Rotation rotation,
java.util.Random random)
Fills the air and liquid below the lowest part of this structure with the
BlockState produced from randStateIn.
|
boolean |
func_237001_a_(net.minecraft.world.ISeedReader seedReader,
net.minecraft.world.gen.feature.structure.StructureManager structureManager,
net.minecraft.world.gen.ChunkGenerator chunkGen,
java.util.Random rand,
net.minecraft.util.math.MutableBoundingBox bounds,
net.minecraft.util.math.BlockPos pos,
boolean isLegacy)
addComponentParts
Modification of addComponentParts to allow for data structure block handling. |
net.minecraft.util.ResourceLocation |
getLocation()
Gives you the name of this structure piece.
|
net.minecraft.util.math.BlockPos |
getSize()
Gets the size of the structure.
|
abstract net.minecraft.world.gen.feature.structure.IStructurePieceType |
getStructurePieceType()
Returns the
IStructurePieceType for this piece. |
net.minecraft.world.gen.feature.template.TemplateManager |
getTemplateManager()
Returns the template manager so you can get data about the structure itself.
|
abstract void |
handleDataMarker(java.lang.String key,
net.minecraft.util.math.BlockPos pos,
net.minecraft.world.IServerWorld world,
java.util.Random rand,
net.minecraft.util.math.MutableBoundingBox bounds)
Runs on every data structure block the same as you would in
TemplateStructurePiece |
void |
setAir(net.minecraft.world.IWorld world,
net.minecraft.util.math.BlockPos pos)
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 3)
|
void |
setStructurePieceType(net.minecraft.world.gen.feature.structure.IStructurePieceType structurePieceType)
Sets the
IStructurePieceType for this piece. |
addJunction, func_230383_a_, getGroundLevelDelta, getJigsawPiece, getJunctions, getPos, getRotation, offset, toString
public AbstractGelStructurePiece(net.minecraft.world.gen.feature.template.TemplateManager templateManager, net.minecraft.world.gen.feature.jigsaw.JigsawPiece jigsawPiece, net.minecraft.util.math.BlockPos pos, int groundLevelDelta, net.minecraft.util.Rotation rotation, net.minecraft.util.math.MutableBoundingBox bounds)
public AbstractGelStructurePiece(net.minecraft.world.gen.feature.template.TemplateManager templateManager, net.minecraft.nbt.CompoundNBT nbt)
public abstract void handleDataMarker(java.lang.String key, net.minecraft.util.math.BlockPos pos, net.minecraft.world.IServerWorld world, java.util.Random rand, net.minecraft.util.math.MutableBoundingBox bounds)
TemplateStructurePiece
key
- pos
- world
- bounds
- public abstract net.minecraft.world.gen.feature.structure.IStructurePieceType getStructurePieceType()
IStructurePieceType
for this piece.getStructurePieceType
in class net.minecraft.world.gen.feature.structure.StructurePiece
IStructurePieceType
public void setStructurePieceType(net.minecraft.world.gen.feature.structure.IStructurePieceType structurePieceType)
IStructurePieceType
for this piece.structurePieceType
- public boolean func_237001_a_(net.minecraft.world.ISeedReader seedReader, net.minecraft.world.gen.feature.structure.StructureManager structureManager, net.minecraft.world.gen.ChunkGenerator chunkGen, java.util.Random rand, net.minecraft.util.math.MutableBoundingBox bounds, net.minecraft.util.math.BlockPos pos, boolean isLegacy)
func_237001_a_
in class net.minecraft.world.gen.feature.structure.AbstractVillagePiece
Boolean
public <T extends net.minecraft.entity.Entity> T createEntity(net.minecraft.entity.EntityType<T> entityType, net.minecraft.world.IServerWorld worldIn, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Rotation rotation)
entityType
- worldIn
- pos
- rotation
- Entity
public net.minecraft.util.ResourceLocation getLocation()
ResourceLocation
public net.minecraft.world.gen.feature.template.TemplateManager getTemplateManager()
TemplateManager
public net.minecraft.util.math.BlockPos getSize()
BlockPos
public void setAir(net.minecraft.world.IWorld world, net.minecraft.util.math.BlockPos pos)
world
- pos
- public void extendDown(net.minecraft.world.IWorld worldIn, net.minecraft.block.BlockState stateIn, net.minecraft.util.math.MutableBoundingBox bounds, net.minecraft.util.Rotation rotation, java.util.Random random)
worldIn
- stateIn
- bounds
- rotation
- random
- public void extendDown(net.minecraft.world.IWorld worldIn, java.util.function.Function<java.util.Random,net.minecraft.block.BlockState> randStateIn, net.minecraft.util.math.MutableBoundingBox bounds, net.minecraft.util.Rotation rotation, java.util.Random random)
worldIn
- randStateIn
- bounds
- rotation
- random
-