Class EncasedAssemblageBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
petrolpark.mc.petrolsparts.content.kinetics.assemblage.EncasedAssemblageBlock
- All Implemented Interfaces:
com.simibubi.create.api.contraption.transformable.TransformableBlock,com.simibubi.create.content.decoration.encasing.EncasedBlock,com.simibubi.create.content.equipment.wrench.IWrenchable,com.simibubi.create.content.kinetics.base.IRotate,com.simibubi.create.foundation.block.IBE<AssemblageBlockEntity>,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.block.EntityBlock,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IBlockExtension,petrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock,IAssemblageBlock,IFaceAlignedCogWheelBlock,IStateDependentCogWheelBlock
- Direct Known Subclasses:
EncasedSeparateShaftHalvesAssemblageBlock,EncasedSingleShaftAssemblageBlock
public abstract class EncasedAssemblageBlock
extends net.minecraft.world.level.block.Block
implements com.simibubi.create.foundation.block.IBE<AssemblageBlockEntity>, IAssemblageBlock, com.simibubi.create.content.decoration.encasing.EncasedBlock
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceNested 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.OffsetFunction, 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>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicateNested classes/interfaces inherited from interface com.simibubi.create.content.kinetics.base.IRotate
com.simibubi.create.content.kinetics.base.IRotate.SpeedLevel, com.simibubi.create.content.kinetics.base.IRotate.StressImpact -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Supplier<net.minecraft.world.level.block.Block> protected final Stringprotected final Supplier<AssemblageSet> Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, CODEC, INDESTRUCTIBLE, INSTANT, 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_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIESFields inherited from interface petrolpark.mc.petrolsparts.content.kinetics.assemblage.IAssemblageBlock
AXIS, BOTTOM_COG, BOTTOM_SHAFT_HALF, COG_PROPERTIES, MIDDLE_COG, SHAFT_HALF_PROPERTIES, TOP_COG, TOP_SHAFT_HALF -
Constructor Summary
ConstructorsConstructorDescriptionEncasedAssemblageBlock(Supplier<AssemblageSet> set, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties, Supplier<net.minecraft.world.level.block.Block> casing, String casingName) -
Method Summary
Modifier and TypeMethodDescriptionstatic final <B extends EncasedAssemblageBlock>
com.tterrag.registrate.util.nullness.NonNullFunction<net.minecraft.world.level.block.state.BlockBehaviour.Properties, B> andesite(Supplier<AssemblageSet> set, EncasedAssemblageBlock.Factory<B> factory) static final <B extends EncasedAssemblageBlock>
com.tterrag.registrate.util.nullness.NonNullFunction<net.minecraft.world.level.block.state.BlockBehaviour.Properties, B> brass(Supplier<AssemblageSet> set, EncasedAssemblageBlock.Factory<B> factory) booleancanSurvive(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos) protected 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.level.block.entity.BlockEntityType<? extends AssemblageBlockEntity> net.minecraft.world.level.block.Blocknet.minecraft.world.item.ItemStackgetCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) net.minecraft.core.Direction.AxisgetRotationAxis(net.minecraft.world.level.block.state.BlockState state) getSet()getTargetedKineticPart(AssemblageBlockEntity be, net.minecraft.world.entity.player.Player player) abstract net.minecraft.world.level.block.state.BlockStatevoidhandleEncasing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack heldItem, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult ray) booleanhasShaftExposed(net.minecraft.world.level.block.state.BlockState state, boolean top) booleanhasShaftTowards(net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction face) protected net.minecraft.world.level.block.state.BlockStatemirror(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Mirror mirror) voidonPlace(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, boolean movedByPiston) voidonRemove(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.world.level.block.state.BlockState pNewState, boolean pIsMoving) net.minecraft.world.InteractionResultonSneakWrenched(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.UseOnContext context) static final <B extends EncasedAssemblageBlock>
com.tterrag.registrate.util.nullness.NonNullConsumer<B> registerCTs(Supplier<EncasedAssemblageCTBehaviour> ctBehaviour) protected net.minecraft.world.level.block.state.BlockStaterotate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation) voidsetPlacedBy(net.minecraft.world.level.Level worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.LivingEntity placer, net.minecraft.world.item.ItemStack stack) booleanskipRendering(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.state.BlockState pAdjacentBlockState, net.minecraft.core.Direction pDirection) voidupdateIndirectNeighbourShapes(net.minecraft.world.level.block.state.BlockState stateIn, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, int flags, int count) Methods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, codec, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, spawnAfterBreak, tick, triggerEvent, updateShape, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods 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.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface petrolpark.mc.petrolsparts.content.kinetics.assemblage.IAssemblageBlock
canDiagonalBevelCogWheelSurvive, getCogType, getRotatedBlockState, hasBottomShaft, hasTopShaft, transformMethods inherited from interface com.simibubi.create.foundation.block.IBE
getBlockEntity, getBlockEntityOptional, getTicker, newBlockEntity, onBlockEntityUse, onBlockEntityUseItemOn, withBlockEntityDoMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHidingMethods inherited from interface petrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock
onWrenchedMethods inherited from interface com.simibubi.create.content.kinetics.base.IRotate
getMinimumRequiredSpeedLevel, hideStressImpact, showCapacityWithAnnotationMethods inherited from interface com.simibubi.create.content.equipment.wrench.IWrenchable
updateAfterWrenched
-
Field Details
-
set
-
casing
-
descriptionId
-
-
Constructor Details
-
EncasedAssemblageBlock
public EncasedAssemblageBlock(Supplier<AssemblageSet> set, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties, Supplier<net.minecraft.world.level.block.Block> casing, String casingName)
-
-
Method Details
-
andesite
public static final <B extends EncasedAssemblageBlock> com.tterrag.registrate.util.nullness.NonNullFunction<net.minecraft.world.level.block.state.BlockBehaviour.Properties,B> andesite(Supplier<AssemblageSet> set, EncasedAssemblageBlock.Factory<B> factory) -
brass
public static final <B extends EncasedAssemblageBlock> com.tterrag.registrate.util.nullness.NonNullFunction<net.minecraft.world.level.block.state.BlockBehaviour.Properties,B> brass(Supplier<AssemblageSet> set, EncasedAssemblageBlock.Factory<B> factory) -
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 classnet.minecraft.world.level.block.Block
-
getSet
- Specified by:
getSetin interfaceIAssemblageBlock
-
getUnencasedDefaultState
public abstract net.minecraft.world.level.block.state.BlockState getUnencasedDefaultState() -
onSneakWrenched
public net.minecraft.world.InteractionResult onSneakWrenched(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.UseOnContext context) - Specified by:
onSneakWrenchedin interfacecom.simibubi.create.content.equipment.wrench.IWrenchable
-
canSurvive
public boolean canSurvive(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos) - Overrides:
canSurvivein classnet.minecraft.world.level.block.state.BlockBehaviour
-
onPlace
public void onPlace(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, boolean movedByPiston) - Specified by:
onPlacein interfacepetrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock- Overrides:
onPlacein classnet.minecraft.world.level.block.state.BlockBehaviour
-
onRemove
public void onRemove(@Nonnull net.minecraft.world.level.block.state.BlockState pState, @Nonnull net.minecraft.world.level.Level pLevel, @Nonnull net.minecraft.core.BlockPos pPos, @Nonnull net.minecraft.world.level.block.state.BlockState pNewState, boolean pIsMoving) - Overrides:
onRemovein classnet.minecraft.world.level.block.state.BlockBehaviour
-
updateIndirectNeighbourShapes
public void updateIndirectNeighbourShapes(@Nonnull net.minecraft.world.level.block.state.BlockState stateIn, @Nonnull net.minecraft.world.level.LevelAccessor level, @Nonnull net.minecraft.core.BlockPos pos, int flags, int count) - Specified by:
updateIndirectNeighbourShapesin interfacepetrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock- Overrides:
updateIndirectNeighbourShapesin classnet.minecraft.world.level.block.state.BlockBehaviour
-
setPlacedBy
public void setPlacedBy(@Nonnull net.minecraft.world.level.Level worldIn, @Nonnull net.minecraft.core.BlockPos pos, @Nonnull net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.entity.LivingEntity placer, @Nonnull net.minecraft.world.item.ItemStack stack) - Specified by:
setPlacedByin interfacepetrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock- Overrides:
setPlacedByin classnet.minecraft.world.level.block.Block
-
getRotationAxis
public net.minecraft.core.Direction.Axis getRotationAxis(net.minecraft.world.level.block.state.BlockState state) - Specified by:
getRotationAxisin interfacecom.simibubi.create.content.kinetics.base.IRotate
-
hasShaftTowards
public boolean hasShaftTowards(net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction face) - Specified by:
hasShaftTowardsin interfacecom.simibubi.create.content.kinetics.base.IRotate
-
hasShaftExposed
public boolean hasShaftExposed(net.minecraft.world.level.block.state.BlockState state, boolean top) -
getCasing
public net.minecraft.world.level.block.Block getCasing()- Specified by:
getCasingin interfacecom.simibubi.create.content.decoration.encasing.EncasedBlock
-
handleEncasing
public void handleEncasing(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack heldItem, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult ray) - Specified by:
handleEncasingin interfacecom.simibubi.create.content.decoration.encasing.EncasedBlock
-
getCloneItemStack
public net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) - Specified by:
getCloneItemStackin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
getDescriptionId
- Overrides:
getDescriptionIdin classnet.minecraft.world.level.block.Block
-
skipRendering
public boolean skipRendering(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.state.BlockState pAdjacentBlockState, net.minecraft.core.Direction pDirection) - Overrides:
skipRenderingin classnet.minecraft.world.level.block.state.BlockBehaviour
-
getTargetedKineticPart
@Nullable public AssemblageBlockEntity.AssemblageBlockEntityPart getTargetedKineticPart(AssemblageBlockEntity be, net.minecraft.world.entity.player.Player player) - Specified by:
getTargetedKineticPartin interfaceIAssemblageBlock
-
rotate
protected net.minecraft.world.level.block.state.BlockState rotate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation) - Overrides:
rotatein classnet.minecraft.world.level.block.state.BlockBehaviour
-
mirror
protected net.minecraft.world.level.block.state.BlockState mirror(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Mirror mirror) - Overrides:
mirrorin classnet.minecraft.world.level.block.state.BlockBehaviour
-
getBlockEntityClass
- Specified by:
getBlockEntityClassin interfacecom.simibubi.create.foundation.block.IBE<AssemblageBlockEntity>
-
getBlockEntityType
public net.minecraft.world.level.block.entity.BlockEntityType<? extends AssemblageBlockEntity> getBlockEntityType()- Specified by:
getBlockEntityTypein interfacecom.simibubi.create.foundation.block.IBE<AssemblageBlockEntity>
-
registerCTs
public static final <B extends EncasedAssemblageBlock> com.tterrag.registrate.util.nullness.NonNullConsumer<B> registerCTs(Supplier<EncasedAssemblageCTBehaviour> ctBehaviour)
-