public class ComparatorBlock extends RedstoneDiodeBlock implements ITileEntityProvider
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey
修飾子とタイプ | フィールドと説明 |
---|---|
static EnumProperty<ComparatorMode> |
MODE |
POWERED, SHAPE
HORIZONTAL_FACING
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomly
delegate
コンストラクタと説明 |
---|
ComparatorBlock(Block.Properties properties) |
修飾子とタイプ | メソッドと説明 |
---|---|
protected int |
calculateInputStrength(World worldIn,
BlockPos pos,
BlockState state) |
TileEntity |
createNewTileEntity(IBlockReader worldIn) |
boolean |
eventReceived(BlockState state,
World worldIn,
BlockPos pos,
int id,
int param)
非推奨です。
call via
IBlockState#onBlockEventReceived(World,BlockPos,int,int) whenever possible.
Implementing/overriding is fine. |
protected void |
fillStateContainer(StateContainer.Builder<Block,BlockState> builder) |
protected int |
getActiveSignal(IBlockReader worldIn,
BlockPos pos,
BlockState state) |
protected int |
getDelay(BlockState p_196346_1_) |
boolean |
getWeakChanges(BlockState state,
IWorldReader world,
BlockPos pos)
If this block should be notified of weak changes.
|
ActionResultType |
onBlockActivated(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player,
Hand handIn,
BlockRayTraceResult hit) |
void |
onNeighborChange(BlockState state,
IWorldReader world,
BlockPos pos,
BlockPos neighbor)
Called when a tile entity on a side of this block changes is created or is destroyed.
|
protected boolean |
shouldBePowered(World worldIn,
BlockPos pos,
BlockState state) |
void |
tick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random rand) |
protected void |
updateState(World worldIn,
BlockPos pos,
BlockState state) |
canProvidePower, getPowerOnSide, getPowerOnSides, getShape, getStateForPlacement, getStrongPower, getWeakPower, isAlternateInput, isDiode, isFacingTowardsRepeater, isLocked, isValidPosition, neighborChanged, notifyNeighbors, onBlockAdded, onBlockPlacedBy, onReplaced
mirror, rotate
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canSpawnInBlock, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, fillItemGroup, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getContainer, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getJumpFactor, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRenderShape, getRenderType, getSlipperiness, getSlipperiness, getSoundType, getSpeedFactor, getStateById, getStateContainer, getStateId, getTags, getTranslationKey, getValidBlockForPosition, harvestBlock, hasComparatorInputOverride, hasEnoughSolidSide, hasSolidSide, hasSolidSideOnTop, hasTileEntity, isAir, isEmissiveRendering, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isReplaceable, isSideInvisible, isSolid, isTransparent, isVariableOpacity, isViewBlocking, makeCuboidShape, needsPostProcessing, nudgeEntitiesWithNewState, onBlockClicked, onBlockHarvested, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, tickRate, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacement
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, 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, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isSlimeBlock, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
public static final EnumProperty<ComparatorMode> MODE
public ComparatorBlock(Block.Properties properties)
protected int getDelay(BlockState p_196346_1_)
getDelay
クラス内 RedstoneDiodeBlock
protected int getActiveSignal(IBlockReader worldIn, BlockPos pos, BlockState state)
getActiveSignal
クラス内 RedstoneDiodeBlock
protected boolean shouldBePowered(World worldIn, BlockPos pos, BlockState state)
shouldBePowered
クラス内 RedstoneDiodeBlock
protected int calculateInputStrength(World worldIn, BlockPos pos, BlockState state)
calculateInputStrength
クラス内 RedstoneDiodeBlock
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
onBlockActivated
クラス内 Block
protected void updateState(World worldIn, BlockPos pos, BlockState state)
updateState
クラス内 RedstoneDiodeBlock
public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random rand)
tick
クラス内 RedstoneDiodeBlock
public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param)
IBlockState#onBlockEventReceived(World,BlockPos,int,int)
whenever possible.
Implementing/overriding is fine.eventReceived
クラス内 Block
public TileEntity createNewTileEntity(IBlockReader worldIn)
createNewTileEntity
インタフェース内 ITileEntityProvider
protected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
fillStateContainer
クラス内 Block
public boolean getWeakChanges(BlockState state, IWorldReader world, BlockPos pos)
IForgeBlock
getWeakChanges
インタフェース内 IForgeBlock
world
- The current worldpos
- Block position in worldpublic void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor)
IForgeBlock
onNeighborChange
インタフェース内 IForgeBlock
world
- The worldpos
- Block position in worldneighbor
- Block position of neighbor