Class MechanicalPistonBlock
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<net.minecraft.world.level.block.Block>
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
com.simibubi.create.content.contraptions.base.KineticBlock
com.simibubi.create.content.contraptions.base.DirectionalKineticBlock
com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock
com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock
- All Implemented Interfaces:
IRotate,IWrenchable,ITE<MechanicalPistonTileEntity>,net.minecraft.world.level.block.EntityBlock,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeBlock,net.minecraftforge.registries.IForgeRegistryEntry<net.minecraft.world.level.block.Block>
public class MechanicalPistonBlock
extends DirectionalAxisKineticBlock
implements ITE<MechanicalPistonTileEntity>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.level.block.Block
net.minecraft.world.level.block.Block.BlockStatePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase, net.minecraft.world.level.block.state.BlockBehaviour.OffsetType, net.minecraft.world.level.block.state.BlockBehaviour.Properties, net.minecraft.world.level.block.state.BlockBehaviour.StateArgumentPredicate<A extends Object>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicateNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>>Nested classes/interfaces inherited from interface com.simibubi.create.content.contraptions.base.IRotate
IRotate.SpeedLevel, IRotate.StressImpact -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final net.minecraft.world.level.block.state.properties.EnumProperty<MechanicalPistonBlock.PistonState>Fields inherited from class com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock
AXIS_ALONG_FIRST_COORDINATEFields inherited from class com.simibubi.create.content.contraptions.base.DirectionalKineticBlock
FACINGFields inherited from class com.simibubi.create.content.contraptions.base.KineticBlock
colorFields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, RANDOM, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPS, UPDATE_SUPPRESS_LIGHTFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMechanicalPistonBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties, boolean sticky) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> builder) net.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) net.minecraft.world.level.block.entity.BlockEntityType<? extends MechanicalPistonTileEntity>static booleanisExtensionPole(net.minecraft.world.level.block.state.BlockState state) static booleanisPiston(net.minecraft.world.level.block.state.BlockState state) static booleanisPistonHead(net.minecraft.world.level.block.state.BlockState state) static booleanisStickyPiston(net.minecraft.world.level.block.state.BlockState state) static intvoidneighborChanged(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Block p_220069_4_, net.minecraft.core.BlockPos fromPos, boolean p_220069_6_) static MechanicalPistonBlocknormal(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) net.minecraft.world.InteractionResultonWrenched(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.UseOnContext context) voidplayerWillDestroy(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player) static MechanicalPistonBlocksticky(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) voidtick(net.minecraft.world.level.block.state.BlockState state, net.minecraft.server.level.ServerLevel worldIn, net.minecraft.core.BlockPos pos, Random r) net.minecraft.world.InteractionResultuse(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand handIn, net.minecraft.world.phys.BlockHitResult hit) Methods inherited from class com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock
getAxisAlignmentForPlacement, getFacingForPlacement, getRotationAxis, getStateForPlacement, hasShaftTowards, prefersConnectionTo, rotateMethods inherited from class com.simibubi.create.content.contraptions.base.DirectionalKineticBlock
getPreferredFacing, mirrorMethods inherited from class com.simibubi.create.content.contraptions.base.KineticBlock
areStatesKineticallyEquivalent, getParticleInitialRadius, getParticleTargetRadius, onPlace, setPlacedBy, updateIndirectNeighbourShapesMethods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isSignalSource, onProjectileHit, onRemove, randomTick, skipRendering, spawnAfterBreak, triggerEvent, updateShape, useShapeForLightOcclusionMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListenerMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onCaughtFire, onDestroyedByPlayer, onNeighborChange, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHidingMethods inherited from interface com.simibubi.create.content.contraptions.base.IRotate
getMinimumRequiredSpeedLevel, hideStressImpact, showCapacityWithAnnotationMethods inherited from interface com.simibubi.create.foundation.block.ITE
getTicker, getTileEntity, getTileEntityOptional, newBlockEntity, onTileEntityUse, withTileEntityDoMethods inherited from interface com.simibubi.create.content.contraptions.wrench.IWrenchable
getRotatedBlockState, onSneakWrenched, playRemoveSound, playRotateSound, updateAfterWrenched
-
Field Details
-
STATE
public static final net.minecraft.world.level.block.state.properties.EnumProperty<MechanicalPistonBlock.PistonState> STATE -
isSticky
protected boolean isSticky
-
-
Constructor Details
-
MechanicalPistonBlock
protected MechanicalPistonBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties, boolean sticky)
-
-
Method Details
-
normal
public static MechanicalPistonBlock normal(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) -
sticky
public static MechanicalPistonBlock sticky(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) -
createBlockStateDefinition
protected void createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> builder) - Overrides:
createBlockStateDefinitionin classDirectionalAxisKineticBlock
-
use
public net.minecraft.world.InteractionResult use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand handIn, net.minecraft.world.phys.BlockHitResult hit) - Overrides:
usein classnet.minecraft.world.level.block.state.BlockBehaviour
-
neighborChanged
public void neighborChanged(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Block p_220069_4_, net.minecraft.core.BlockPos fromPos, boolean p_220069_6_) - Overrides:
neighborChangedin classnet.minecraft.world.level.block.state.BlockBehaviour
-
tick
public void tick(net.minecraft.world.level.block.state.BlockState state, net.minecraft.server.level.ServerLevel worldIn, net.minecraft.core.BlockPos pos, Random r) - Overrides:
tickin classnet.minecraft.world.level.block.state.BlockBehaviour
-
onWrenched
public net.minecraft.world.InteractionResult onWrenched(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.UseOnContext context) - Specified by:
onWrenchedin interfaceIWrenchable
-
playerWillDestroy
public void playerWillDestroy(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player) - Overrides:
playerWillDestroyin classnet.minecraft.world.level.block.Block
-
maxAllowedPistonPoles
public static int maxAllowedPistonPoles() -
getShape
public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getTileEntityClass
- Specified by:
getTileEntityClassin interfaceITE<MechanicalPistonTileEntity>
-
getTileEntityType
public net.minecraft.world.level.block.entity.BlockEntityType<? extends MechanicalPistonTileEntity> getTileEntityType()- Specified by:
getTileEntityTypein interfaceITE<MechanicalPistonTileEntity>
-
isPiston
public static boolean isPiston(net.minecraft.world.level.block.state.BlockState state) -
isStickyPiston
public static boolean isStickyPiston(net.minecraft.world.level.block.state.BlockState state) -
isExtensionPole
public static boolean isExtensionPole(net.minecraft.world.level.block.state.BlockState state) -
isPistonHead
public static boolean isPistonHead(net.minecraft.world.level.block.state.BlockState state)
-