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.ShapePairKey
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 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
static final Map
<Direction, BooleanProperty> private final Function
<BlockState, VoxelShape> static final BooleanProperty
static final BooleanProperty
static final BooleanProperty
Fields inherited from class net.minecraft.world.level.block.BaseFireBlock
SHAPE
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_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, 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
protected boolean
canBurn
(BlockState pState) Deprecated.boolean
canCatchFire
(BlockGetter world, BlockPos pos, Direction face) Side sensitive version that calls the block function.protected boolean
canSurvive
(BlockState pState, LevelReader pLevel, BlockPos pPos) private void
checkBurnOut
(Level pLevel, BlockPos pPos, int pChance, RandomSource pRandom, int pAge, Direction face) com.mojang.serialization.MapCodec
<FireBlock> codec()
protected void
int
getBurnOdds
(BlockState pState) Deprecated.private static int
getFireTickDelay
(RandomSource pRandom) Gets the delay before this block ticks again (without counting random ticks)int
getIgniteOdds
(BlockState pState) Deprecated.private int
getIgniteOdds
(LevelReader pLevel, BlockPos pPos) protected VoxelShape
getShape
(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) getStateForPlacement
(BlockPlaceContext pContext) protected BlockState
getStateForPlacement
(BlockGetter pLevel, BlockPos pPos) private BlockState
getStateWithAge
(LevelReader pLevel, BlockPos pPos, int pAge) protected boolean
isNearRain
(Level pLevel, BlockPos pPos) private boolean
isValidFireLocation
(BlockGetter pLevel, BlockPos pPos) private Function
<BlockState, VoxelShape> protected void
onPlace
(BlockState pState, Level pLevel, BlockPos pPos, BlockState pOldState, boolean pIsMoving) void
setFlammable
(Block pBlock, int pEncouragement, int pFlammability) protected void
tick
(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) protected BlockState
updateShape
(BlockState pState, LevelReader pLevel, ScheduledTickAccess pScheduledTickAccess, BlockPos pPos, Direction pDirection, BlockPos pNeighborPos, BlockState pNeighborState, RandomSource pRandom) Methods inherited from class net.minecraft.world.level.block.BaseFireBlock
animateTick, canBePlacedAt, entityInside, fireIgnite, getState, playerWillDestroy, spawnDestroyParticles
Methods inherited from class net.minecraft.world.level.block.Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onProjectileHit, 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, playFallSound, playStepSound, 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
-
shapes
-
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
-
makeShapes
-
updateShape
protected BlockState updateShape(BlockState pState, LevelReader pLevel, ScheduledTickAccess pScheduledTickAccess, BlockPos pPos, Direction pDirection, BlockPos pNeighborPos, BlockState pNeighborState, RandomSource pRandom) - Overrides:
updateShape
in classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) - 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 pLevel, BlockPos pPos, int pChance, RandomSource pRandom, int pAge, Direction face) -
getStateWithAge
-
isValidFireLocation
-
getIgniteOdds
-
canBurn
Deprecated.- Specified by:
canBurn
in classBaseFireBlock
-
onPlace
protected void onPlace(BlockState pState, Level pLevel, BlockPos pPos, BlockState pOldState, boolean pIsMoving) - 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()
-