public abstract class GelStructurePiece
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 |
---|
GelStructurePiece(net.minecraft.world.gen.feature.structure.IStructurePieceType structurePieceType,
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) |
GelStructurePiece(net.minecraft.world.gen.feature.template.TemplateManager templateManager,
net.minecraft.nbt.CompoundNBT nbt,
net.minecraft.world.gen.feature.structure.IStructurePieceType structurePieceType) |
Modifier and Type | Method and Description |
---|---|
boolean |
create(net.minecraft.world.IWorld world,
net.minecraft.world.gen.ChunkGenerator<?> chunkGen,
java.util.Random rand,
net.minecraft.util.math.MutableBoundingBox bounds,
net.minecraft.util.math.ChunkPos chunkPos)
addComponentParts
Modification of addComponentParts to allow for data structure block handling. |
<T extends net.minecraft.entity.Entity> |
createEntity(net.minecraft.entity.EntityType<T> entityType,
net.minecraft.world.IWorld 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.
|
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.
|
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.world.IWorld world,
net.minecraft.util.math.BlockPos pos,
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)
|
addJunction, getGroundLevelDelta, getJigsawPiece, getJunctions, getPos, getRotation, offset, toString
public GelStructurePiece(net.minecraft.world.gen.feature.structure.IStructurePieceType structurePieceType, 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 GelStructurePiece(net.minecraft.world.gen.feature.template.TemplateManager templateManager, net.minecraft.nbt.CompoundNBT nbt, net.minecraft.world.gen.feature.structure.IStructurePieceType structurePieceType)
public boolean create(net.minecraft.world.IWorld world, net.minecraft.world.gen.ChunkGenerator<?> chunkGen, java.util.Random rand, net.minecraft.util.math.MutableBoundingBox bounds, net.minecraft.util.math.ChunkPos chunkPos)
create
in class net.minecraft.world.gen.feature.structure.AbstractVillagePiece
public abstract void handleDataMarker(java.lang.String key, net.minecraft.world.IWorld world, net.minecraft.util.math.BlockPos pos, java.util.Random rand, net.minecraft.util.math.MutableBoundingBox bounds)
TemplateStructurePiece
key
- world
- pos
- bounds
- public <T extends net.minecraft.entity.Entity> T createEntity(net.minecraft.entity.EntityType<T> entityType, net.minecraft.world.IWorld 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
-