Package net.minecraft.block
Class DispenserBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.DispenserBlock
- All Implemented Interfaces:
BlockEntityProvider
,ItemConvertible
- Direct Known Subclasses:
DropperBlock
- Mappings:
Namespace Name official cet
intermediary net/minecraft/class_2315
named net/minecraft/block/DispenserBlock
-
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.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Map<Item,
DispenserBehavior> static final DirectionProperty
private static final int
static final BooleanProperty
Fields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, LOGGER, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendProperties
(StateManager.Builder<Block, BlockState> builder) createBlockEntity
(BlockPos pos, BlockState state) protected void
dispense
(ServerWorld world, BlockPos pos) protected DispenserBehavior
getBehaviorForItem
(ItemStack stack) int
getComparatorOutput
(BlockState state, World world, BlockPos pos) static Position
getOutputLocation
(BlockPointer pointer) getRenderType
(BlockState state) boolean
hasComparatorOutput
(BlockState state) mirror
(BlockState state, BlockMirror mirror) void
neighborUpdate
(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) void
onPlaced
(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) void
onStateReplaced
(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.static void
registerBehavior
(ItemConvertible provider, DispenserBehavior behavior) rotate
(BlockState state, BlockRotation rotation) Applies a block rotation to a block state.void
scheduledTick
(BlockState state, ServerWorld world, BlockPos pos, Random random) Methods inherited from class net.minecraft.block.BlockWithEntity
checkType, createScreenHandlerFactory, onSyncedBlockEvent
Methods inherited from class net.minecraft.block.Block
afterBreak, appendStacks, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasSidedTransparency, isShapeFullCube, isSideInvisible, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTick
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
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official a
Lcet;a:Lcox;
intermediary field_10918
Lnet/minecraft/class_2315;field_10918:Lnet/minecraft/class_2753;
named FACING
Lnet/minecraft/block/DispenserBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
-
TRIGGERED
- Mappings:
Namespace Name Mixin selector official b
Lcet;b:Lcou;
intermediary field_10920
Lnet/minecraft/class_2315;field_10920:Lnet/minecraft/class_2746;
named TRIGGERED
Lnet/minecraft/block/DispenserBlock;TRIGGERED:Lnet/minecraft/state/property/BooleanProperty;
-
BEHAVIORS
- Mappings:
Namespace Name Mixin selector official c
Lcet;c:Ljava/util/Map;
intermediary field_10919
Lnet/minecraft/class_2315;field_10919:Ljava/util/Map;
named BEHAVIORS
Lnet/minecraft/block/DispenserBlock;BEHAVIORS:Ljava/util/Map;
-
SCHEDULED_TICK_DELAY
private static final int SCHEDULED_TICK_DELAY- See Also:
- Mappings:
Namespace Name Mixin selector official d
Lcet;d:I
intermediary field_31082
Lnet/minecraft/class_2315;field_31082:I
named SCHEDULED_TICK_DELAY
Lnet/minecraft/block/DispenserBlock;SCHEDULED_TICK_DELAY:I
-
-
Constructor Details
-
DispenserBlock
- Mappings:
Namespace Name Mixin selector official <init>
Lcob;<init>(Lcob$c;)V
intermediary <init>
Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
registerBehavior
- Mappings:
Namespace Name Mixin selector official a
Lcet;a(Lcac;Lhj;)V
intermediary method_10009
Lnet/minecraft/class_2315;method_10009(Lnet/minecraft/class_1935;Lnet/minecraft/class_2357;)V
named registerBehavior
Lnet/minecraft/block/DispenserBlock;registerBehavior(Lnet/minecraft/item/ItemConvertible;Lnet/minecraft/block/dispenser/DispenserBehavior;)V
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player. This, by default, is bound to using the right mouse button.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()
.If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
- Overrides:
onUse
in classAbstractBlock
- Returns:
- an action result that specifies if using the block was successful.
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Lcad;Lgh;Lbnr;Lavp;Ldoi;)Lavq;
intermediary method_9534
Lnet/minecraft/class_4970;method_9534(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_1269;
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/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;
-
dispense
- Mappings:
Namespace Name Mixin selector official a
Lcet;a(Ladi;Lgh;)V
intermediary method_10012
Lnet/minecraft/class_2315;method_10012(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)V
named dispense
Lnet/minecraft/block/DispenserBlock;dispense(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)V
-
getBehaviorForItem
- Mappings:
Namespace Name Mixin selector official a
Lcet;a(Lbue;)Lhj;
intermediary method_10011
Lnet/minecraft/class_2315;method_10011(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2357;
named getBehaviorForItem
Lnet/minecraft/block/DispenserBlock;getBehaviorForItem(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/block/dispenser/DispenserBehavior;
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) - Overrides:
neighborUpdate
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Lcad;Lgh;Lccy;Lgh;Z)V
intermediary method_9612
Lnet/minecraft/class_4970;method_9612(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)V
named neighborUpdate
Lnet/minecraft/block/AbstractBlock;neighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;Z)V
-
scheduledTick
- Overrides:
scheduledTick
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Ladi;Lgh;Ljava/util/Random;)V
intermediary method_9588
Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)V
named scheduledTick
Lnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Ljava/util/Random;)V
-
createBlockEntity
- Mappings:
Namespace Name Mixin selector official a
Lcff;a(Lgh;Lcoc;)Lclz;
intermediary method_10123
Lnet/minecraft/class_2343;method_10123(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2586;
named createBlockEntity
Lnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/entity/BlockEntity;
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lccy;a(Lbwe;)Lcoc;
intermediary method_9605
Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
named getPlacementState
Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) - Overrides:
onPlaced
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lccy;a(Lcad;Lgh;Lcoc;Laxh;Lbue;)V
intermediary method_9567
Lnet/minecraft/class_2248;method_9567(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)V
named onPlaced
Lnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplaced
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Lcad;Lgh;Lcoc;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
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
-
getOutputLocation
- Mappings:
Namespace Name Mixin selector official a
Lcet;a(Lgi;)Lgu;
intermediary method_10010
Lnet/minecraft/class_2315;method_10010(Lnet/minecraft/class_2342;)Lnet/minecraft/class_2374;
named getOutputLocation
Lnet/minecraft/block/DispenserBlock;getOutputLocation(Lnet/minecraft/util/math/BlockPointer;)Lnet/minecraft/util/math/Position;
-
hasComparatorOutput
- Overrides:
hasComparatorOutput
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official d_
Lcob;d_(Lcoc;)Z
intermediary method_9498
Lnet/minecraft/class_4970;method_9498(Lnet/minecraft/class_2680;)Z
named hasComparatorOutput
Lnet/minecraft/block/AbstractBlock;hasComparatorOutput(Lnet/minecraft/block/BlockState;)Z
-
getComparatorOutput
- Overrides:
getComparatorOutput
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Lcad;Lgh;)I
intermediary method_9572
Lnet/minecraft/class_4970;method_9572(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I
named getComparatorOutput
Lnet/minecraft/block/AbstractBlock;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
getRenderType
- Overrides:
getRenderType
in classBlockWithEntity
- Mappings:
Namespace Name Mixin selector official b_
Lcob;b_(Lcoc;)Lcin;
intermediary method_9604
Lnet/minecraft/class_4970;method_9604(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;
named getRenderType
Lnet/minecraft/block/AbstractBlock;getRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotate
in classAbstractBlock
- Returns:
- the rotated block state
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Lciu;)Lcoc;
intermediary method_9598
Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;
named rotate
Lnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
mirror
- Overrides:
mirror
in classAbstractBlock
- Mappings:
Namespace Name Mixin selector official a
Lcob;a(Lcoc;Lchh;)Lcoc;
intermediary method_9569
Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
named mirror
Lnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
-
appendProperties
- Overrides:
appendProperties
in classBlock
- Mappings:
Namespace Name Mixin selector official a
Lccy;a(Lcod$a;)V
intermediary method_9515
Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)V
named appendProperties
Lnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-