Package net.minecraft.block
Class InfestedBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.InfestedBlock
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Direct Known Subclasses:
RotatedInfestedBlock
- Mappings:
Namespace Name official daointermediary net/minecraft/class_2384named net/minecraft/block/InfestedBlock
-
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<InfestedBlock>private static final Map<BlockState,BlockState> private static final Map<BlockState,BlockState> private final BlockFields 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, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsConstructorDescriptionInfestedBlock(Block regularBlock, AbstractBlock.Settings settings) Creates an infested block -
Method Summary
Modifier and TypeMethodDescriptionprivate static BlockStatecopyProperties(Map<BlockState, BlockState> stateMap, BlockState fromState, Supplier<BlockState> toStateSupplier) static BlockStatefromRegularState(BlockState regularState) com.mojang.serialization.MapCodec<? extends InfestedBlock>getCodec()static booleanisInfestable(BlockState block) voidonStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack tool, boolean dropExperience) Called server-side when the stacks are dropped by mining or explosion.private voidspawnSilverfish(ServerWorld world, BlockPos pos) toRegularState(BlockState infestedState) 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, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, 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, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStateReplaced, onSyncedBlockEvent, onUse, 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 official aLdao;a:Lcom/mojang/serialization/MapCodec;intermediary field_46373Lnet/minecraft/class_2384;field_46373:Lcom/mojang/serialization/MapCodec;named CODECLnet/minecraft/block/InfestedBlock;CODEC:Lcom/mojang/serialization/MapCodec;
-
REGULAR_TO_INFESTED_BLOCK
- Mappings:
Namespace Name Mixin selector official cLdao;c:Ljava/util/Map;intermediary field_11179Lnet/minecraft/class_2384;field_11179:Ljava/util/Map;named REGULAR_TO_INFESTED_BLOCKLnet/minecraft/block/InfestedBlock;REGULAR_TO_INFESTED_BLOCK:Ljava/util/Map;
-
REGULAR_TO_INFESTED_STATE
- Mappings:
Namespace Name Mixin selector official dLdao;d:Ljava/util/Map;intermediary field_33564Lnet/minecraft/class_2384;field_33564:Ljava/util/Map;named REGULAR_TO_INFESTED_STATELnet/minecraft/block/InfestedBlock;REGULAR_TO_INFESTED_STATE:Ljava/util/Map;
-
INFESTED_TO_REGULAR_STATE
- Mappings:
Namespace Name Mixin selector official eLdao;e:Ljava/util/Map;intermediary field_33565Lnet/minecraft/class_2384;field_33565:Ljava/util/Map;named INFESTED_TO_REGULAR_STATELnet/minecraft/block/InfestedBlock;INFESTED_TO_REGULAR_STATE:Ljava/util/Map;
-
regularBlock
- Mappings:
Namespace Name Mixin selector official bLdao;b:Lcwq;intermediary field_11178Lnet/minecraft/class_2384;field_11178:Lnet/minecraft/class_2248;named regularBlockLnet/minecraft/block/InfestedBlock;regularBlock:Lnet/minecraft/block/Block;
-
-
Constructor Details
-
InfestedBlock
Creates an infested block- Parameters:
regularBlock- the block this infested block should mimicsettings- block settings- Mappings:
Namespace Name Mixin selector official <init>Ldao;<init>(Lcwq;Ldjg$d;)Vintermediary <init>Lnet/minecraft/class_2384;<init>(Lnet/minecraft/class_2248;Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/InfestedBlock;<init>(Lnet/minecraft/block/Block;Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getCodec
- Overrides:
getCodecin classBlock- Mappings:
Namespace Name Mixin selector official aLdjg;a()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
-
getRegularBlock
- Mappings:
Namespace Name Mixin selector official bLdao;b()Lcwq;intermediary method_10271Lnet/minecraft/class_2384;method_10271()Lnet/minecraft/class_2248;named getRegularBlockLnet/minecraft/block/InfestedBlock;getRegularBlock()Lnet/minecraft/block/Block;
-
isInfestable
- Mappings:
Namespace Name Mixin selector official hLdao;h(Ldjh;)Zintermediary method_10269Lnet/minecraft/class_2384;method_10269(Lnet/minecraft/class_2680;)Znamed isInfestableLnet/minecraft/block/InfestedBlock;isInfestable(Lnet/minecraft/block/BlockState;)Z
-
spawnSilverfish
- Mappings:
Namespace Name Mixin selector official aLdao;a(Land;Lhx;)Vintermediary method_24797Lnet/minecraft/class_2384;method_24797(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Vnamed spawnSilverfishLnet/minecraft/block/InfestedBlock;spawnSilverfish(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)V
-
onStacksDropped
public 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 orAbstractBlock.getDroppedStacks(net.minecraft.block.BlockState, net.minecraft.loot.context.LootContextParameterSet.Builder). 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 official aLdjg;a(Ldjh;Land;Lhx;Lcmy;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)Vnamed onStacksDroppedLnet/minecraft/block/AbstractBlock;onStacksDropped(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;Z)V
-
fromRegularState
- Mappings:
Namespace Name Mixin selector official nLdao;n(Ldjh;)Ldjh;intermediary method_36366Lnet/minecraft/class_2384;method_36366(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;named fromRegularStateLnet/minecraft/block/InfestedBlock;fromRegularState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
toRegularState
- Mappings:
Namespace Name Mixin selector official oLdao;o(Ldjh;)Ldjh;intermediary method_10270Lnet/minecraft/class_2384;method_10270(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;named toRegularStateLnet/minecraft/block/InfestedBlock;toRegularState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
copyProperties
private static BlockState copyProperties(Map<BlockState, BlockState> stateMap, BlockState fromState, Supplier<BlockState> toStateSupplier) - Mappings:
Namespace Name Mixin selector official aLdao;a(Ljava/util/Map;Ldjh;Ljava/util/function/Supplier;)Ldjh;intermediary method_36363Lnet/minecraft/class_2384;method_36363(Ljava/util/Map;Lnet/minecraft/class_2680;Ljava/util/function/Supplier;)Lnet/minecraft/class_2680;named copyPropertiesLnet/minecraft/block/InfestedBlock;copyProperties(Ljava/util/Map;Lnet/minecraft/block/BlockState;Ljava/util/function/Supplier;)Lnet/minecraft/block/BlockState;
-