public class BlockObserver extends BlockDirectional
Block.EnumOffsetType
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
Modifier and Type | Field and Description |
---|---|
static PropertyBool |
POWERED |
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
Constructor and Description |
---|
BlockObserver() |
Modifier and Type | Method and Description |
---|---|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
canProvidePower(IBlockState state) |
protected BlockStateContainer |
createBlockState() |
int |
getMetaFromState(IBlockState state) |
IBlockState |
getStateForPlacement(World worldIn,
BlockPos pos,
EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
EntityLivingBase placer) |
IBlockState |
getStateFromMeta(int meta) |
int |
getStrongPower(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
int |
getWeakPower(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos) |
void |
observedNeighborChange(IBlockState observerState,
World world,
BlockPos observerPos,
Block changedBlock,
BlockPos changedBlockPos)
Called on an Observer block whenever an update for an Observer is received.
|
void |
observedNeighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state) |
private void |
startSignal(IBlockState p_190960_1_,
World p_190960_2_,
BlockPos pos) |
protected void |
updateNeighborsInFront(World worldIn,
BlockPos pos,
IBlockState state) |
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
IBlockState |
withMirror(IBlockState state,
Mirror mirrorIn) |
IBlockState |
withRotation(IBlockState state,
Rotation rot) |
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, addRunningEffects, beginLeavesDecay, canBeConnectedTo, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canEntitySpawn, canHarvestBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceTorchOnTop, canRenderInLayer, canSilkHarvest, canSilkHarvest, canSpawnInBlock, canSustainLeaves, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, createTileEntity, damageDropped, disableStats, doesSideBlockChestOpening, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFaceShape, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLayer, getBlockLiquidHeight, getBlockState, getBoundingBox, 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, getMobilityFlag, getOffset, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSlipperiness, getSoundType, getSoundType, getStateAtViewpoint, getStateById, getStateForPlacement, getStateId, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideLiquid, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isExceptBlockForAttachWithPiston, isExceptionBlockForAttaching, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isFullCube, isLadder, isLeaves, isNormalCube, isNormalCube, isOpaqueCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isStickyBlock, isToolEffective, isTopSolid, isTranslucent, isWood, modifyAcceleration, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultSlipperiness, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, tickRate, toString
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
public static final PropertyBool POWERED
protected BlockStateContainer createBlockState()
createBlockState
in class Block
public IBlockState withRotation(IBlockState state, Rotation rot)
withRotation
in class Block
public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
withMirror
in class Block
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick
in class Block
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
neighborChanged
in class Block
public void observedNeighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
private void startSignal(IBlockState p_190960_1_, World p_190960_2_, BlockPos pos)
protected void updateNeighborsInFront(World worldIn, BlockPos pos, IBlockState state)
public boolean canProvidePower(IBlockState state)
canProvidePower
in class Block
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 onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded
in class Block
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock
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 int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public void observedNeighborChange(IBlockState observerState, World world, BlockPos observerPos, Block changedBlock, BlockPos changedBlockPos)
Block
observedNeighborChange
in class Block
observerState
- The Observer block's state.world
- The current world.observerPos
- The Observer block's position.changedBlock
- The updated block.changedBlockPos
- The updated block's position.