Package net.minecraft.block
Class HopperBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.HopperBlock
- All Implemented Interfaces:
BlockEntityProvider,ItemConvertible
public class HopperBlock extends BlockWithEntity
-
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.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
Fields Modifier and Type Field Description private static VoxelShapeDEFAULT_SHAPEprivate static VoxelShapeDOWN_RAY_TRACE_SHAPEprivate static VoxelShapeDOWN_SHAPEprivate static VoxelShapeEAST_RAY_TRACE_SHAPEprivate static VoxelShapeEAST_SHAPEstatic BooleanPropertyENABLEDstatic DirectionPropertyFACINGprivate static VoxelShapeMIDDLE_SHAPEprivate static VoxelShapeNORTH_RAY_TRACE_SHAPEprivate static VoxelShapeNORTH_SHAPEprivate static VoxelShapeOUTSIDE_SHAPEprivate static VoxelShapeSOUTH_RAY_TRACE_SHAPEprivate static VoxelShapeSOUTH_SHAPEprivate static VoxelShapeTOP_SHAPEprivate static VoxelShapeWEST_RAY_TRACE_SHAPEprivate static VoxelShapeWEST_SHAPEFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Constructor Description HopperBlock(AbstractBlock.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.block.BlockWithEntity
checkType, createScreenHandlerFactory, onSyncedBlockEventMethods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onProjectileHit, onStacksDropped, prepare, randomTick, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.BlockEntityProvider
getGameEventListener
-
Field Details
-
FACING
-
ENABLED
-
TOP_SHAPE
-
MIDDLE_SHAPE
-
OUTSIDE_SHAPE
-
DEFAULT_SHAPE
-
DOWN_SHAPE
-
EAST_SHAPE
-
NORTH_SHAPE
-
SOUTH_SHAPE
-
WEST_SHAPE
-
DOWN_RAY_TRACE_SHAPE
-
EAST_RAY_TRACE_SHAPE
-
NORTH_RAY_TRACE_SHAPE
-
SOUTH_RAY_TRACE_SHAPE
-
WEST_RAY_TRACE_SHAPE
-
-
Constructor Details
-
HopperBlock
-
-
Method Details
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
getRaycastShape
- Overrides:
getRaycastShapein classAbstractBlock
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
createBlockEntity
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type) -
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) -
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAddedin classAbstractBlock
-
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:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
-
neighborUpdate
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)- Overrides:
neighborUpdatein classAbstractBlock
-
updateEnabled
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplacedin classAbstractBlock
-
getRenderType
- Overrides:
getRenderTypein classBlockWithEntity
-
hasComparatorOutput
- Overrides:
hasComparatorOutputin classAbstractBlock
-
getComparatorOutput
- Overrides:
getComparatorOutputin classAbstractBlock
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
- the rotated block state
-
mirror
- Overrides:
mirrorin classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
onEntityCollision
- Overrides:
onEntityCollisionin classAbstractBlock
-