public abstract class BlockRedstoneDiode extends BlockHorizontal
Block.EnumOffsetType
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
protected boolean |
isRepeaterPowered
Tells whether the repeater is powered or not
|
protected static AxisAlignedBB |
REDSTONE_DIODE_AABB |
FACING
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, hasTileEntity, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightness
delegate
Modifier | Constructor and Description |
---|---|
protected |
BlockRedstoneDiode(boolean powered) |
Modifier and Type | Method and Description |
---|---|
protected int |
calculateInputStrength(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canBlockStay(World worldIn,
BlockPos pos) |
boolean |
canPlaceBlockAt(World worldIn,
BlockPos pos)
Checks if this block can be placed exactly at the given position.
|
boolean |
canProvidePower(IBlockState state)
Can this block provide power.
|
protected int |
getActiveSignal(IBlockAccess worldIn,
BlockPos pos,
IBlockState state) |
BlockFaceShape |
getBlockFaceShape(IBlockAccess worldIn,
IBlockState state,
BlockPos pos,
EnumFacing face)
Get the geometry of the queried face at the given position and state.
|
BlockRenderLayer |
getBlockLayer() |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
protected abstract int |
getDelay(IBlockState state) |
protected abstract IBlockState |
getPoweredState(IBlockState unpoweredState) |
protected int |
getPowerOnSide(IBlockAccess worldIn,
BlockPos pos,
EnumFacing side) |
protected int |
getPowerOnSides(IBlockAccess worldIn,
BlockPos pos,
IBlockState state) |
IBlockState |
getStateForPlacement(World worldIn,
BlockPos pos,
EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
EntityLivingBase placer)
Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
IBlockstate
|
int |
getStrongPower(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
protected int |
getTickDelay(IBlockState state) |
protected abstract IBlockState |
getUnpoweredState(IBlockState poweredState) |
int |
getWeakPower(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
protected boolean |
isAlternateInput(IBlockState state) |
boolean |
isAssociatedBlock(Block other) |
static boolean |
isDiode(IBlockState state) |
boolean |
isFacingTowardsRepeater(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
isFullCube(IBlockState state) |
boolean |
isLocked(IBlockAccess worldIn,
BlockPos pos,
IBlockState state) |
boolean |
isOpaqueCube(IBlockState state)
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
protected boolean |
isPowered(IBlockState state) |
boolean |
isSameDiode(IBlockState state) |
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos)
Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
change.
|
protected void |
notifyNeighbors(World worldIn,
BlockPos pos,
IBlockState state) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state)
Called after the block is set in the Chunk data, but before the Tile Entity is set
|
void |
onBlockDestroyedByPlayer(World worldIn,
BlockPos pos,
IBlockState state)
Called after a player destroys this Block - the posiiton pos may no longer hold the state indicated.
|
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
IBlockState state,
EntityLivingBase placer,
ItemStack stack)
Called by ItemBlocks after a block is set in the world, to allow post-place logic
|
void |
randomTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random random)
Called randomly when setTickRandomly is set to true (used by e.g.
|
boolean |
rotateBlock(World world,
BlockPos pos,
EnumFacing axis)
Rotate the block.
|
protected boolean |
shouldBePowered(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
shouldSideBeRendered(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
protected void |
updateState(World worldIn,
BlockPos pos,
IBlockState state) |
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, addRunningEffects, beginLeavesDecay, breakBlock, canBeConnectedTo, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canEntitySpawn, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canRenderInLayer, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, createBlockState, createTileEntity, damageDropped, disableStats, doesSideBlockChestOpening, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLiquidHeight, getBlockState, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getMobilityFlag, getOffset, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSlipperiness, getSoundType, getSoundType, getStateAtViewpoint, getStateById, getStateForPlacement, getStateFromMeta, getStateId, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideLiquid, isAABBInsideMaterial, isAir, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isStickyBlock, isToolEffective, isTopSolid, isTranslucent, isWood, modifyAcceleration, observedNeighborChange, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockExploded, onBlockHarvested, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultSlipperiness, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, tickRate, toString, withMirror, withRotation
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
protected static final AxisAlignedBB REDSTONE_DIODE_AABB
protected final boolean isRepeaterPowered
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox
in class Block
public boolean isFullCube(IBlockState state)
isFullCube
in class Block
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt
in class Block
public void randomTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random random)
randomTick
in class Block
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick
in class Block
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
shouldSideBeRendered
in class Block
protected boolean isPowered(IBlockState state)
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
getStrongPower
in class Block
public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
getWeakPower
in class Block
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
neighborChanged
in class Block
protected void updateState(World worldIn, BlockPos pos, IBlockState state)
public boolean isLocked(IBlockAccess worldIn, BlockPos pos, IBlockState state)
protected boolean shouldBePowered(World worldIn, BlockPos pos, IBlockState state)
protected int calculateInputStrength(World worldIn, BlockPos pos, IBlockState state)
protected int getPowerOnSides(IBlockAccess worldIn, BlockPos pos, IBlockState state)
protected int getPowerOnSide(IBlockAccess worldIn, BlockPos pos, EnumFacing side)
public boolean canProvidePower(IBlockState state)
canProvidePower
in class Block
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
getStateForPlacement
in class Block
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
onBlockPlacedBy
in class Block
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded
in class Block
protected void notifyNeighbors(World worldIn, BlockPos pos, IBlockState state)
public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state)
onBlockDestroyedByPlayer
in class Block
public boolean isOpaqueCube(IBlockState state)
isOpaqueCube
in class Block
protected boolean isAlternateInput(IBlockState state)
protected int getActiveSignal(IBlockAccess worldIn, BlockPos pos, IBlockState state)
public static boolean isDiode(IBlockState state)
public boolean isSameDiode(IBlockState state)
public boolean isFacingTowardsRepeater(World worldIn, BlockPos pos, IBlockState state)
protected int getTickDelay(IBlockState state)
protected abstract int getDelay(IBlockState state)
protected abstract IBlockState getPoweredState(IBlockState unpoweredState)
protected abstract IBlockState getUnpoweredState(IBlockState poweredState)
public boolean isAssociatedBlock(Block other)
isAssociatedBlock
in class Block
public BlockRenderLayer getBlockLayer()
getBlockLayer
in class Block
public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
Block
rotateBlock
in class Block
world
- The worldpos
- Block position in worldaxis
- The axis to rotate aroundpublic BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face)
Common values are SOLID
, which is the default, and UNDEFINED
, which represents something that
does not fit the other descriptions and will generally cause other things not to connect to the face.
getBlockFaceShape
in class Block