Package net.minecraft.block
Class HopperBlock
java.lang.Object
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.HopperBlock
- All Implemented Interfaces:
BlockEntityProvider
public class HopperBlock extends BlockWithEntity
- Mappings:
Namespace Name official ahnintermediary net/minecraft/class_233named net/minecraft/block/HopperBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.OffsetType, Block.Sound -
Field Summary
Fields Modifier and Type Field Description static BooleanPropertyENABLEDstatic DirectionPropertyFACINGFields inherited from class net.minecraft.block.Block
ANVIL, BLOCK_STATES, blockEntity, boundingBoxMaxX, boundingBoxMaxY, boundingBoxMaxZ, boundingBoxMinX, boundingBoxMinY, boundingBoxMinZ, CLOTH, fullBlock, GLASS, GRASS, GRAVEL, LADDER, lightLevel, material, materialColor, opacity, ORE, particleGravity, RAIL, randomTicks, REGISTRY, resistance, SAND, SLIME, slipperiness, SNOW, sound, stateManager, stats, STONE, strength, transluscent, useNeighbourLight, WOOD -
Constructor Summary
Constructors Constructor Description HopperBlock() -
Method Summary
Modifier and Type Method Description voidappendCollisionBoxes(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity)protected StateManagerappendProperties()Returns a new state manager with a property array.BlockEntitycreateBlockEntity(World world, int id)intgetBlockType()intgetComparatorOutput(World world, BlockPos pos)Returns the block's comparator output value.intgetData(BlockState state)Returns the data value for a blockstate Throws anIllegalArmumentExceptionas this method does not workRenderLayergetRenderLayerType()Returns the appropriate RenderLayer for a block.BlockStategetStateFromData(World world, BlockPos pos, Direction dir, float float2, float float3, float float4, int id, LivingEntity entity)Returns a BlockState from an idbooleanhasComparatorOutput()Returns whether the block provides comparator output.booleanhasTransperancy()booleanisSideInvisible(WorldView view, BlockPos pos, Direction facing)Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks.static Directionmethod_879(int int2)static booleanmethod_881(int int2)voidneighborUpdate(World world, BlockPos pos, BlockState state, Block block)Runs when its adjacent blocks are updated.voidonBreaking(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 entitybooleanonUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)Runs when the block is used, i.e.booleanrenderAsNormalBlock()Returns whether the block can be rendered as a normal blockvoidsetBoundingBox(WorldView view, BlockPos pos)BlockStatestateFromData(int data)Returns a blockstate of the current block from it's idprivate voidupdateEnabled(World world, BlockPos pos, BlockState state)Methods inherited from class net.minecraft.block.BlockWithEntity
method_580, method_581, onEventMethods inherited from class net.minecraft.block.Block
appendItemStacks, areBlocksEqual, blocksMovement, calcBlockBreakingData, canBePlacedAdjacent, canBePlacedAtPos, canBeReplaced, canCollide, canMobSpawnInside, createStackFromBlock, disableStats, dropAsItem, dropExperience, emitsRedstonePower, get, getAmbientOcclusionLightLevel, getBlastResistance, getBlendColor, getBlockColor, getBlockFromItem, getBlockState, getBonusDrops, getBrightness, getByBlockState, getById, getCollisionBox, getColor, getColor, getDefaultState, getDropCount, getDropItem, getIdByBlock, getItemGroup, getLightLevel, getMaterial, getMaterialColor, getMaxX, getMaxY, getMaxZ, getMeta, getMeta, getMinX, getMinY, getMinZ, getOffsetType, getOpacity, getPickItem, getPistonInteractionType, getSelectionBox, getStateFromRawId, getStateManager, getStrength, getStrongRedstonePower, getTickRate, getTranslatedName, getTranslationKey, getWeakRedstonePower, harvest, hasBlockEntity, hasCollision, hasCollision, hasStats, isEqualTo, isFire, isFlowerPot, isFullBlock, isFullCube, isLeafBlock, isNormalBlock, isReplaceable, isTransluscent, method_655, method_696, onBlockBreak, onBlockBreakStart, onBreakByPlayer, onBreakByPlayer, onDestroyedByExplosion, onEntityCollision, onEntityCollision, onLandedUpon, onSteppedOn, onUpdateTick, rainTick, randomDisplayTick, randomDropAsItem, requiresSilkTouch, scheduledTick, setBlockItemBounds, setBoundingBox, setDefaultState, setEntityVelocity, setItemGroup, setLightLevel, setOpacity, setResistance, setSound, setStrength, setTickRandomly, setTranslationKey, setUnbreakable, setup, shouldDropItemsOnExplosion, ticksRandomly, toString, usesNeighbourLight
-
Field Details
-
FACING
- Mappings:
Namespace Name Mixin selector official aLahn;a:Laml;intermediary field_982Lnet/minecraft/class_233;field_982:Lnet/minecraft/class_389;named FACINGLnet/minecraft/block/HopperBlock;FACING:Lnet/minecraft/state/property/DirectionProperty;
-
ENABLED
- Mappings:
Namespace Name Mixin selector official bLahn;b:Lamk;intermediary field_983Lnet/minecraft/class_233;field_983:Lnet/minecraft/class_388;named ENABLEDLnet/minecraft/block/HopperBlock;ENABLED:Lnet/minecraft/state/property/BooleanProperty;
-
-
Constructor Details
-
HopperBlock
public HopperBlock()
-
-
Method Details
-
setBoundingBox
- Overrides:
setBoundingBoxin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;)Vintermediary method_665Lnet/minecraft/class_160;method_665(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;)Vnamed setBoundingBoxLnet/minecraft/block/Block;setBoundingBox(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)V
-
appendCollisionBoxes
public void appendCollisionBoxes(World world, BlockPos pos, BlockState state, Box box, List<Box> list, Entity entity)- Overrides:
appendCollisionBoxesin classBlock- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Laug;Ljava/util/List;Lpk;)Vintermediary method_649Lnet/minecraft/class_160;method_649(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_646;Ljava/util/List;Lnet/minecraft/class_1745;)Vnamed appendCollisionBoxesLnet/minecraft/block/Block;appendCollisionBoxes(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Box;Ljava/util/List;Lnet/minecraft/entity/Entity;)V
-
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 aLafh;a(Ladm;Lcj;Lcq;FFFILpr;)Lalz;intermediary method_656Lnet/minecraft/class_160;method_656(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;FFFILnet/minecraft/class_1752;)Lnet/minecraft/class_376;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;
-
createBlockEntity
- Mappings:
Namespace Name Mixin selector official aLagq;a(Ladm;I)Lakw;intermediary method_841Lnet/minecraft/class_205;method_841(Lnet/minecraft/class_99;I)Lnet/minecraft/class_348;named createBlockEntityLnet/minecraft/block/BlockEntityProvider;createBlockEntity(Lnet/minecraft/world/World;I)Lnet/minecraft/block/entity/BlockEntity;
-
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 aLafh;a(Ladm;Lcj;Lalz;Lpr;Lzx;)Vintermediary method_652Lnet/minecraft/class_160;method_652(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1752;Lnet/minecraft/class_2056;)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
-
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 cLafh;c(Ladm;Lcj;Lalz;)Vintermediary method_703Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onCreationLnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
onUse
public boolean onUse(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)Runs when the block is used, i.e. right clicked in most cases. It is similar to the same method in Item, but this method is called only when the player uses it when the block is placed, not when the player is holding the BlockItem.- Overrides:
onUsein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateplayer- The player who used the blockdirection- The direction that the block is facing- Returns:
- Whether the action is succesful
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Zintermediary method_654Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Znamed onUseLnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
-
neighborUpdate
Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.- Overrides:
neighborUpdatein classBlock- Parameters:
world- The world that the block is placed inpos- The block's positionstate- The block's BlockStateblock- The adjacent Block that updated the current block- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladm;Lcj;Lalz;Lafh;)Vintermediary method_648Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)Vnamed neighborUpdateLnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
-
updateEnabled
- Mappings:
Namespace Name Mixin selector official eLahn;e(Ladm;Lcj;Lalz;)Vintermediary method_880Lnet/minecraft/class_233;method_880(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed updateEnabledLnet/minecraft/block/HopperBlock;updateEnabled(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)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 bLafh;b(Ladm;Lcj;Lalz;)Vintermediary method_688Lnet/minecraft/class_160;method_688(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)Vnamed onBreakingLnet/minecraft/block/Block;onBreaking(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getBlockType
public int getBlockType()- Overrides:
getBlockTypein classBlockWithEntity- Mappings:
Namespace Name Mixin selector official bLafh;b()Iintermediary method_684Lnet/minecraft/class_160;method_684()Inamed getBlockTypeLnet/minecraft/block/Block;getBlockType()I
-
renderAsNormalBlock
public boolean renderAsNormalBlock()Returns whether the block can be rendered as a normal block- Overrides:
renderAsNormalBlockin classBlock- Returns:
- Whether the block can be rendered as a normal block
- Mappings:
Namespace Name Mixin selector official dLafh;d()Zintermediary method_709Lnet/minecraft/class_160;method_709()Znamed renderAsNormalBlockLnet/minecraft/block/Block;renderAsNormalBlock()Z
-
hasTransperancy
public boolean hasTransperancy()- Overrides:
hasTransperancyin classBlock- Mappings:
Namespace Name Mixin selector official cLafh;c()Zintermediary method_699Lnet/minecraft/class_160;method_699()Znamed hasTransperancyLnet/minecraft/block/Block;hasTransperancy()Z
-
isSideInvisible
@Environment(CLIENT) public boolean isSideInvisible(WorldView view, BlockPos pos, Direction facing)Returns whether the current block has connected sides, i.e its side faces are invisible when covered by other blocks. Used by glass to prevent the white dots from appearing everywhere through adjacent glass blocks.- Overrides:
isSideInvisiblein classBlock- Parameters:
view- WorldView instancepos- The current block's positionfacing- The direction the block is facing- Returns:
- Whether the current block has connected sides
- Mappings:
Namespace Name Mixin selector official aLafh;a(Ladq;Lcj;Lcq;)Zintermediary method_668Lnet/minecraft/class_160;method_668(Lnet/minecraft/class_104;Lnet/minecraft/class_1372;Lnet/minecraft/class_1383;)Znamed isSideInvisibleLnet/minecraft/block/Block;isSideInvisible(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Z
-
method_879
- Mappings:
Namespace Name Mixin selector official bLahn;b(I)Lcq;intermediary method_879Lnet/minecraft/class_233;method_879(I)Lnet/minecraft/class_1383;named method_879Lnet/minecraft/block/HopperBlock;method_879(I)Lnet/minecraft/util/math/Direction;
-
method_881
public static boolean method_881(int int2)- Mappings:
Namespace Name Mixin selector official fLahn;f(I)Zintermediary method_881Lnet/minecraft/class_233;method_881(I)Znamed method_881Lnet/minecraft/block/HopperBlock;method_881(I)Z
-
hasComparatorOutput
public boolean hasComparatorOutput()Returns whether the block provides comparator output. Used in blocks with entities like Chests and Droppers.- Overrides:
hasComparatorOutputin classBlock- Returns:
- Whether the block provides comparator output
- Mappings:
Namespace Name Mixin selector official OLafh;O()Zintermediary method_629Lnet/minecraft/class_160;method_629()Znamed hasComparatorOutputLnet/minecraft/block/Block;hasComparatorOutput()Z
-
getComparatorOutput
Returns the block's comparator output value. Used in blocks with entities like Chests and Droppers.- Overrides:
getComparatorOutputin classBlock- Returns:
- The block's comparator output value
- Mappings:
Namespace Name Mixin selector official lLafh;l(Ladm;Lcj;)Iintermediary method_730Lnet/minecraft/class_160;method_730(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;)Inamed getComparatorOutputLnet/minecraft/block/Block;getComparatorOutput(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)I
-
getRenderLayerType
Returns the appropriate RenderLayer for a block. Only called on the client.- Overrides:
getRenderLayerTypein classBlock- Returns:
- The block's RenderLayer
- Mappings:
Namespace Name Mixin selector official mLafh;m()Ladf;intermediary method_731Lnet/minecraft/class_160;method_731()Lnet/minecraft/class_91;named getRenderLayerTypeLnet/minecraft/block/Block;getRenderLayerType()Lnet/minecraft/client/render/RenderLayer;
-
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 aLafh;a(I)Lalz;intermediary method_637Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;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 cLafh;c(Lalz;)Iintermediary method_706Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)Inamed getDataLnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
-
appendProperties
Returns a new state manager with a property array.- Overrides:
appendPropertiesin classBlock- Returns:
- New state manager
- Mappings:
Namespace Name Mixin selector official eLafh;e()Lama;intermediary method_714Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;named appendPropertiesLnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;
-