Package net.minecraft.block
Class ExperienceDroppingBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.ExperienceDroppingBlock
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Direct Known Subclasses:
SculkBlock
- Mappings:
Namespace Name named net/minecraft/block/ExperienceDroppingBlockintermediary net/minecraft/class_2431official dii
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ExperienceDroppingBlock> private final IntProviderFields inherited from class net.minecraft.block.Block
field_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, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionExperienceDroppingBlock(IntProvider experienceDropped, AbstractBlock.Settings settings) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends ExperienceDroppingBlock> getCodec()protected voidonStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.Methods inherited from class net.minecraft.block.Block
afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, 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.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, isTransparent, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, prepare, randomTick, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/ExperienceDroppingBlock;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_46340Lnet/minecraft/class_2431;field_46340:Lcom/mojang/serialization/MapCodec;official aLdii;a:Lcom/mojang/serialization/MapCodec;
-
experienceDropped
- Mappings:
Namespace Name Mixin selector named experienceDroppedLnet/minecraft/block/ExperienceDroppingBlock;experienceDropped:Lnet/minecraft/util/math/intprovider/IntProvider;intermediary field_27195Lnet/minecraft/class_2431;field_27195:Lnet/minecraft/class_6017;official bLdii;b:Lbpw;
-
-
Constructor Details
-
ExperienceDroppingBlock
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/ExperienceDroppingBlock;<init>(Lnet/minecraft/util/math/intprovider/IntProvider;Lnet/minecraft/block/AbstractBlock$Settings;)Vintermediary <init>Lnet/minecraft/class_2431;<init>(Lnet/minecraft/class_6017;Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Ldii;<init>(Lbpw;Ldtb$d;)V
-
-
Method Details
-
getCodec
- Overrides:
getCodecin classBlock- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;official aLdtb;a()Lcom/mojang/serialization/MapCodec;
-
onStacksDropped
protected void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion. This is mostly overridden to drop experience orbs. To change the dropped item stacks, use loot tables orBlock.getDroppedStacks(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.block.entity.BlockEntity). To drop inventory contents, useAbstractBlock.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)instead.Experience orbs should only be dropped if
dropExperienceistrue.Block.dropExperienceWhenMined(net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, net.minecraft.util.math.intprovider.IntProvider)can be used to drop experience orbs.ExperienceDroppingBlockprovides the implementation for experience-dropping blocks.- Overrides:
onStacksDroppedin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named onStacksDroppedLnet/minecraft/block/AbstractBlock;onStacksDropped(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;Z)Vintermediary method_9565Lnet/minecraft/class_4970;method_9565(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_1799;Z)Vofficial aLdtb;a(Ldtc;Laqu;Ljd;Lcuq;Z)V
-