Package net.minecraft.block
Class SpreadableBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.SnowyBlock
net.minecraft.block.SpreadableBlock
- All Implemented Interfaces:
- ItemConvertible,- ToggleableFeature
- Direct Known Subclasses:
- GrassBlock,- MyceliumBlock
- Mappings:
- Namespace - Name - named - net/minecraft/block/SpreadableBlock- intermediary - net/minecraft/class_2500- official - drj
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.block.AbstractBlockAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
- 
Field SummaryFields inherited from class net.minecraft.block.SnowyBlockCODEC, SNOWYFields inherited from class net.minecraft.block.Blockfield_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate static booleancanSpread(BlockState state, WorldView world, BlockPos pos) private static booleancanSurvive(BlockState state, WorldView world, BlockPos pos) protected abstract com.mojang.serialization.MapCodec<? extends SpreadableBlock> getCodec()protected voidrandomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block gets ticked randomly.Methods inherited from class net.minecraft.block.SnowyBlockappendProperties, getPlacementState, getStateForNeighborUpdate, isSnowMethods inherited from class net.minecraft.block.BlockafterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, prepare, rotate, scheduledTickMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Constructor Details- 
SpreadableBlock- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V- intermediary - <init>- Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V- official - <init>- Ldwx;<init>(Ldwx$d;)V
 
 
- 
- 
Method Details- 
canSurvive- Mappings:
- Namespace - Name - Mixin selector - named - canSurvive- Lnet/minecraft/block/SpreadableBlock;canSurvive(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_10614- Lnet/minecraft/class_2500;method_10614(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z- official - b- Ldrj;b(Ldwy;Ldgm;Lji;)Z
 
- 
getCodec- Overrides:
- getCodecin class- SnowyBlock
- Mappings:
- Namespace - Name - Mixin selector - named - getCodec- Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;- intermediary - method_53969- Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;- official - a- Ldwx;a()Lcom/mojang/serialization/MapCodec;
 
- 
canSpread- Mappings:
- Namespace - Name - Mixin selector - named - canSpread- Lnet/minecraft/block/SpreadableBlock;canSpread(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z- intermediary - method_10613- Lnet/minecraft/class_2500;method_10613(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z- official - c- Ldrj;c(Ldwy;Ldgm;Lji;)Z
 
- 
randomTickCalled server-side when a block gets ticked randomly. This can be overridden to implement various logics, most commonly plant growth. Default implementation does nothing. To control the rate of the action, userandom.Random tick speed is controlled by the game rule randomTickSpeedand can be disabled. Only blocks within 128-block cylinder (i.e. ignoring Y coordinates) around players receive random ticks.Blocks overriding this must use AbstractBlock.Settings.ticksRandomly()block settings.Here are some examples: - SugarCaneBlockuses this to grow sugar cane.
- OxidizableBlockuses this to oxidize.
- NetherPortalBlockuses this to spawn zombified piglins.
- LeavesBlockuses this to decay when far from logs.
 - Overrides:
- randomTickin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - randomTick- Lnet/minecraft/block/AbstractBlock;randomTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V- intermediary - method_9514- Lnet/minecraft/class_4970;method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V- official - b- Ldwx;b(Ldwy;Lard;Lji;Lazh;)V
 
 
-