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 Classes
    Modifier and Type
    Class
    Description
    static interface 
     

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block

    net.minecraft.world.level.block.Block.BlockStatePairKey

    Nested 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.StatePredicate

    Nested 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

    Fields
    Modifier and Type
    Field
    Description
    protected final Supplier<net.minecraft.world.level.block.Block>
     
    protected final String
     
    protected 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_DROPS

    Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES

    Fields 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

    Constructors
    Constructor
    Description
    EncasedAssemblageBlock(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 Type
    Method
    Description
    static final <B extends EncasedAssemblageBlock>
    com.tterrag.registrate.util.nullness.NonNullFunction<net.minecraft.world.level.block.state.BlockBehaviour.Properties,B>
     
    static final <B extends EncasedAssemblageBlock>
    com.tterrag.registrate.util.nullness.NonNullFunction<net.minecraft.world.level.block.state.BlockBehaviour.Properties,B>
     
    boolean
    canSurvive(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos)
     
    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)
     
     
    net.minecraft.world.level.block.entity.BlockEntityType<? extends AssemblageBlockEntity>
     
    net.minecraft.world.level.block.Block
     
    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)
     
     
    net.minecraft.core.Direction.Axis
    getRotationAxis(net.minecraft.world.level.block.state.BlockState state)
     
     
    getTargetedKineticPart(AssemblageBlockEntity be, net.minecraft.world.entity.player.Player player)
     
    abstract net.minecraft.world.level.block.state.BlockState
     
    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)
     
    boolean
    hasShaftExposed(net.minecraft.world.level.block.state.BlockState state, boolean top)
     
    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)
     
    protected net.minecraft.world.level.block.state.BlockState
    mirror(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Mirror mirror)
     
    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)
     
    void
    onRemove(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.InteractionResult
    onSneakWrenched(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>
     
    protected net.minecraft.world.level.block.state.BlockState
    rotate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation)
     
    void
    setPlacedBy(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)
     
    boolean
    skipRendering(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.state.BlockState pAdjacentBlockState, net.minecraft.core.Direction pDirection)
     
    void
    updateIndirectNeighbourShapes(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, withPropertiesOf

    Methods 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, useWithoutItem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.level.block.EntityBlock

    getListener

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled

    Methods inherited from interface petrolpark.mc.petrolsparts.content.kinetics.assemblage.IAssemblageBlock

    canDiagonalBevelCogWheelSurvive, getCogType, getRotatedBlockState, hasBottomShaft, hasTopShaft, transform

    Methods inherited from interface com.simibubi.create.foundation.block.IBE

    getBlockEntity, getBlockEntityOptional, getTicker, newBlockEntity, onBlockEntityUse, onBlockEntityUseItemOn, withBlockEntityDo

    Methods 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, supportsExternalFaceHiding

    Methods inherited from interface petrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock

    onWrenched

    Methods inherited from interface com.simibubi.create.content.kinetics.base.IRotate

    getMinimumRequiredSpeedLevel, hideStressImpact, showCapacityWithAnnotation

    Methods inherited from interface com.simibubi.create.content.equipment.wrench.IWrenchable

    updateAfterWrenched
  • Field Details

    • set

      protected final Supplier<AssemblageSet> set
    • casing

      protected final Supplier<net.minecraft.world.level.block.Block> casing
    • descriptionId

      protected final String 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:
      createBlockStateDefinition in class net.minecraft.world.level.block.Block
    • getSet

      public AssemblageSet getSet()
      Specified by:
      getSet in interface IAssemblageBlock
    • 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:
      onSneakWrenched in interface com.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:
      canSurvive in class net.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:
      onPlace in interface petrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock
      Overrides:
      onPlace in class net.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:
      onRemove in class net.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:
      updateIndirectNeighbourShapes in interface petrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock
      Overrides:
      updateIndirectNeighbourShapes in class net.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:
      setPlacedBy in interface petrolpark.mc.library.compat.create.core.world.block.composite.ICompositeKineticBlock
      Overrides:
      setPlacedBy in class net.minecraft.world.level.block.Block
    • getRotationAxis

      public net.minecraft.core.Direction.Axis getRotationAxis(net.minecraft.world.level.block.state.BlockState state)
      Specified by:
      getRotationAxis in interface com.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:
      hasShaftTowards in interface com.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:
      getCasing in interface com.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:
      handleEncasing in interface com.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:
      getCloneItemStack in interface net.neoforged.neoforge.common.extensions.IBlockExtension
    • getDescriptionId

      public String getDescriptionId()
      Overrides:
      getDescriptionId in class net.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:
      skipRendering in class net.minecraft.world.level.block.state.BlockBehaviour
    • getTargetedKineticPart

      @Nullable public AssemblageBlockEntity.AssemblageBlockEntityPart getTargetedKineticPart(AssemblageBlockEntity be, net.minecraft.world.entity.player.Player player)
      Specified by:
      getTargetedKineticPart in interface IAssemblageBlock
    • 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:
      rotate in class net.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:
      mirror in class net.minecraft.world.level.block.state.BlockBehaviour
    • getBlockEntityClass

      public Class<AssemblageBlockEntity> getBlockEntityClass()
      Specified by:
      getBlockEntityClass in interface com.simibubi.create.foundation.block.IBE<AssemblageBlockEntity>
    • getBlockEntityType

      public net.minecraft.world.level.block.entity.BlockEntityType<? extends AssemblageBlockEntity> getBlockEntityType()
      Specified by:
      getBlockEntityType in interface com.simibubi.create.foundation.block.IBE<AssemblageBlockEntity>
    • registerCTs

      public static final <B extends EncasedAssemblageBlock> com.tterrag.registrate.util.nullness.NonNullConsumer<B> registerCTs(Supplier<EncasedAssemblageCTBehaviour> ctBehaviour)