Package net.minecraft.world.level.block
Class SpawnerBlock
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.SpawnerBlock
- All Implemented Interfaces:
FeatureElement
,EntityBlock
,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
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendHoverText
(ItemStack p_255714_, Item.TooltipContext p_339639_, List<Component> p_255708_, TooltipFlag p_255667_) com.mojang.serialization.MapCodec
<SpawnerBlock> codec()
int
getExpDrop
(BlockState state, LevelReader world, RandomSource randomSource, BlockPos pos, int fortune, int silktouch) Gathers how much experience this block drops when broken.protected RenderShape
getRenderShape
(BlockState p_56794_) <T extends BlockEntity>
BlockEntityTicker<T> getTicker
(Level p_154683_, BlockState p_154684_, BlockEntityType<T> p_154685_) newBlockEntity
(BlockPos p_154687_, BlockState p_154688_) protected void
spawnAfterBreak
(BlockState p_222477_, ServerLevel p_222478_, BlockPos p_222479_, ItemStack p_222480_, boolean p_222481_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEvent
Methods inherited from class net.minecraft.world.level.block.Block
animateTick, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, createBlockStateDefinition, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, 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, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, tick, updateIndirectNeighbourShapes, updateShape, 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.level.block.EntityBlock
getListener
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, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, 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, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
-
Constructor Details
-
SpawnerBlock
-
-
Method Details
-
codec
- Specified by:
codec
in classBaseEntityBlock
-
newBlockEntity
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_154683_, BlockState p_154684_, BlockEntityType<T> p_154685_) -
spawnAfterBreak
protected void spawnAfterBreak(BlockState p_222477_, ServerLevel p_222478_, BlockPos p_222479_, ItemStack p_222480_, boolean p_222481_) - Overrides:
spawnAfterBreak
in classBlockBehaviour
-
getExpDrop
public int getExpDrop(BlockState state, LevelReader world, RandomSource randomSource, BlockPos pos, int fortune, int silktouch) Description copied from interface:IBlockExtension
Gathers how much experience this block drops when broken.- Parameters:
state
- The current stateworld
- The levelrandomSource
- Random source to use for experience randomnesspos
- Block positionfortune
- fortune enchantment level of tool being usedsilktouch
- silk touch enchantment level of tool being used- Returns:
- Amount of XP from breaking this block.
-
getRenderShape
- Overrides:
getRenderShape
in classBaseEntityBlock
-
appendHoverText
public void appendHoverText(ItemStack p_255714_, Item.TooltipContext p_339639_, List<Component> p_255708_, TooltipFlag p_255667_) - Overrides:
appendHoverText
in classBlock
-