public class BarrelBlock extends BlockWithEntity
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static DirectionProperty |
FACING |
static BooleanProperty |
OPEN |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
BarrelBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StateManager.Builder<Block,BlockState> builder) |
BlockEntity |
createBlockEntity(BlockView world) |
int |
getComparatorOutput(BlockState state,
World world,
BlockPos pos) |
BlockState |
getPlacementState(ItemPlacementContext ctx) |
BlockRenderType |
getRenderType(BlockState state) |
boolean |
hasComparatorOutput(BlockState state) |
BlockState |
mirror(BlockState state,
BlockMirror mirror) |
void |
onBlockRemoved(BlockState state,
World world,
BlockPos pos,
BlockState newState,
boolean notify) |
void |
onPlaced(World world,
BlockPos pos,
BlockState state,
LivingEntity placer,
ItemStack itemStack) |
ActionResult |
onUse(BlockState state,
World world,
BlockPos pos,
PlayerEntity player,
Hand hand,
BlockHitResult hit) |
BlockState |
rotate(BlockState state,
BlockRotation rotation) |
void |
scheduledTick(BlockState state,
ServerWorld world,
BlockPos pos,
Random random) |
createScreenHandlerFactory, onBlockActionaddStacksForDisplay, afterBreak, asBlock, asItem, buildTooltip, 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, isIn, isShapeFullCube, isSideSolidFullSquare, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRayTraceShape, getRenderingSeed, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasSidedTransparency, isSideInvisible, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTickpublic static final DirectionProperty FACING
public static final BooleanProperty OPEN
public BarrelBlock(AbstractBlock.Settings settings)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
onUse in class AbstractBlockpublic void onBlockRemoved(BlockState state, World world, BlockPos pos, BlockState newState, boolean notify)
onBlockRemoved in class AbstractBlockpublic void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick in class AbstractBlock@Nullable public BlockEntity createBlockEntity(BlockView world)
public BlockRenderType getRenderType(BlockState state)
getRenderType in class BlockWithEntitypublic void onPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack)
public boolean hasComparatorOutput(BlockState state)
hasComparatorOutput in class AbstractBlockpublic int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput in class AbstractBlockpublic BlockState rotate(BlockState state, BlockRotation rotation)
rotate in class AbstractBlockpublic BlockState mirror(BlockState state, BlockMirror mirror)
mirror in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Block