Class PistonContraption
java.lang.Object
com.simibubi.create.content.contraptions.components.structureMovement.Contraption
com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption
com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonContraption
-
Nested Class Summary
Nested classes/interfaces inherited from class com.simibubi.create.content.contraptions.components.structureMovement.Contraption
Contraption.ContraptionInvWrapper -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected net.minecraft.core.DirectionFields inherited from class com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption
cachedColliderDirection, cachedCollidersFields inherited from class com.simibubi.create.content.contraptions.components.structureMovement.Contraption
actors, anchor, blocks, bounds, deferInvalidate, entity, hasUniversalCreativeCrate, interactors, maybeInstancedTileEntities, presentTileEntities, seatMapping, seats, simplifiedEntityColliders, specialRenderedTileEntities, stabilizedSubContraptions, stalled, storage, superglue, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlock(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> capture) protected booleanaddToInitialFrontier(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, Queue<net.minecraft.core.BlockPos> frontier) booleanassemble(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) protected 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) protected ContraptionTypegetType()protected booleanisAnchoringBlockAt(net.minecraft.core.BlockPos pos) voidreadNBT(net.minecraft.world.level.Level world, net.minecraft.nbt.CompoundTag nbt, boolean spawnData) net.minecraft.core.BlockPostoLocalPos(net.minecraft.core.BlockPos globalPos) net.minecraft.nbt.CompoundTagwriteNBT(boolean spawnPacket) Methods inherited from class com.simibubi.create.content.contraptions.components.structureMovement.TranslatingContraption
canBeStabilized, getColliders, removeBlocksFromWorldMethods inherited from class com.simibubi.create.content.contraptions.components.structureMovement.Contraption
addBlocksToWorld, addPassengersToWorld, capture, containsBlockBreakers, expandBoundsAroundAxis, forEachActor, fromNBT, getActors, getBearingPosOf, getBlocks, getContraptionWorld, getInteractors, getMaxDistSqr, getRadius, getRenderedBlocks, getSeatMapping, getSeatOf, getSeats, getSharedFluidTanks, getSharedFuelInventory, getSharedInventory, getSimplifiedEntityColliders, getSpecialRenderedTEs, getStorageForSpawnPacket, getTileEntityNBT, handleContraptionFluidPacket, invalidateColliders, isHiddenInPortal, moveBlock, moveGantryPinion, moveGantryShaft, movementAllowed, movePistonHead, movePistonPole, onEntityCreated, onEntityInitialize, onEntityRemoved, searchMovedStructure, setSeatMapping, shouldUpdateAfterMovement, startMoving, stop, tickStorage
-
Field Details
-
extensionLength
protected int extensionLength -
initialExtensionProgress
protected int initialExtensionProgress -
orientation
protected net.minecraft.core.Direction orientation
-
-
Constructor Details
-
PistonContraption
public PistonContraption() -
PistonContraption
public PistonContraption(net.minecraft.core.Direction direction, boolean retract)
-
-
Method Details
-
getType
- Specified by:
getTypein classContraption
-
assemble
public boolean assemble(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) throws AssemblyException - Specified by:
assemblein classContraption- Throws:
AssemblyException
-
isAnchoringBlockAt
protected boolean isAnchoringBlockAt(net.minecraft.core.BlockPos pos) - Overrides:
isAnchoringBlockAtin classContraption
-
addToInitialFrontier
protected boolean addToInitialFrontier(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction, Queue<net.minecraft.core.BlockPos> frontier) throws AssemblyException - Overrides:
addToInitialFrontierin classContraption- Throws:
AssemblyException
-
addBlock
public 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> capture) - Overrides:
addBlockin classContraption
-
toLocalPos
public net.minecraft.core.BlockPos toLocalPos(net.minecraft.core.BlockPos globalPos) - Overrides:
toLocalPosin classContraption
-
customBlockPlacement
protected boolean customBlockPlacement(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Overrides:
customBlockPlacementin classContraption
-
customBlockRemoval
protected boolean customBlockRemoval(net.minecraft.world.level.LevelAccessor world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Overrides:
customBlockRemovalin classContraption
-
readNBT
public void readNBT(net.minecraft.world.level.Level world, net.minecraft.nbt.CompoundTag nbt, boolean spawnData) - Overrides:
readNBTin classContraption
-
writeNBT
public net.minecraft.nbt.CompoundTag writeNBT(boolean spawnPacket) - Overrides:
writeNBTin classContraption
-
makeLighter
- Overrides:
makeLighterin classContraption
-