public class HopperBlock extends BlockWithEntity
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
private static VoxelShape |
DEFAULT_SHAPE |
private static VoxelShape |
DOWN_RAY_TRACE_SHAPE |
private static VoxelShape |
DOWN_SHAPE |
private static VoxelShape |
EAST_RAY_TRACE_SHAPE |
private static VoxelShape |
EAST_SHAPE |
static BooleanProperty |
ENABLED |
static DirectionProperty |
FACING |
private static VoxelShape |
MIDDLE_SHAPE |
private static VoxelShape |
NORTH_RAY_TRACE_SHAPE |
private static VoxelShape |
NORTH_SHAPE |
private static VoxelShape |
OUTSIDE_SHAPE |
private static VoxelShape |
SOUTH_RAY_TRACE_SHAPE |
private static VoxelShape |
SOUTH_SHAPE |
private static VoxelShape |
TOP_SHAPE |
private static VoxelShape |
WEST_RAY_TRACE_SHAPE |
private static VoxelShape |
WEST_SHAPE |
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
HopperBlock(AbstractBlock.Settings settings) |
createScreenHandlerFactory, onSyncedBlockEvent
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, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onProjectileHit, onStacksDropped, prepare, randomTick, scheduledTick
public static final DirectionProperty FACING
public static final BooleanProperty ENABLED
private static final VoxelShape TOP_SHAPE
private static final VoxelShape MIDDLE_SHAPE
private static final VoxelShape OUTSIDE_SHAPE
private static final VoxelShape DEFAULT_SHAPE
private static final VoxelShape DOWN_SHAPE
private static final VoxelShape EAST_SHAPE
private static final VoxelShape NORTH_SHAPE
private static final VoxelShape SOUTH_SHAPE
private static final VoxelShape WEST_SHAPE
private static final VoxelShape DOWN_RAY_TRACE_SHAPE
private static final VoxelShape EAST_RAY_TRACE_SHAPE
private static final VoxelShape NORTH_RAY_TRACE_SHAPE
private static final VoxelShape SOUTH_RAY_TRACE_SHAPE
private static final VoxelShape WEST_RAY_TRACE_SHAPE
public HopperBlock(AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
public VoxelShape getRaycastShape(BlockState state, BlockView world, BlockPos pos)
getRaycastShape
in class AbstractBlock
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public BlockEntity createBlockEntity(BlockView world)
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack)
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded
in class AbstractBlock
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
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.
onUse
in class AbstractBlock
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate
in class AbstractBlock
private void updateEnabled(World world, BlockPos pos, BlockState state)
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
WorldChunk.setBlockState(BlockPos, BlockState, boolean)
if newState
is different from state
. Vanilla blocks perform removal cleanups here.onStateReplaced
in class AbstractBlock
public BlockRenderType getRenderType(BlockState state)
getRenderType
in class BlockWithEntity
public boolean hasComparatorOutput(BlockState state)
hasComparatorOutput
in class AbstractBlock
public int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput
in class AbstractBlock
public BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate
in class AbstractBlock
public BlockState mirror(BlockState state, BlockMirror mirror)
mirror
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity)
onEntityCollision
in class AbstractBlock
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough
in class AbstractBlock