Class AbstractBogeyBlock<T extends AbstractBogeyBlockEntity>
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
com.simibubi.create.content.trains.bogey.AbstractBogeyBlock<T>
- All Implemented Interfaces:
SpecialBlockItemRequirement,IWrenchable,IBE<T>,ProperWaterloggedBlock,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.block.BucketPickup,net.minecraft.world.level.block.EntityBlock,net.minecraft.world.level.block.LiquidBlockContainer,net.minecraft.world.level.block.SimpleWaterloggedBlock,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IBlockExtension,net.neoforged.neoforge.common.extensions.IBucketPickupExtension
- Direct Known Subclasses:
StandardBogeyBlock
public abstract class AbstractBogeyBlock<T extends AbstractBogeyBlockEntity>
extends net.minecraft.world.level.block.Block
implements IBE<T>, ProperWaterloggedBlock, SpecialBlockItemRequirement, IWrenchable
-
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>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.block.state.properties.EnumProperty<net.minecraft.core.Direction.Axis> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, AbstractBogeyBlock<?>> 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 com.simibubi.create.foundation.block.ProperWaterloggedBlock
WATERLOGGED -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBogeyBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties pProperties, BogeySizes.BogeySize size) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanLegacy system doesn't capture bogey block entities when constructing a trainprotected voidcreateBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> builder) protected List<net.minecraft.resources.ResourceLocation> If, instead of using the style-based cycling system you prefer to use separate blocks, return them from this methodnet.minecraft.core.Directionprotected abstract net.minecraft.world.phys.Vec3This should be implemented, but not called directlynet.minecraft.world.phys.Vec3getConnectorAnchorOffset(boolean upsideDown) abstract BogeyStylenet.minecraft.world.level.material.FluidStategetFluidState(net.minecraft.world.level.block.state.BlockState pState) @Nullable net.minecraft.world.level.block.state.BlockStategetMatchingBogey(net.minecraft.core.Direction upDirection, boolean axisAlongFirst) net.minecraft.world.level.block.state.BlockStatenet.minecraft.world.level.block.state.BlockStategetNextSize(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) getNextStyle(BogeyStyle style) getNextStyle(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) getRequiredItems(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntity te) net.minecraft.world.level.block.state.BlockStategetRotatedBlockState(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction targetedFace) getSize()net.minecraft.world.level.block.state.BlockStateEnumSet<net.minecraft.core.Direction> getStickySurfaces(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) abstract TrackMaterial.TrackTypegetTrackType(BogeyStyle style) net.minecraft.world.level.block.state.BlockStategetVersion(net.minecraft.world.level.block.state.BlockState base, boolean upsideDown) abstract doubleabstract doublebooleanisOnIncompatibleTrack(Carriage carriage, boolean leading) booleanisTrackAxisAlongFirstCoordinate(net.minecraft.world.level.block.state.BlockState state) booleanisUpsideDown(net.minecraft.world.level.block.state.BlockState state) protected net.minecraft.world.ItemInteractionResultonInteractWithBogey(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit) List<net.minecraft.world.level.block.state.properties.Property<?>> List of BlockState Properties to copy between sizesstatic voidregisterStandardBogey(net.minecraft.resources.ResourceLocation block) Only for internal Create use.@NotNull net.minecraft.world.level.block.state.BlockStaterotate(@NotNull net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Rotation pRotation) net.minecraft.world.level.block.state.BlockStateupdateShape(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.core.Direction pDirection, net.minecraft.world.level.block.state.BlockState pNeighborState, net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pCurrentPos, net.minecraft.core.BlockPos pNeighborPos) protected net.minecraft.world.ItemInteractionResultuseItemOn(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult) 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, getDescriptionId, 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, 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, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, 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 com.simibubi.create.foundation.block.IBE
getBlockEntity, getBlockEntityClass, getBlockEntityOptional, getBlockEntityType, 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, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, 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 net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods inherited from interface com.simibubi.create.content.equipment.wrench.IWrenchable
onSneakWrenched, onWrenched, updateAfterWrenchedMethods inherited from interface com.simibubi.create.foundation.block.ProperWaterloggedBlock
fluidState, updateWater, withWaterMethods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,AbstractBogeyBlock<?>> STREAM_CODEC -
AXIS
public static final net.minecraft.world.level.block.state.properties.EnumProperty<net.minecraft.core.Direction.Axis> AXIS -
size
-
-
Constructor Details
-
AbstractBogeyBlock
public AbstractBogeyBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties pProperties, BogeySizes.BogeySize size)
-
-
Method Details
-
isOnIncompatibleTrack
-
getValidPathfindingTypes
-
getTrackType
-
registerStandardBogey
@Internal public static void registerStandardBogey(net.minecraft.resources.ResourceLocation block) Only for internal Create use. If you have your own style set, do not call this method -
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
-
updateShape
public net.minecraft.world.level.block.state.BlockState updateShape(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.core.Direction pDirection, net.minecraft.world.level.block.state.BlockState pNeighborState, net.minecraft.world.level.LevelAccessor pLevel, net.minecraft.core.BlockPos pCurrentPos, net.minecraft.core.BlockPos pNeighborPos) - Overrides:
updateShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getFluidState
public net.minecraft.world.level.material.FluidState getFluidState(net.minecraft.world.level.block.state.BlockState pState) - Overrides:
getFluidStatein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getStickySurfaces
public EnumSet<net.minecraft.core.Direction> getStickySurfaces(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
getWheelPointSpacing
public abstract double getWheelPointSpacing() -
getWheelRadius
public abstract double getWheelRadius() -
getConnectorAnchorOffset
public net.minecraft.world.phys.Vec3 getConnectorAnchorOffset(boolean upsideDown) -
getConnectorAnchorOffset
protected abstract net.minecraft.world.phys.Vec3 getConnectorAnchorOffset()This should be implemented, but not called directly -
allowsSingleBogeyCarriage
public boolean allowsSingleBogeyCarriage() -
getDefaultStyle
-
captureBlockEntityForTrain
public boolean captureBlockEntityForTrain()Legacy system doesn't capture bogey block entities when constructing a train -
getSize
-
getBogeyUpDirection
public net.minecraft.core.Direction getBogeyUpDirection() -
isTrackAxisAlongFirstCoordinate
public boolean isTrackAxisAlongFirstCoordinate(net.minecraft.world.level.block.state.BlockState state) -
getMatchingBogey
@Nullable public @Nullable net.minecraft.world.level.block.state.BlockState getMatchingBogey(net.minecraft.core.Direction upDirection, boolean axisAlongFirst) -
useItemOn
protected net.minecraft.world.ItemInteractionResult useItemOn(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hitResult) - Overrides:
useItemOnin classnet.minecraft.world.level.block.state.BlockBehaviour
-
onInteractWithBogey
protected net.minecraft.world.ItemInteractionResult onInteractWithBogey(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit) -
getBogeyBlockCycle
If, instead of using the style-based cycling system you prefer to use separate blocks, return them from this method -
getRotatedBlockState
public net.minecraft.world.level.block.state.BlockState getRotatedBlockState(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction targetedFace) - Specified by:
getRotatedBlockStatein interfaceIWrenchable
-
getNextSize
public net.minecraft.world.level.block.state.BlockState getNextSize(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) -
propertiesToCopy
List of BlockState Properties to copy between sizes -
getNextSize
-
getStateOfSize
public net.minecraft.world.level.block.state.BlockState getStateOfSize(AbstractBogeyBlockEntity sbbe, BogeySizes.BogeySize size) -
getNextStyle
public BogeyStyle getNextStyle(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) -
getNextStyle
-
rotate
@NotNull public @NotNull net.minecraft.world.level.block.state.BlockState rotate(@NotNull @NotNull net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.block.Rotation pRotation) - Overrides:
rotatein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getRequiredItems
public ItemRequirement getRequiredItems(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntity te) - Specified by:
getRequiredItemsin interfaceSpecialBlockItemRequirement
-
canBeUpsideDown
public boolean canBeUpsideDown() -
isUpsideDown
public boolean isUpsideDown(net.minecraft.world.level.block.state.BlockState state) -
getVersion
public net.minecraft.world.level.block.state.BlockState getVersion(net.minecraft.world.level.block.state.BlockState base, boolean upsideDown)
-