Package net.minecraft.world.level.block
Class FireBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseFireBlock
net.minecraft.world.level.block.FireBlock
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerProperty
private static final int
private static final int
private static final int
private static final int
private final it.unimi.dsi.fastutil.objects.Object2IntMap
<Block> static final com.mojang.serialization.MapCodec
<FireBlock> static final BooleanProperty
private static final VoxelShape
private static final int
private static final int
private static final int
private static final int
private final it.unimi.dsi.fastutil.objects.Object2IntMap
<Block> static final int
static final BooleanProperty
private static final VoxelShape
private static final Map
<Direction, BooleanProperty> private final Map
<BlockState, VoxelShape> static final BooleanProperty
private static final VoxelShape
static final BooleanProperty
private static final VoxelShape
static final BooleanProperty
private static final VoxelShape
Fields inherited from class net.minecraft.world.level.block.BaseFireBlock
AABB_OFFSET, DOWN_AABB
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic void
private static VoxelShape
calculateShape
(BlockState state) protected boolean
canBurn
(BlockState state) Deprecated.boolean
canCatchFire
(BlockGetter world, BlockPos pos, Direction face) Side sensitive version that calls the block function.protected boolean
canSurvive
(BlockState state, LevelReader level, BlockPos pos) private void
checkBurnOut
(Level level, BlockPos pos, int chance, RandomSource random, int age, Direction face) com.mojang.serialization.MapCodec
<FireBlock> codec()
protected void
int
getBurnOdds
(BlockState state) Deprecated.private static int
getFireTickDelay
(RandomSource random) Gets the delay before this block ticks again (without counting random ticks)int
getIgniteOdds
(BlockState state) Deprecated.private int
getIgniteOdds
(LevelReader level, BlockPos pos) protected VoxelShape
getShape
(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) getStateForPlacement
(BlockPlaceContext context) protected BlockState
getStateForPlacement
(BlockGetter level, BlockPos pos) private BlockState
getStateWithAge
(LevelAccessor level, BlockPos pos, int age) protected boolean
isNearRain
(Level level, BlockPos pos) private boolean
isValidFireLocation
(BlockGetter level, BlockPos pos) protected void
onPlace
(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) void
setFlammable
(Block block, int encouragement, int flammability) protected void
tick
(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) protected BlockState
updateShape
(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state.Methods inherited from class net.minecraft.world.level.block.BaseFireBlock
animateTick, canBePlacedAt, entityInside, getState, playerWillDestroy, spawnDestroyParticles
Methods inherited from class net.minecraft.world.level.block.Block
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, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, 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, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, 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.flag.FeatureElement
isEnabled
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, 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, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
MAX_AGE
public static final int MAX_AGE- See Also:
-
AGE
-
NORTH
-
EAST
-
SOUTH
-
WEST
-
UP
-
PROPERTY_BY_DIRECTION
-
UP_AABB
-
WEST_AABB
-
EAST_AABB
-
NORTH_AABB
-
SOUTH_AABB
-
shapesCache
-
IGNITE_INSTANT
private static final int IGNITE_INSTANT- See Also:
-
IGNITE_EASY
private static final int IGNITE_EASY- See Also:
-
IGNITE_MEDIUM
private static final int IGNITE_MEDIUM- See Also:
-
IGNITE_HARD
private static final int IGNITE_HARD- See Also:
-
BURN_INSTANT
private static final int BURN_INSTANT- See Also:
-
BURN_EASY
private static final int BURN_EASY- See Also:
-
BURN_MEDIUM
private static final int BURN_MEDIUM- See Also:
-
BURN_HARD
private static final int BURN_HARD- See Also:
-
igniteOdds
-
burnOdds
-
-
Constructor Details
-
FireBlock
-
-
Method Details
-
codec
- Specified by:
codec
in classBaseFireBlock
-
calculateShape
-
updateShape
protected BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state. For example, fences make their connections to the passed in state if possible, and wet concrete powder immediately returns its solidified counterpart. Note that this method should ideally consider only the specific direction passed in.- Overrides:
updateShape
in classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) - Overrides:
getShape
in classBaseFireBlock
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBaseFireBlock
-
getStateForPlacement
-
canSurvive
- Overrides:
canSurvive
in classBlockBehaviour
-
tick
- Overrides:
tick
in classBlockBehaviour
-
isNearRain
-
getBurnOdds
Deprecated. -
getIgniteOdds
Deprecated. -
checkBurnOut
private void checkBurnOut(Level level, BlockPos pos, int chance, RandomSource random, int age, Direction face) -
getStateWithAge
-
isValidFireLocation
-
getIgniteOdds
-
canBurn
Deprecated.- Specified by:
canBurn
in classBaseFireBlock
-
onPlace
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) - Overrides:
onPlace
in classBaseFireBlock
-
getFireTickDelay
Gets the delay before this block ticks again (without counting random ticks) -
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
setFlammable
-
canCatchFire
Side sensitive version that calls the block function.- Parameters:
world
- The current worldpos
- Block positionface
- The side the fire is coming from- Returns:
- True if the face can catch fire.
-
bootStrap
public static void bootStrap()
-