Package net.minecraft.block
Class DispenserBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.DispenserBlock
- All Implemented Interfaces:
BlockEntityProvider
- Direct Known Subclasses:
DropperBlock
- Mappings:
Namespace Name official amwintermediary net/minecraft/class_128named net/minecraft/block/DispenserBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DirectionPropertyprotected Randomstatic final DefaultedRegistry<Item,DispenserBehavior> static final BooleanPropertyFields inherited from class net.minecraft.block.Block
blastResistance, BLOCK_STATES, blockEntity, blockSoundGroup, collisionBox, EMPTY_BOX, fullBlock, hardness, lightLevel, material, materialColor, opacity, particleGravity, randomTicks, REGISTRY, slipperiness, stateManager, stats, transluscent, useNeighbourLight -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StateManagerReturns a new state manager with a property array.createBlockEntity(World world, int id) protected voidprotected DispenserBehaviorgetBehaviorForItem(ItemStack stack) getBlockRenderType(BlockState state) intgetComparatorOutput(BlockState state, World world, BlockPos pos) intgetData(BlockState state) Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workstatic PositiongetPosition(BlockPointer pointer) getStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity) Returns a BlockState from an idintgetTickRate(World world) Returns the block's tick rate.booleanmethod_11577(BlockState state) private voidmethod_8740(World world, BlockPos pos, BlockState state) voidvoidonBreaking(World world, BlockPos pos, BlockState state) Runs when the block is removed (by an entity or explosion).voidonCreation(World world, BlockPos pos, BlockState state) Runs when the block is placed (by a player or enderman).voidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Runs when the block is placed by an entityvoidscheduledTick(World world, BlockPos pos, BlockState state, Random rand) Runs when the block is updated as per a schedulestateFromData(int data) Returns a blockstate of the current block from it's idbooleanuse(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction direction, float float2, float float3, float float4) withMirror(BlockState state, BlockMirror mirror) withRotation(BlockState state, BlockRotation rotation) Methods inherited from class net.minecraft.block.BlockWithEntity
method_435, method_8602, method_8603, method_8651Methods inherited from class net.minecraft.block.Block
appendCollisionBoxes, appendCollisionBoxes, areBlocksEqual, blocksMovement, canBePlacedAdjacent, canBePlacedAtPos, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, get, getBlastResistance, getBlockFromItem, getBlockState, getBonusDrops, getByBlockState, getById, getCollisionBox, getDefaultState, getDropCount, getDropItem, getHardness, getIdByBlock, getItemGroup, getLuminance, getMaterial, getMaterialColor, getMeta, getOffsetType, getOpacity, getPistonBehavior, getRenderLayerType, getSoundGroup, getStateFromRawId, getStateManager, getTranslatedName, getTranslationKey, hasBlockEntity, hasCollision, hasCollision, hasStats, isEqualTo, isFire, isFullBlock, isFullBoundsCubeForCulling, isTransluscent, method_11557, method_11559, method_11562, method_11563, method_11564, method_11565, method_11566, method_11568, method_11575, method_11576, method_13315, method_13700, method_13701, method_13702, method_13703, method_13704, method_414, method_8638, method_8640, method_8640, method_8653, method_8654, method_8664, method_8669, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onSteppedOn, onUpdateTick, rainTick, randomDropAsItem, requiresSilkTouch, setBlockSoundGroup, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, useNeighbourLight
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official aLamw;a:Laty;intermediary field_9367Lnet/minecraft/class_128;field_9367:Lnet/minecraft/class_2244;named FACINGLnet/minecraft/block/DispenserBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
-
TRIGGERED
- Mappings:
Namespace Name Mixin selector official bLamw;b:Latx;intermediary field_9368Lnet/minecraft/class_128;field_9368:Lnet/minecraft/class_2243;named TRIGGEREDLnet/minecraft/block/DispenserBlock;TRIGGERED:Lnet/minecraft/state/property/BooleanProperty;
-
SPECIAL_ITEMS
- Mappings:
Namespace Name Mixin selector official cLamw;c:Lcu;intermediary field_9366Lnet/minecraft/class_128;field_9366:Lnet/minecraft/class_1342;named SPECIAL_ITEMSLnet/minecraft/block/DispenserBlock;SPECIAL_ITEMS:Lnet/minecraft/util/registry/DefaultedRegistry;
-
random
- Mappings:
Namespace Name Mixin selector official dLamw;d:Ljava/util/Random;intermediary field_277Lnet/minecraft/class_128;field_277:Ljava/util/Random;named randomLnet/minecraft/block/DispenserBlock;random:Ljava/util/Random;
-
-
Constructor Details
-
DispenserBlock
protected DispenserBlock()
-
-
Method Details
-
getTickRate
Returns the block's tick rate. Default is 10.- Overrides:
getTickRatein classBlock- Parameters:
world- The world that the block is placed in- Returns:
- Tick rate
- Mappings:
Namespace Name Mixin selector official aLalu;a(Lajs;)Iintermediary method_4789Lnet/minecraft/class_197;method_4789(Lnet/minecraft/class_1150;)Inamed getTickRateLnet/minecraft/block/Block;getTickRate(Lnet/minecraft/world/World;)I
-
onCreation
Runs when the block is placed (by a player or enderman).- Overrides:
onCreationin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official cLalu;c(Lajs;Lco;Latl;)Vintermediary method_8668Lnet/minecraft/class_197;method_8668(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
method_8740
- Mappings:
Namespace Name Mixin selector official eLamw;e(Lajs;Lco;Latl;)Vintermediary method_8740Lnet/minecraft/class_128;method_8740(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed method_8740Lnet/minecraft/block/DispenserBlock;method_8740(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
use
public boolean use(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction direction, float float2, float float3, float float4) - Overrides:
usein classBlock- Mappings:
Namespace Name Mixin selector official aLalu;a(Lajs;Lco;Latl;Laay;Lri;Lcv;FFF)Zintermediary method_421Lnet/minecraft/class_197;method_421(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;Lnet/minecraft/class_1354;FFF)Znamed useLnet/minecraft/block/Block;use(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/Direction;FFF)Z
-
dispense
- Mappings:
Namespace Name Mixin selector official cLamw;c(Lajs;Lco;)Vintermediary method_8741Lnet/minecraft/class_128;method_8741(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Vnamed dispenseLnet/minecraft/block/DispenserBlock;dispense(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
-
getBehaviorForItem
- Mappings:
Namespace Name Mixin selector official aLamw;a(Lafj;)Lcw;intermediary method_4770Lnet/minecraft/class_128;method_4770(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1348;named getBehaviorForItemLnet/minecraft/block/DispenserBlock;getBehaviorForItem(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/block/dispenser/DispenserBehavior;
-
onBreak
- Overrides:
onBreakin classBlock- Mappings:
Namespace Name Mixin selector official aLalu;a(Latl;Lajs;Lco;Lalu;Lco;)Vintermediary method_8641Lnet/minecraft/class_197;method_8641(Lnet/minecraft/class_2232;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_197;Lnet/minecraft/class_2552;)Vnamed onBreakLnet/minecraft/block/Block;onBreak(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos;)V
-
scheduledTick
Runs when the block is updated as per a schedule- Overrides:
scheduledTickin classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStaterand- Random object- Mappings:
Namespace Name Mixin selector official bLalu;b(Lajs;Lco;Latl;Ljava/util/Random;)Vintermediary method_8661Lnet/minecraft/class_197;method_8661(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Ljava/util/Random;)Vnamed scheduledTickLnet/minecraft/block/Block;scheduledTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/Random;)V
-
createBlockEntity
- Mappings:
Namespace Name Mixin selector official aLani;a(Lajs;I)Lasc;intermediary method_309Lnet/minecraft/class_1451;method_309(Lnet/minecraft/class_1150;I)Lnet/minecraft/class_226;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/world/World;I)Lnet/minecraft/block/entity/BlockEntity;
-
getStateFromData
public BlockState getStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity) Returns a BlockState from an id- Overrides:
getStateFromDatain classBlock- Parameters:
world- The world that the block is placed inpos- The block's positiondir- The block's direction- Mappings:
Namespace Name Mixin selector official aLalu;a(Lajs;Lco;Lcv;FFFILsw;)Latl;intermediary method_8645Lnet/minecraft/class_197;method_8645(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_1354;FFFILnet/minecraft/class_1699;)Lnet/minecraft/class_2232;named getStateFromDataLnet/minecraft/block/Block;getStateFromData(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FFFILnet/minecraft/entity/LivingEntity;)Lnet/minecraft/block/BlockState;
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Runs when the block is placed by an entity- Overrides:
onPlacedin classBlock- Parameters:
world- The world that the block is inpos- The block's positionstate- The block's BlockStateplacer- The entity who placed the blockitemStack- ItemStack instance- Mappings:
Namespace Name Mixin selector official aLalu;a(Lajs;Lco;Latl;Lsw;Lafj;)Vintermediary method_419Lnet/minecraft/class_197;method_419(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;Lnet/minecraft/class_1699;Lnet/minecraft/class_1071;)Vnamed onPlacedLnet/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
-
onBreaking
Runs when the block is removed (by an entity or explosion).- Overrides:
onBreakingin classBlockWithEntity- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockState- Mappings:
Namespace Name Mixin selector official bLalu;b(Lajs;Lco;Latl;)Vintermediary method_8659Lnet/minecraft/class_197;method_8659(Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;Lnet/minecraft/class_2232;)Vnamed onBreakingLnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getPosition
- Mappings:
Namespace Name Mixin selector official aLamw;a(Lcp;)Ldf;intermediary method_4169Lnet/minecraft/class_128;method_4169(Lnet/minecraft/class_1332;)Lnet/minecraft/class_1364;named getPositionLnet/minecraft/block/DispenserBlock;getPosition(Lnet/minecraft/util/math/BlockPointer;)Lnet/minecraft/util/math/Position;
-
method_11577
- Overrides:
method_11577in classBlock- Mappings:
Namespace Name Mixin selector official xLalu;x(Latl;)Zintermediary method_11577Lnet/minecraft/class_197;method_11577(Lnet/minecraft/class_2232;)Znamed method_11577Lnet/minecraft/block/Block;method_11577(Lnet/minecraft/block/BlockState;)Z
-
getComparatorOutput
- Overrides:
getComparatorOutputin classBlock- Mappings:
Namespace Name Mixin selector official cLalu;c(Latl;Lajs;Lco;)Iintermediary method_8686Lnet/minecraft/class_197;method_8686(Lnet/minecraft/class_2232;Lnet/minecraft/class_1150;Lnet/minecraft/class_2552;)Inamed getComparatorOutputLnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
getBlockRenderType
- Overrides:
getBlockRenderTypein classBlockWithEntity- Mappings:
Namespace Name Mixin selector official aLalu;a(Latl;)Laqf;intermediary method_11552Lnet/minecraft/class_197;method_11552(Lnet/minecraft/class_2232;)Lnet/minecraft/class_2733;named getBlockRenderTypeLnet/minecraft/block/Block;getBlockRenderType(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockRenderType;
-
stateFromData
Returns a blockstate of the current block from it's id- Overrides:
stateFromDatain classBlock- Parameters:
data- The Blockstate's associated data value- Returns:
- The Default state
- Mappings:
Namespace Name Mixin selector official aLalu;a(I)Latl;intermediary method_8635Lnet/minecraft/class_197;method_8635(I)Lnet/minecraft/class_2232;named stateFromDataLnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
-
getData
Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not work- Overrides:
getDatain classBlock- Parameters:
state- The Blockstate- Returns:
- Zero
- Mappings:
Namespace Name Mixin selector official eLalu;e(Latl;)Iintermediary method_8671Lnet/minecraft/class_197;method_8671(Lnet/minecraft/class_2232;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
withRotation
- Overrides:
withRotationin classBlock- Mappings:
Namespace Name Mixin selector official aLalu;a(Latl;Laqi;)Latl;intermediary method_11556Lnet/minecraft/class_197;method_11556(Lnet/minecraft/class_2232;Lnet/minecraft/class_2734;)Lnet/minecraft/class_2232;named withRotationLnet/minecraft/block/Block;withRotation(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;
-
withMirror
- Overrides:
withMirrorin classBlock- Mappings:
Namespace Name Mixin selector official aLalu;a(Latl;Laou;)Latl;intermediary method_11555Lnet/minecraft/class_197;method_11555(Lnet/minecraft/class_2232;Lnet/minecraft/class_2727;)Lnet/minecraft/class_2232;named withMirrorLnet/minecraft/block/Block;withMirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official bLalu;b()Latm;intermediary method_8676Lnet/minecraft/class_197;method_8676()Lnet/minecraft/class_2233;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-