Class DecoratedPotBlock
- All Implemented Interfaces:
BlockEntityProvider
,FluidDrainable
,FluidFillable
,Waterloggable
,ItemConvertible
,ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/block/DecoratedPotBlock
intermediary net/minecraft/class_8168
official dhb
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<DecoratedPotBlock> static final BooleanProperty
private static final DirectionProperty
private static final VoxelShape
static final Identifier
private static final BooleanProperty
Fields 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, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendProperties
(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.void
appendTooltip
(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item.protected boolean
canPathfindThrough
(BlockState state, NavigationType type) Returns if an entity using navigation typetype
can navigate through this block.createBlockEntity
(BlockPos pos, BlockState state) Returns a new block entity instance.com.mojang.serialization.MapCodec
<DecoratedPotBlock> getCodec()
protected int
getComparatorOutput
(BlockState state, World world, BlockPos pos) Returns the comparator output of the block, from0
to15
.getDroppedStacks
(BlockState state, LootContextParameterSet.Builder builder) Returns the block's dropped item stacks.protected FluidState
getFluidState
(BlockState state) Returns the state's associated fluid state.protected VoxelShape
getOutlineShape
(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getPickStack
(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.protected BlockSoundGroup
getSoundGroup
(BlockState state) protected BlockState
getStateForNeighborUpdate
(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.protected boolean
hasComparatorOutput
(BlockState state) Returns whether the block can have a comparator output.protected BlockState
mirror
(BlockState state, BlockMirror mirror) Returnsstate
mirrored bymirror
.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.protected void
onProjectileHit
(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile) Called when aProjectileEntity
hits a block.protected void
onStateReplaced
(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed.protected ActionResult
onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) protected ItemActionResult
onUseWithItem
(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected BlockState
rotate
(BlockState state, BlockRotation rotation) Returnsstate
rotated byrotation
.Methods inherited from class net.minecraft.block.BlockWithEntity
createScreenHandlerFactory, getRenderType, onSyncedBlockEvent, validateTicker
Methods inherited from class net.minecraft.block.Block
afterBreak, 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, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createCodec, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getHardness, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSettings, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasRandomTicks, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, isTransparent, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onStacksDropped, prepare, randomTick, scheduledTick
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener, getTicker
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
Methods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/block/DecoratedPotBlock;CODEC:Lcom/mojang/serialization/MapCodec;
intermediary field_46333
Lnet/minecraft/class_8168;field_46333:Lcom/mojang/serialization/MapCodec;
official a
Ldhb;a:Lcom/mojang/serialization/MapCodec;
-
SHERDS_DYNAMIC_DROP_ID
- Mappings:
Namespace Name Mixin selector named SHERDS_DYNAMIC_DROP_ID
Lnet/minecraft/block/DecoratedPotBlock;SHERDS_DYNAMIC_DROP_ID:Lnet/minecraft/util/Identifier;
intermediary field_43236
Lnet/minecraft/class_8168;field_43236:Lnet/minecraft/class_2960;
official b
Ldhb;b:Lalf;
-
SHAPE
- Mappings:
Namespace Name Mixin selector named SHAPE
Lnet/minecraft/block/DecoratedPotBlock;SHAPE:Lnet/minecraft/util/shape/VoxelShape;
intermediary field_42754
Lnet/minecraft/class_8168;field_42754:Lnet/minecraft/class_265;
official d
Ldhb;d:Lewm;
-
FACING
- Mappings:
Namespace Name Mixin selector named FACING
Lnet/minecraft/block/DecoratedPotBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
intermediary field_42755
Lnet/minecraft/class_8168;field_42755:Lnet/minecraft/class_2753;
official e
Ldhb;e:Ldsy;
-
CRACKED
- Mappings:
Namespace Name Mixin selector named CRACKED
Lnet/minecraft/block/DecoratedPotBlock;CRACKED:Lnet/minecraft/state/property/BooleanProperty;
intermediary field_43237
Lnet/minecraft/class_8168;field_43237:Lnet/minecraft/class_2746;
official c
Ldhb;c:Ldsv;
-
WATERLOGGED
- Mappings:
Namespace Name Mixin selector named WATERLOGGED
Lnet/minecraft/block/DecoratedPotBlock;WATERLOGGED:Lnet/minecraft/state/property/BooleanProperty;
intermediary field_42756
Lnet/minecraft/class_8168;field_42756:Lnet/minecraft/class_2746;
official f
Ldhb;f:Ldsv;
-
-
Constructor Details
-
DecoratedPotBlock
- 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>
Ldsd;<init>(Ldsd$d;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodec
in classBlockWithEntity
- 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
Ldsd;a()Lcom/mojang/serialization/MapCodec;
-
getStateForNeighborUpdate
protected BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.Returning
Blocks.AIR
breaks the block. This is useful to implement supporting block requirement for blocks (if used along withAbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)
).Side effects like activating a redstone component (but not scheduling a tick) should be performed in
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)
instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient
. This is not called ifBlock.FORCE_STATE
flag is set in thesetBlockState
call.This method can be used for multiple purposes. Here are some examples:
FenceBlock
uses it to update the fence's connection when a horizontally neighboring block's state is changed.PlantBlock
uses it to break the plant if the state change causes it to lose its supporting block.DoorBlock
uses it to copy the state of the other half of the door.SlabBlock
uses it to schedule the fluid to tick if waterlogged.SoulSandBlock
uses it to schedule the water block above to tick so that it becomes a bubble column.FallingBlock
uses it to schedule the block to tick so that it can fall if needed.
- Overrides:
getStateForNeighborUpdate
in classAbstractBlock
- Parameters:
state
- the state of this blockdirection
- the direction from this block to the neighborneighborState
- the state of the updated neighbor blockworld
- the worldpos
- the position of this blockneighborPos
- the position of the neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
Namespace Name Mixin selector named getStateForNeighborUpdate
Lnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
intermediary method_9559
Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;
official a
Ldsd;a(Ldse;Lje;Ldse;Ldcb;Liz;Liz;)Ldse;
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector named getPlacementState
Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
intermediary method_9605
Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
official a
Ldfb;a(Lcyc;)Ldse;
-
onUseWithItem
protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) - Overrides:
onUseWithItem
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector named onUseWithItem
Lnet/minecraft/block/AbstractBlock;onUseWithItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ItemActionResult;
intermediary method_55765
Lnet/minecraft/class_4970;method_55765(Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_9062;
official a
Ldsd;a(Lcur;Ldse;Ldca;Liz;Lcmz;Lbqv;Levp;)Lbqy;
-
onUse
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) - Overrides:
onUse
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector named onUse
Lnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
intermediary method_55766
Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;
official a
Ldsd;a(Ldse;Ldca;Liz;Lcmz;Levp;)Lbqw;
-
getOutlineShape
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShape
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named getOutlineShape
Lnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
intermediary method_9530
Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
official a
Ldsd;a(Ldse;Ldbg;Liz;Levy;)Lewm;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])
inside the method. SeeProperties
for the list of pre-defined properties.- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector named appendProperties
Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
intermediary method_9515
Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
official a
Ldfb;a(Ldsf$a;)V
-
createBlockEntity
Returns a new block entity instance.For example:
@Override public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { return new MyBlockEntity(pos, state); }
- Specified by:
createBlockEntity
in interfaceBlockEntityProvider
- Returns:
- a new block entity instance
- Implementation Note:
- While this is marked as nullable, in practice this should never return
null
.PistonExtensionBlock
is the only block in vanilla that returnsnull
inside the implementation. - Mappings:
Namespace Name Mixin selector named createBlockEntity
Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
intermediary method_10123
Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;
official a
Ldht;a(Liz;Ldse;)Ldpj;
-
onStateReplaced
protected void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called server-side on the old block when the block state is changed. This includes block removal. This is used to update neighboring blocks when an active redstone power source is removed, or to drop the contents of an inventory. The checkstate.isOf(newState.getBlock())
can be used to see if the block was removed or not.For most block entities,
ItemScatterer.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)
provides a good implementation of this method. Make sure to callsuper.onStateReplaced(state, world, pos, newState, moved);
after invokingItemScatterer
methods.- Overrides:
onStateReplaced
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named onStateReplaced
Lnet/minecraft/block/AbstractBlock;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V
intermediary method_9536
Lnet/minecraft/class_4970;method_9536(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
official a
Ldsd;a(Ldse;Ldca;Liz;Ldse;Z)V
-
getDroppedStacks
protected List<ItemStack> getDroppedStacks(BlockState state, LootContextParameterSet.Builder builder) Returns the block's dropped item stacks.The default implementation uses loot tables. Blocks with custom drops should not hardcode the drops; instead, make a new loot table. If the loot table needs an additional context, override this method and modify
builder
before callingsuper.getDroppedStacks
. An example of this isShulkerBoxBlock
. Note that to prevent item duplication, when appending item stacks to the builder,ItemStack.split(int)
should be called.This method should not be used for dropping inventory contents (
onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)
should be used instead) or to drop experience orbs (AbstractBlock.onStacksDropped(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, boolean)
should be used instead).- Overrides:
getDroppedStacks
in classAbstractBlock
- Returns:
- the block's dropped item stacks
- See Also:
- Mappings:
Namespace Name Mixin selector named getDroppedStacks
Lnet/minecraft/block/AbstractBlock;getDroppedStacks(Lnet/minecraft/block/BlockState;Lnet/minecraft/loot/context/LootContextParameterSet$Builder;)Ljava/util/List;
intermediary method_9560
Lnet/minecraft/class_4970;method_9560(Lnet/minecraft/class_2680;Lnet/minecraft/class_8567$class_8568;)Ljava/util/List;
official a
Ldsd;a(Ldse;Leqn$a;)Ljava/util/List;
-
onBreak
Called when a player breaks a block before the block is removed from the world. Explosions do not trigger this.Default implementation spawns block breaking particles, angers piglins, and emits game events. Tall or wide blocks such as doors or beds should override this to break the other part (along with
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos)
.)In most cases,
AbstractBlock.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean)
orAbstractBlock.onStacksDropped(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.item.ItemStack, boolean)
should be used instead. Note that they are called when blocks are broken by explosions as well as players breaking them.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient
.- Overrides:
onBreak
in classBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named onBreak
Lnet/minecraft/block/Block;onBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/block/BlockState;
intermediary method_9576
Lnet/minecraft/class_2248;method_9576(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;)Lnet/minecraft/class_2680;
official a
Ldfb;a(Ldca;Liz;Ldse;Lcmz;)Ldse;
-
getFluidState
Returns the state's associated fluid state.Waterloggable blocks must override this to return
Fluids.WATER.getStill(false)
when waterlogged.- Overrides:
getFluidState
in classAbstractBlock
- Returns:
- the state's associated fluid state
- See Also:
- Mappings:
Namespace Name Mixin selector named getFluidState
Lnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;
intermediary method_9545
Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;
official b_
Ldsd;b_(Ldse;)Lenx;
-
getSoundGroup
- Overrides:
getSoundGroup
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector named getSoundGroup
Lnet/minecraft/block/AbstractBlock;getSoundGroup(Lnet/minecraft/block/BlockState;)Lnet/minecraft/sound/BlockSoundGroup;
intermediary method_9573
Lnet/minecraft/class_4970;method_9573(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2498;
official g_
Ldsd;g_(Ldse;)Ldmo;
-
appendTooltip
public void appendTooltip(ItemStack stack, Item.TooltipContext context, List<Text> tooltip, TooltipType options) Appends tooltips to a stack of this block's corresponding block item. Used by shulker boxes.- Overrides:
appendTooltip
in classBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named appendTooltip
Lnet/minecraft/block/Block;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/Item$TooltipContext;Ljava/util/List;Lnet/minecraft/client/item/TooltipType;)V
intermediary method_9568
Lnet/minecraft/class_2248;method_9568(Lnet/minecraft/class_1799;Lnet/minecraft/class_1792$class_9635;Ljava/util/List;Lnet/minecraft/class_1836;)V
official a
Ldfb;a(Lcur;Lcum$b;Ljava/util/List;Lcwk;)V
-
onProjectileHit
protected void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile) Called when aProjectileEntity
hits a block.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
World.isClient
.Here are some examples:
TargetBlock
activates.BellBlock
rings.LightningRodBlock
spawns a lightning.AbstractCandleBlock
lights on fire when hit by a projectile on fire.
- Overrides:
onProjectileHit
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named onProjectileHit
Lnet/minecraft/block/AbstractBlock;onProjectileHit(Lnet/minecraft/world/World;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/hit/BlockHitResult;Lnet/minecraft/entity/projectile/ProjectileEntity;)V
intermediary method_19286
Lnet/minecraft/class_4970;method_19286(Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_3965;Lnet/minecraft/class_1676;)V
official a
Ldsd;a(Ldca;Ldse;Levp;Lcnr;)V
-
getPickStack
Returns the new item stack when using pick block functionality.Pick block is available via middle-clicking by default. Blocks without the corresponding
BlockItem
, such as crops, should override this method to return the correct item stack.- Overrides:
getPickStack
in classBlock
- Returns:
- the new item stack when using pick block functionality
- Mappings:
Namespace Name Mixin selector named getPickStack
Lnet/minecraft/block/Block;getPickStack(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
intermediary method_9574
Lnet/minecraft/class_2248;method_9574(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1799;
official a
Ldfb;a(Ldcd;Liz;Ldse;)Lcur;
-
hasComparatorOutput
Returns whether the block can have a comparator output.This does not check the current comparator output of the block. Use
getComparatorOutput(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos)
in that case.- Overrides:
hasComparatorOutput
in classAbstractBlock
- Returns:
- whether the block can have a comparator output
- See Also:
- Mappings:
Namespace Name Mixin selector named hasComparatorOutput
Lnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
intermediary method_9498
Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Z
official c_
Ldsd;c_(Ldse;)Z
-
getComparatorOutput
Returns the comparator output of the block, from0
to15
.When overriding this,
hasComparatorOutput(net.minecraft.block.BlockState)
must also be overridden.- Overrides:
getComparatorOutput
in classAbstractBlock
- Returns:
- the comparator output of the block, from
0
to15
- See Also:
- Mappings:
Namespace Name Mixin selector named getComparatorOutput
Lnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
intermediary method_9572
Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I
official a
Ldsd;a(Ldse;Ldca;Liz;)I
-
rotate
Returnsstate
rotated byrotation
.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
state
rotated byrotation
- See Also:
- Mappings:
Namespace Name Mixin selector named rotate
Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
intermediary method_9598
Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
official a
Ldsd;a(Ldse;Ldlo;)Ldse;
-
mirror
Returnsstate
mirrored bymirror
.By default, this returns the provided block state.
- Overrides:
mirror
in classAbstractBlock
- Returns:
state
mirrored bymirror
- See Also:
- Mappings:
Namespace Name Mixin selector named mirror
Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
intermediary method_9569
Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
official a
Ldsd;a(Ldse;Ldjy;)Ldse;
-