public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITileEntityProvider
Block.EnumOffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
static EnumProperty<ComparatorMode> |
MODE |
POWERED, SHAPE
HORIZONTAL_FACING
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockResistance, blocksMovement, capturedDrops, captureDrops, harvesters, lightValue, LOGGER, material, needsRandomTick, RANDOM, soundType, stateContainer
delegate
Constructor and Description |
---|
BlockRedstoneComparator(Block.Properties builder) |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateInputStrength(World worldIn,
BlockPos pos,
IBlockState state) |
TileEntity |
createNewTileEntity(IBlockReader worldIn) |
boolean |
eventReceived(IBlockState state,
World worldIn,
BlockPos pos,
int id,
int param) |
protected void |
fillStateContainer(StateContainer.Builder<Block,IBlockState> builder) |
protected void |
func_211326_a(World p_211326_1_,
BlockPos p_211326_2_) |
protected int |
getActiveSignal(IBlockReader worldIn,
BlockPos pos,
IBlockState state) |
protected int |
getDelay(IBlockState p_196346_1_) |
boolean |
getWeakChanges(IBlockState state,
IWorldReader world,
BlockPos pos)
If this block should be notified of weak changes.
|
boolean |
onBlockActivated(IBlockState state,
World worldIn,
BlockPos pos,
EntityPlayer player,
EnumHand hand,
EnumFacing side,
float hitX,
float hitY,
float hitZ) |
void |
onNeighborChange(IBlockState 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,
IBlockState state) |
void |
tick(IBlockState state,
World worldIn,
BlockPos pos,
java.util.Random random) |
protected void |
updateState(World worldIn,
BlockPos pos,
IBlockState state) |
canProvidePower, getBlockFaceShape, getPowerOnSide, getPowerOnSides, getRenderLayer, getShape, getStateForPlacement, getStrongPower, getWeakPower, isAlternateInput, isDiode, isFacingTowardsRepeater, isFullCube, isLocked, isSolid, isValidPosition, neighborChanged, notifyNeighbors, onBlockAdded, onBlockPlacedBy, onReplaced
mirror, rotate
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, doesSideFillSquare, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillItemGroup, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getDefaultState, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getItemDropped, getItemsToDropCount, getLightValue, getMapColor, getMaterial, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRenderShape, getRenderType, getSilkTouchDrop, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateId, getTickRandomly, getTranslationKey, getValidBlockForPosition, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, isAir, isBlockNormalCube, isCollidable, isCollidable, isDirt, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isRock, isSideInvisible, isTopSolid, isVariableOpacity, makeCuboidShape, needsPostProcessing, nudgeEntitiesWithNewState, onBlockClicked, onBlockHarvested, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, propagatesSkylightDown, quantityDropped, randomTick, registerBlocks, replaceBlock, setDefaultState, shouldSideBeRendered, spawnAsEntity, tickRate, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacement, useNeighborBrightness
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canConnectRedstone, canCreatureSpawn, canEntityDestroy, canHarvestBlock, canPlaceTorchOnTop, canRenderInLayer, createTileEntity, doesSideBlockChestOpening, doesSideBlockRendering, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getDrops, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isNormalCube, isReplaceableOreGen, isStickyBlock, isToolEffective, isTopSolid, observedNeighborChange, onBlockExploded, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower
public static final EnumProperty<ComparatorMode> MODE
public BlockRedstoneComparator(Block.Properties builder)
protected int getDelay(IBlockState p_196346_1_)
getDelay
in class BlockRedstoneDiode
protected int getActiveSignal(IBlockReader worldIn, BlockPos pos, IBlockState state)
getActiveSignal
in class BlockRedstoneDiode
protected boolean shouldBePowered(World worldIn, BlockPos pos, IBlockState state)
shouldBePowered
in class BlockRedstoneDiode
protected void func_211326_a(World p_211326_1_, BlockPos p_211326_2_)
func_211326_a
in class BlockRedstoneDiode
protected int calculateInputStrength(World worldIn, BlockPos pos, IBlockState state)
calculateInputStrength
in class BlockRedstoneDiode
public boolean onBlockActivated(IBlockState state, World worldIn, BlockPos pos, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ)
onBlockActivated
in class Block
protected void updateState(World worldIn, BlockPos pos, IBlockState state)
updateState
in class BlockRedstoneDiode
public void tick(IBlockState state, World worldIn, BlockPos pos, java.util.Random random)
tick
in class BlockRedstoneDiode
public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param)
eventReceived
in class Block
public TileEntity createNewTileEntity(IBlockReader worldIn)
createNewTileEntity
in interface ITileEntityProvider
protected void fillStateContainer(StateContainer.Builder<Block,IBlockState> builder)
fillStateContainer
in class Block
public boolean getWeakChanges(IBlockState state, IWorldReader world, BlockPos pos)
IForgeBlock
getWeakChanges
in interface IForgeBlock
world
- The current worldpos
- Block position in worldpublic void onNeighborChange(IBlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor)
IForgeBlock
onNeighborChange
in interface IForgeBlock
world
- The worldpos
- Block position in worldneighbor
- Block position of neighbor