Class Contraption
java.lang.Object
com.simibubi.create.content.contraptions.components.structureMovement.Contraption
- Direct Known Subclasses:
BearingContraption,CarriageContraption,ClockworkContraption,MountedContraption,StabilizedContraption,TranslatingContraption
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<org.apache.commons.lang3.tuple.MutablePair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo,MovementContext>> net.minecraft.core.BlockPosprotected Map<net.minecraft.core.BlockPos,net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo> net.minecraft.world.phys.AABBbooleanbooleanprotected Map<net.minecraft.core.BlockPos,MovingInteractionBehaviour> List<net.minecraft.world.level.block.entity.BlockEntity>Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.entity.BlockEntity> protected List<net.minecraft.core.BlockPos>List<net.minecraft.world.level.block.entity.BlockEntity>booleanprotected MountedStorageManagerprotected List<net.minecraft.world.phys.AABB>protected ContraptionWorld -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBlock(net.minecraft.core.BlockPos pos, org.apache.commons.lang3.tuple.Pair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo, net.minecraft.world.level.block.entity.BlockEntity> pair) voidaddBlocksToWorld(net.minecraft.world.level.Level world, StructureTransform transform) voidaddPassengersToWorld(net.minecraft.world.level.Level world, StructureTransform transform, List<net.minecraft.world.entity.Entity> seatedEntities) protected booleanaddToInitialFrontier(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction forcedDirection, Queue<net.minecraft.core.BlockPos> frontier) abstract booleanassemble(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) abstract booleancanBeStabilized(net.minecraft.core.Direction facing, net.minecraft.core.BlockPos localPos) protected org.apache.commons.lang3.tuple.Pair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo,net.minecraft.world.level.block.entity.BlockEntity> capture(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) booleanprotected booleancustomBlockPlacement(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) protected booleancustomBlockRemoval(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) voidexpandBoundsAroundAxis(net.minecraft.core.Direction.Axis axis) voidforEachActor(net.minecraft.world.level.Level world, BiConsumer<MovementBehaviour, MovementContext> callBack) static ContraptionfromNBT(net.minecraft.world.level.Level world, net.minecraft.nbt.CompoundTag nbt, boolean spawnData) List<org.apache.commons.lang3.tuple.MutablePair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo,MovementContext>> net.minecraft.core.BlockPosgetBearingPosOf(UUID subContraptionEntityId) Map<net.minecraft.core.BlockPos,net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo> Map<net.minecraft.core.BlockPos,MovingInteractionBehaviour> static floatgetMaxDistSqr(Set<net.minecraft.core.BlockPos> blocks, ICoordinate one, ICoordinate other) static floatCollection<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo>net.minecraft.core.BlockPosList<net.minecraft.core.BlockPos>getSeats()net.minecraftforge.fluids.capability.IFluidHandlernet.minecraftforge.items.IItemHandlerModifiablenet.minecraftforge.items.IItemHandlerModifiableCollection<net.minecraft.world.level.block.entity.BlockEntity>protected MountedStorageManagerprotected net.minecraft.nbt.CompoundTaggetTileEntityNBT(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) protected abstract ContraptionTypegetType()voidhandleContraptionFluidPacket(net.minecraft.core.BlockPos localPos, net.minecraftforge.fluids.FluidStack containedFluid) voidprotected booleanisAnchoringBlockAt(net.minecraft.core.BlockPos pos) booleanisHiddenInPortal(net.minecraft.core.BlockPos localPos) protected booleanmoveBlock(net.minecraft.world.level.Level world, net.minecraft.core.Direction forcedDirection, Queue<net.minecraft.core.BlockPos> frontier, Set<net.minecraft.core.BlockPos> visited) move the first block in frontier queueprotected voidmoveGantryPinion(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, Queue<net.minecraft.core.BlockPos> frontier, Set<net.minecraft.core.BlockPos> visited, net.minecraft.world.level.block.state.BlockState state) protected voidmoveGantryShaft(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, Queue<net.minecraft.core.BlockPos> frontier, Set<net.minecraft.core.BlockPos> visited, net.minecraft.world.level.block.state.BlockState state) protected booleanmovementAllowed(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) protected voidmovePistonHead(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, Queue<net.minecraft.core.BlockPos> frontier, Set<net.minecraft.core.BlockPos> visited, net.minecraft.world.level.block.state.BlockState state) protected voidmovePistonPole(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, Queue<net.minecraft.core.BlockPos> frontier, Set<net.minecraft.core.BlockPos> visited, net.minecraft.world.level.block.state.BlockState state) voidvoidonEntityInitialize(net.minecraft.world.level.Level world, AbstractContraptionEntity contraptionEntity) voidvoidreadNBT(net.minecraft.world.level.Level world, net.minecraft.nbt.CompoundTag nbt, boolean spawnData) voidremoveBlocksFromWorld(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos offset) booleansearchMovedStructure(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction forcedDirection) voidsetSeatMapping(Map<UUID, Integer> seatMapping) protected booleanshouldUpdateAfterMovement(net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info) voidstartMoving(net.minecraft.world.level.Level world) voidstop(net.minecraft.world.level.Level world) voidtickStorage(AbstractContraptionEntity entity) protected net.minecraft.core.BlockPostoLocalPos(net.minecraft.core.BlockPos globalPos) net.minecraft.nbt.CompoundTagwriteNBT(boolean spawnPacket)
-
Field Details
-
simplifiedEntityColliders
-
entity
-
bounds
public net.minecraft.world.phys.AABB bounds -
anchor
public net.minecraft.core.BlockPos anchor -
stalled
public boolean stalled -
hasUniversalCreativeCrate
public boolean hasUniversalCreativeCrate -
blocks
protected Map<net.minecraft.core.BlockPos,net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo> blocks -
actors
protected List<org.apache.commons.lang3.tuple.MutablePair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo,MovementContext>> actors -
interactors
-
superglue
-
seats
-
seatMapping
-
stabilizedSubContraptions
-
storage
-
presentTileEntities
public Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.entity.BlockEntity> presentTileEntities -
maybeInstancedTileEntities
-
specialRenderedTileEntities
-
world
-
deferInvalidate
public boolean deferInvalidate
-
-
Constructor Details
-
Contraption
public Contraption()
-
-
Method Details
-
getContraptionWorld
-
assemble
public abstract boolean assemble(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) throws AssemblyException - Throws:
AssemblyException
-
canBeStabilized
public abstract boolean canBeStabilized(net.minecraft.core.Direction facing, net.minecraft.core.BlockPos localPos) -
getType
-
customBlockPlacement
protected boolean customBlockPlacement(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
customBlockRemoval
protected boolean customBlockRemoval(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
addToInitialFrontier
protected boolean addToInitialFrontier(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction forcedDirection, Queue<net.minecraft.core.BlockPos> frontier) throws AssemblyException - Throws:
AssemblyException
-
fromNBT
public static Contraption fromNBT(net.minecraft.world.level.Level world, net.minecraft.nbt.CompoundTag nbt, boolean spawnData) -
searchMovedStructure
public boolean searchMovedStructure(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.core.Direction forcedDirection) throws AssemblyException - Throws:
AssemblyException
-
onEntityCreated
-
onEntityRemoved
-
onEntityInitialize
public void onEntityInitialize(net.minecraft.world.level.Level world, AbstractContraptionEntity contraptionEntity) -
moveBlock
protected boolean moveBlock(net.minecraft.world.level.Level world, @Nullable net.minecraft.core.Direction forcedDirection, Queue<net.minecraft.core.BlockPos> frontier, Set<net.minecraft.core.BlockPos> visited) throws AssemblyException move the first block in frontier queue- Throws:
AssemblyException
-
movePistonHead
-
movePistonPole
-
moveGantryPinion
-
moveGantryShaft
-
capture
protected org.apache.commons.lang3.tuple.Pair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo,net.minecraft.world.level.block.entity.BlockEntity> capture(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) -
addBlock
protected void addBlock(net.minecraft.core.BlockPos pos, org.apache.commons.lang3.tuple.Pair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo, net.minecraft.world.level.block.entity.BlockEntity> pair) -
getTileEntityNBT
@Nullable protected net.minecraft.nbt.CompoundTag getTileEntityNBT(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) -
toLocalPos
protected net.minecraft.core.BlockPos toLocalPos(net.minecraft.core.BlockPos globalPos) -
movementAllowed
protected boolean movementAllowed(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) -
isAnchoringBlockAt
protected boolean isAnchoringBlockAt(net.minecraft.core.BlockPos pos) -
readNBT
public void readNBT(net.minecraft.world.level.Level world, net.minecraft.nbt.CompoundTag nbt, boolean spawnData) -
writeNBT
public net.minecraft.nbt.CompoundTag writeNBT(boolean spawnPacket) -
getStorageForSpawnPacket
-
removeBlocksFromWorld
public void removeBlocksFromWorld(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos offset) -
addBlocksToWorld
-
addPassengersToWorld
public void addPassengersToWorld(net.minecraft.world.level.Level world, StructureTransform transform, List<net.minecraft.world.entity.Entity> seatedEntities) -
startMoving
public void startMoving(net.minecraft.world.level.Level world) -
stop
public void stop(net.minecraft.world.level.Level world) -
forEachActor
public void forEachActor(net.minecraft.world.level.Level world, BiConsumer<MovementBehaviour, MovementContext> callBack) -
shouldUpdateAfterMovement
protected boolean shouldUpdateAfterMovement(net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo info) -
expandBoundsAroundAxis
public void expandBoundsAroundAxis(net.minecraft.core.Direction.Axis axis) -
getSeatMapping
-
getSeatOf
-
getBearingPosOf
-
setSeatMapping
-
getSeats
-
getBlocks
public Map<net.minecraft.core.BlockPos,net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo> getBlocks() -
getActors
public List<org.apache.commons.lang3.tuple.MutablePair<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo,MovementContext>> getActors() -
getInteractors
-
makeLighter
-
invalidateColliders
public void invalidateColliders() -
getRadius
public static float getRadius(Set<net.minecraft.core.BlockPos> blocks, net.minecraft.core.Direction.Axis axis) -
getMaxDistSqr
public static float getMaxDistSqr(Set<net.minecraft.core.BlockPos> blocks, ICoordinate one, ICoordinate other) -
getRenderedBlocks
public Collection<net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo> getRenderedBlocks() -
getSpecialRenderedTEs
-
isHiddenInPortal
public boolean isHiddenInPortal(net.minecraft.core.BlockPos localPos) -
getSimplifiedEntityColliders
-
handleContraptionFluidPacket
public void handleContraptionFluidPacket(net.minecraft.core.BlockPos localPos, net.minecraftforge.fluids.FluidStack containedFluid) -
tickStorage
-
containsBlockBreakers
public boolean containsBlockBreakers()
-