public class DispenserBlock extends ContainerBlock
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey| 修飾子とタイプ | フィールドと説明 |
|---|---|
static DirectionProperty |
FACING |
static BooleanProperty |
TRIGGERED |
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomlydelegate| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
DispenserBlock(Block.Properties builder) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
TileEntity |
createNewTileEntity(IBlockReader worldIn) |
protected void |
dispense(World worldIn,
BlockPos pos) |
protected void |
fillStateContainer(StateContainer.Builder<Block,BlockState> builder) |
protected IDispenseItemBehavior |
getBehavior(ItemStack stack) |
int |
getComparatorInputOverride(BlockState blockState,
World worldIn,
BlockPos pos)
非推奨です。
call via
IBlockState#getComparatorInputOverride(World,BlockPos) whenever possible.
Implementing/overriding is fine. |
static IPosition |
getDispensePosition(IBlockSource coords)
Get the position where the dispenser at the given Coordinates should dispense to.
|
BlockRenderType |
getRenderType(BlockState state)
非推奨です。
call via
IBlockState#getRenderType() whenever possible. Implementing/overriding is fine. |
BlockState |
getStateForPlacement(BlockItemUseContext context) |
boolean |
hasComparatorInputOverride(BlockState state)
非推奨です。
call via
IBlockState#hasComparatorInputOverride() whenever possible. Implementing/overriding
is fine. |
BlockState |
mirror(BlockState state,
Mirror mirrorIn)
非推奨です。
call via
IBlockState#withMirror(Mirror) whenever possible. Implementing/overriding is fine. |
void |
neighborChanged(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos,
boolean isMoving) |
ActionResultType |
onBlockActivated(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player,
Hand handIn,
BlockRayTraceResult hit) |
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
BlockState state,
LivingEntity placer,
ItemStack stack)
Called by ItemBlocks after a block is set in the world, to allow post-place logic
|
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving) |
static void |
registerDispenseBehavior(IItemProvider itemIn,
IDispenseItemBehavior behavior) |
BlockState |
rotate(BlockState state,
Rotation rot)
非推奨です。
call via
IBlockState#withRotation(Rotation) whenever possible. Implementing/overriding is
fine. |
void |
tick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random rand) |
int |
tickRate(IWorldReader worldIn)
How many world ticks before ticking
|
eventReceived, getContaineraddInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canProvidePower, canSpawnInBlock, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, fillItemGroup, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getJumpFactor, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRenderShape, getShape, getSlipperiness, getSlipperiness, getSoundType, getSpeedFactor, getStateById, getStateContainer, getStateId, getStrongPower, getTags, getTranslationKey, getValidBlockForPosition, getWeakPower, harvestBlock, hasEnoughSolidSide, hasSolidSide, hasSolidSideOnTop, hasTileEntity, isAir, isEmissiveRendering, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isReplaceable, isSideInvisible, isSolid, isTransparent, isValidPosition, isVariableOpacity, isViewBlocking, makeCuboidShape, needsPostProcessing, nudgeEntitiesWithNewState, onBlockAdded, onBlockClicked, onBlockHarvested, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacementgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isSlimeBlock, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlaypublic static final DirectionProperty FACING
public static final BooleanProperty TRIGGERED
protected DispenserBlock(Block.Properties builder)
public static void registerDispenseBehavior(IItemProvider itemIn, IDispenseItemBehavior behavior)
public int tickRate(IWorldReader worldIn)
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
onBlockActivated クラス内 Blockprotected IDispenseItemBehavior getBehavior(ItemStack stack)
public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving)
neighborChanged クラス内 Blockpublic void tick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random rand)
public TileEntity createNewTileEntity(IBlockReader worldIn)
public BlockState getStateForPlacement(BlockItemUseContext context)
getStateForPlacement クラス内 Blockpublic void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack)
onBlockPlacedBy クラス内 Blockpublic void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
onReplaced クラス内 Blockpublic static IPosition getDispensePosition(IBlockSource coords)
public boolean hasComparatorInputOverride(BlockState state)
IBlockState#hasComparatorInputOverride() whenever possible. Implementing/overriding
is fine.hasComparatorInputOverride クラス内 Blockpublic int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos)
IBlockState#getComparatorInputOverride(World,BlockPos) whenever possible.
Implementing/overriding is fine.getComparatorInputOverride クラス内 Blockpublic BlockRenderType getRenderType(BlockState state)
IBlockState#getRenderType() whenever possible. Implementing/overriding is fine.getRenderType クラス内 ContainerBlockpublic BlockState rotate(BlockState state, Rotation rot)
IBlockState#withRotation(Rotation) whenever possible. Implementing/overriding is
fine.public BlockState mirror(BlockState state, Mirror mirrorIn)
IBlockState#withMirror(Mirror) whenever possible. Implementing/overriding is fine.protected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
fillStateContainer クラス内 Block