Class BlockAbstractImpetus
- All Implemented Interfaces:
ICircleComponent,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.block.EntityBlock,net.minecraft.world.level.ItemLike
- Direct Known Subclasses:
BlockLookingImpetus,BlockRedstoneImpetus,BlockRightClickImpetus
-
Nested Class Summary
Nested 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 extends Object>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicateNested classes/interfaces inherited from interface at.petrak.hexcasting.api.casting.circles.ICircleComponent
ICircleComponent.ControlFlow -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.block.state.properties.DirectionPropertyFields inherited from class at.petrak.hexcasting.api.block.circle.BlockCircleComponent
ENERGIZEDFields 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_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_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionBlockAbstractImpetus(net.minecraft.world.level.block.state.BlockBehaviour.Properties p_49795_) -
Method Summary
Modifier and TypeMethodDescriptionacceptControlFlow(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.booleancanEnterFromDirection(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 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.state.BlockStategetStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext pContext) net.minecraft.world.level.block.state.BlockStatemirror(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Mirror pMirror) net.minecraft.core.DirectionnormalDir(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world, int recursionLeft) 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) floatparticleHeight(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState bs, net.minecraft.world.level.Level world) How many blocks in theBlockCircleComponent.normalDir(BlockPos, BlockState, Level)from the center particles should be spawned inEnumSet<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.BlockStaterotate(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Rotation pRot) voidtick(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.server.level.ServerLevel pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.util.RandomSource pRandom) Methods inherited from class at.petrak.hexcasting.api.block.circle.BlockCircleComponent
endEnergized, getAnalogOutputSignal, hasAnalogOutputSignal, isEnergized, normalDir, normalDirOfOther, placeStateDirAndSneak, startEnergizedMethods 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, withPropertiesOfMethods 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, randomTick, requiredFeatures, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, updateShape, use, useShapeForLightOcclusionMethods 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
getListener, getTicker, newBlockEntityMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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
-
BlockAbstractImpetus
public BlockAbstractImpetus(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:ICircleComponentThe 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.
- Specified by:
acceptControlFlowin interfaceICircleComponent
-
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:ICircleComponentCan this component get transferred to from a block coming in from that direction, with the given normal?- Specified by:
canEnterFromDirectionin interfaceICircleComponent
-
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:ICircleComponentThis 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.- Specified by:
possibleExitDirectionsin interfaceICircleComponent
-
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:
normalDirin classBlockCircleComponent
-
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:BlockCircleComponentHow many blocks in theBlockCircleComponent.normalDir(BlockPos, BlockState, Level)from the center particles should be spawned in- Specified by:
particleHeightin classBlockCircleComponent
-
tick
public void tick(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.server.level.ServerLevel pLevel, net.minecraft.core.BlockPos pPos, net.minecraft.util.RandomSource pRandom) - Overrides:
tickin classnet.minecraft.world.level.block.state.BlockBehaviour
-
onRemove
public 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) - Overrides:
onRemovein classnet.minecraft.world.level.block.state.BlockBehaviour
-
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 classBlockCircleComponent
-
getStateForPlacement
public net.minecraft.world.level.block.state.BlockState getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext pContext) - Overrides:
getStateForPlacementin classnet.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:
rotatein classnet.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:
mirrorin classnet.minecraft.world.level.block.state.BlockBehaviour
-