Class CampfireBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseEntityBlock
net.minecraft.world.level.block.CampfireBlock
- All Implemented Interfaces:
FeatureElement, BucketPickup, EntityBlock, LiquidBlockContainer, SimpleWaterloggedBlock, ItemLike, IBlockExtension, IBucketPickupExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class Block
Block.UpdateFlagsNested classes/interfaces inherited from class BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CampfireBlock> static final EnumProperty<Direction> private final intstatic final BooleanPropertyprivate static final VoxelShapeprivate static final VoxelShapestatic final BooleanPropertyprivate static final intprivate final booleanstatic final BooleanPropertyFields inherited from class 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_DROPSFields inherited from class BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionCampfireBlock(boolean spawnParticles, int fireDamage, BlockBehaviour.Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidanimateTick(BlockState state, Level level, BlockPos pos, RandomSource random) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).static booleancanLight(BlockState state) com.mojang.serialization.MapCodec<CampfireBlock> codec()protected voidstatic voiddowse(@Nullable Entity source, LevelAccessor level, BlockPos pos, BlockState state) protected voidentityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise) protected FluidStategetFluidState(BlockState state) protected VoxelShapegetShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) @Nullable BlockStategetStateForPlacement(BlockPlaceContext context) <T extends BlockEntity>
@Nullable BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> type) static booleanisLitCampfire(BlockState blockState) protected booleanisPathfindable(BlockState state, PathComputationType type) private booleanisSmokeSource(BlockState blockState) static booleanisSmokeyPos(Level level, BlockPos pos) static voidmakeParticles(Level level, BlockPos pos, boolean isSignalFire, boolean smoking) protected BlockStatemirror(BlockState state, Mirror mirror) Returns the blockstate with the given mirror of the passed blockstate.newBlockEntity(BlockPos worldPosition, BlockState blockState) protected voidonProjectileHit(Level level, BlockState state, BlockHitResult blockHit, Projectile projectile) booleanplaceLiquid(LevelAccessor level, BlockPos pos, BlockState state, FluidState fluidState) protected BlockStaterotate(BlockState state, Rotation rotation) Returns the blockstate with the given rotation from the passed blockstate.protected BlockStateupdateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) protected InteractionResultuseItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) Methods inherited from class BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEventMethods inherited from class Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class BlockBehaviour
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isRandomlyTicking, isSignalSource, neighborChanged, onExplosionHit, onPlace, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, spawnAfterBreak, tick, updateIndirectNeighbourShapes, useShapeForLightOcclusion, useWithoutItemMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EntityBlock
getListenerMethods inherited from interface FeatureElement
isEnabledMethods inherited from interface 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, ignitedByLava, 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, supportsExternalFaceHidingMethods inherited from interface IBucketPickupExtension
getPickupSoundMethods inherited from interface SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock
-
Field Details
-
CODEC
-
LIT
-
SIGNAL_FIRE
-
WATERLOGGED
-
FACING
-
SHAPE
-
SHAPE_VIRTUAL_POST
-
SMOKE_DISTANCE
private static final int SMOKE_DISTANCE- See Also:
-
spawnParticles
private final boolean spawnParticles -
fireDamage
private final int fireDamage
-
-
Constructor Details
-
CampfireBlock
-
-
Method Details
-
codec
- Specified by:
codecin classBaseEntityBlock
-
useItemOn
protected InteractionResult useItemOn(ItemStack itemStack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult) - Overrides:
useItemOnin classBlockBehaviour
-
entityInside
protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise) - Overrides:
entityInsidein classBlockBehaviour
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
updateShape
protected BlockState updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) - Overrides:
updateShapein classBlockBehaviour
-
isSmokeSource
- Returns:
- whether the given block state produces the thicker signal fire smoke when put below a campfire.
-
getShape
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) - Overrides:
getShapein classBlockBehaviour
-
animateTick
Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
dowse
public static void dowse(@Nullable Entity source, LevelAccessor level, BlockPos pos, BlockState state) -
placeLiquid
public boolean placeLiquid(LevelAccessor level, BlockPos pos, BlockState state, FluidState fluidState) - Specified by:
placeLiquidin interfaceLiquidBlockContainer- Specified by:
placeLiquidin interfaceSimpleWaterloggedBlock
-
onProjectileHit
protected void onProjectileHit(Level level, BlockState state, BlockHitResult blockHit, Projectile projectile) - Overrides:
onProjectileHitin classBlockBehaviour
-
makeParticles
-
isSmokeyPos
-
isLitCampfire
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
rotate
Description copied from class:BlockBehaviourReturns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
rotatein classBlockBehaviour
-
mirror
Description copied from class:BlockBehaviourReturns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate.- Overrides:
mirrorin classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
newBlockEntity
- Specified by:
newBlockEntityin interfaceEntityBlock
-
getTicker
public <T extends BlockEntity> @Nullable BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> type) - Specified by:
getTickerin interfaceEntityBlock
-
isPathfindable
- Overrides:
isPathfindablein classBlockBehaviour
-
canLight
-