Class BlockEmptyImpetus

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
at.petrak.hexcasting.api.block.circle.BlockCircleComponent
at.petrak.hexcasting.common.blocks.circles.BlockEmptyImpetus
All Implemented Interfaces:
ICircleComponent, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike

public class BlockEmptyImpetus extends BlockCircleComponent
  • Nested Class Summary

    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 extends Object>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate

    Nested classes/interfaces inherited from interface at.petrak.hexcasting.api.casting.circles.ICircleComponent

    ICircleComponent.ControlFlow
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.level.block.state.properties.DirectionProperty
     

    Fields inherited from class at.petrak.hexcasting.api.block.circle.BlockCircleComponent

    ENERGIZED

    Fields inherited from class net.minecraft.world.level.block.Block

    BLOCK_STATE_REGISTRY, 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
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockEmptyImpetus(net.minecraft.world.level.block.state.BlockBehaviour.Properties p_49795_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    acceptControlFlow(at.petrak.hexcasting.api.casting.eval.vm.CastingImage imageIn, CircleCastEnv env, net.minecraft.core.Direction enterDir, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.server.level.ServerLevel world)
    The heart of the interface! Functionally modify the casting environment.
    boolean
    canEnterFromDirection(net.minecraft.core.Direction enterDir, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.server.level.ServerLevel world)
    Can this component get transferred to from a block coming in from that direction, with the given normal?
    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.state.BlockState
    getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext pContext)
     
    net.minecraft.world.level.block.state.BlockState
    mirror(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Mirror pMirror)
     
    net.minecraft.core.Direction
    normalDir(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world, int recursionLeft)
     
    float
    particleHeight(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world)
    How many blocks in the BlockCircleComponent.normalDir(BlockPos, BlockState, Level) from the center particles should be spawned in
    EnumSet<net.minecraft.core.Direction>
    possibleExitDirections(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world)
    This determines the directions the control flow can exit from.
    net.minecraft.world.level.block.state.BlockState
    rotate(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Rotation pRot)
     

    Methods inherited from class net.minecraft.world.level.block.Block

    animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, 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, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getVisualShape, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isSignalSource, neighborChanged, onPlace, onProjectileHit, onRemove, randomTick, requiredFeatures, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, use, useShapeForLightOcclusion

    Methods inherited from class java.lang.Object

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

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

    isEnabled

    Methods inherited from interface at.petrak.hexcasting.api.casting.circles.ICircleComponent

    exitPositionFromDirection, fakeThrowMishap
  • Field Details

    • FACING

      public static final net.minecraft.world.level.block.state.properties.DirectionProperty FACING
  • Constructor Details

    • BlockEmptyImpetus

      public BlockEmptyImpetus(net.minecraft.world.level.block.state.BlockBehaviour.Properties p_49795_)
  • Method Details

    • acceptControlFlow

      public ICircleComponent.ControlFlow acceptControlFlow(at.petrak.hexcasting.api.casting.eval.vm.CastingImage imageIn, CircleCastEnv env, net.minecraft.core.Direction enterDir, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.server.level.ServerLevel world)
      Description copied from interface: ICircleComponent
      The heart of the interface! Functionally modify the casting environment.

      With the new update you can have the side effects happen inline. In fact, you have to have the side effects happen inline.

      Also, return a list of directions that the control flow can exit this block in. The circle environment will mishap if not exactly 1 of the returned directions can be accepted from.

    • canEnterFromDirection

      public boolean canEnterFromDirection(net.minecraft.core.Direction enterDir, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.server.level.ServerLevel world)
      Description copied from interface: ICircleComponent
      Can this component get transferred to from a block coming in from that direction, with the given normal?
    • possibleExitDirections

      public EnumSet<net.minecraft.core.Direction> possibleExitDirections(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world)
      Description copied from interface: ICircleComponent
      This determines the directions the control flow can exit from. It's called at the beginning of execution to see if the circle actually forms a loop.

      For most blocks, this should be the same as returned from ICircleComponent.acceptControlFlow(at.petrak.hexcasting.api.casting.eval.vm.CastingImage, at.petrak.hexcasting.api.casting.eval.env.CircleCastEnv, net.minecraft.core.Direction, net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState, net.minecraft.server.level.ServerLevel) Things like directrices might return otherwise. Whatever is returned when controlling flow must be a subset of this set.

    • normalDir

      public net.minecraft.core.Direction normalDir(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world, int recursionLeft)
      Specified by:
      normalDir in class BlockCircleComponent
    • particleHeight

      public float particleHeight(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world)
      Description copied from class: BlockCircleComponent
      How many blocks in the BlockCircleComponent.normalDir(BlockPos, BlockState, Level) from the center particles should be spawned in
      Specified by:
      particleHeight in class BlockCircleComponent
    • 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 BlockCircleComponent
    • getStateForPlacement

      public net.minecraft.world.level.block.state.BlockState getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext pContext)
      Overrides:
      getStateForPlacement in class net.minecraft.world.level.block.Block
    • rotate

      public net.minecraft.world.level.block.state.BlockState rotate(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Rotation pRot)
      Overrides:
      rotate in class net.minecraft.world.level.block.state.BlockBehaviour
    • mirror

      public net.minecraft.world.level.block.state.BlockState mirror(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Mirror pMirror)
      Overrides:
      mirror in class net.minecraft.world.level.block.state.BlockBehaviour