public class ComparatorBlock extends RedstoneDiodeBlock implements ITileEntityProvider
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey| 修飾子とタイプ | フィールドと説明 |
|---|---|
static EnumProperty<ComparatorMode> |
MODE |
POWERED, SHAPEHORIZONTAL_FACINGBLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomlydelegate| コンストラクタと説明 |
|---|
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, onReplacedmirror, rotateaddInformation, 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, 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, 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, shouldDisplayFluidOverlaypublic static final EnumProperty<ComparatorMode> MODE
public ComparatorBlock(Block.Properties properties)
protected int getDelay(BlockState p_196346_1_)
getDelay クラス内 RedstoneDiodeBlockprotected int getActiveSignal(IBlockReader worldIn, BlockPos pos, BlockState state)
getActiveSignal クラス内 RedstoneDiodeBlockprotected boolean shouldBePowered(World worldIn, BlockPos pos, BlockState state)
shouldBePowered クラス内 RedstoneDiodeBlockprotected int calculateInputStrength(World worldIn, BlockPos pos, BlockState state)
calculateInputStrength クラス内 RedstoneDiodeBlockpublic ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
onBlockActivated クラス内 Blockprotected void updateState(World worldIn, BlockPos pos, BlockState state)
updateState クラス内 RedstoneDiodeBlockpublic void tick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random rand)
tick クラス内 RedstoneDiodeBlockpublic 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 クラス内 Blockpublic TileEntity createNewTileEntity(IBlockReader worldIn)
createNewTileEntity インタフェース内 ITileEntityProviderprotected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
fillStateContainer クラス内 Blockpublic boolean getWeakChanges(BlockState state, IWorldReader world, BlockPos pos)
IForgeBlockgetWeakChanges インタフェース内 IForgeBlockworld - The current worldpos - Block position in worldpublic void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor)
IForgeBlockonNeighborChange インタフェース内 IForgeBlockworld - The worldpos - Block position in worldneighbor - Block position of neighbor