public class Block extends ForgeRegistryEntry<Block> implements IItemProvider, IForgeBlock
Modifier and Type | Class and Description |
---|---|
static class |
Block.OffsetType |
static class |
Block.Properties |
static class |
Block.RenderSideCacheKey |
Modifier and Type | Field and Description |
---|---|
static ObjectIntIdentityMap<BlockState> |
BLOCK_STATE_IDS
Deprecated.
|
protected float |
blockHardness |
protected float |
blockResistance |
protected boolean |
blocksMovement |
private BlockState |
defaultState |
private static VoxelShape |
field_220083_b |
private static VoxelShape |
field_220084_c |
private int |
harvestLevel |
private ToolType |
harvestTool |
private boolean |
isSolid |
private Item |
item |
private float |
jumpFactor |
protected int |
lightValue |
protected static org.apache.logging.log4j.Logger |
LOGGER |
private ResourceLocation |
lootTable |
private java.util.function.Supplier<ResourceLocation> |
lootTableSupplier |
protected Material |
material |
protected MaterialColor |
materialColor |
private static com.google.common.cache.LoadingCache<VoxelShape,java.lang.Boolean> |
OPAQUE_CACHE |
protected java.util.Random |
RANDOM |
private ReverseTagWrapper<Block> |
reverseTags |
private static java.lang.ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.RenderSideCacheKey>> |
SHOULD_SIDE_RENDER_CACHE |
private float |
slipperiness |
protected SoundType |
soundType |
private float |
speedFactor |
protected StateContainer<Block,BlockState> |
stateContainer |
protected boolean |
ticksRandomly |
private java.lang.String |
translationKey |
private static Direction[] |
UPDATE_ORDER |
private boolean |
variableOpacity |
delegate
Constructor and Description |
---|
Block(Block.Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
addInformation(ItemStack stack,
IBlockReader worldIn,
java.util.List<ITextComponent> tooltip,
ITooltipFlag flagIn) |
boolean |
allowsMovement(BlockState state,
IBlockReader worldIn,
BlockPos pos,
PathType type)
Deprecated.
|
void |
animateTick(BlockState stateIn,
World worldIn,
BlockPos pos,
java.util.Random rand) |
Item |
asItem() |
boolean |
canDropFromExplosion(Explosion explosionIn)
Deprecated.
|
boolean |
canEntitySpawn(BlockState state,
IBlockReader worldIn,
BlockPos pos,
EntityType<?> type)
Deprecated.
|
static boolean |
cannotAttach(Block blockIn) |
boolean |
canProvidePower(BlockState state)
Deprecated.
|
boolean |
canSpawnInBlock() |
boolean |
canSustainPlant(BlockState state,
IBlockReader world,
BlockPos pos,
Direction facing,
IPlantable plantable)
Determines if this block can support the passed in plant, allowing it to be planted and grow.
|
boolean |
causesSuffocation(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
static boolean |
doesSideFillSquare(VoxelShape shape,
Direction side) |
void |
dropXpOnBlockBreak(World worldIn,
BlockPos pos,
int amount) |
boolean |
eventReceived(BlockState state,
World worldIn,
BlockPos pos,
int id,
int param)
Deprecated.
|
void |
fillItemGroup(ItemGroup group,
NonNullList<ItemStack> items) |
protected void |
fillStateContainer(StateContainer.Builder<Block,BlockState> builder) |
void |
fillWithRain(World worldIn,
BlockPos pos) |
float |
getAmbientOcclusionLightValue(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
static Block |
getBlockFromItem(Item itemIn) |
float |
getBlockHardness(BlockState blockState,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
VoxelShape |
getCollisionShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context)
Deprecated.
|
int |
getComparatorInputOverride(BlockState blockState,
World worldIn,
BlockPos pos)
Deprecated.
|
INamedContainerProvider |
getContainer(BlockState state,
World worldIn,
BlockPos pos)
Deprecated.
|
BlockState |
getDefaultState() |
java.util.List<ItemStack> |
getDrops(BlockState state,
LootContext.Builder builder)
Deprecated.
|
static java.util.List<ItemStack> |
getDrops(BlockState state,
ServerWorld worldIn,
BlockPos pos,
TileEntity tileEntityIn) |
static java.util.List<ItemStack> |
getDrops(BlockState state,
ServerWorld worldIn,
BlockPos pos,
TileEntity tileEntityIn,
Entity entityIn,
ItemStack stack) |
float |
getExplosionResistance()
Deprecated.
|
IFluidState |
getFluidState(BlockState state)
Deprecated.
|
int |
getHarvestLevel(BlockState state)
Queries the harvest level of this item stack for the specified tool class,
Returns -1 if this tool is not of the specified type
|
ToolType |
getHarvestTool(BlockState state)
Queries the class of tool required to harvest this block, if null is returned
we assume that anything can harvest this block.
|
ItemStack |
getItem(IBlockReader worldIn,
BlockPos pos,
BlockState state)
Deprecated.
|
float |
getJumpFactor() |
int |
getLightValue(BlockState state)
Deprecated.
|
ResourceLocation |
getLootTable() |
Material |
getMaterial(BlockState state)
Deprecated.
|
MaterialColor |
getMaterialColor(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
ITextComponent |
getNameTextComponent() |
Vec3d |
getOffset(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
Block.OffsetType |
getOffsetType() |
int |
getOpacity(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
float |
getPlayerRelativeBlockHardness(BlockState state,
PlayerEntity player,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
long |
getPositionRandom(BlockState state,
BlockPos pos)
Deprecated.
|
PushReaction |
getPushReaction(BlockState state)
Deprecated.
|
VoxelShape |
getRaytraceShape(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
VoxelShape |
getRenderShape(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
BlockRenderType |
getRenderType(BlockState state)
Deprecated.
|
VoxelShape |
getShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context)
Deprecated.
|
float |
getSlipperiness()
Deprecated.
|
float |
getSlipperiness(BlockState state,
IWorldReader world,
BlockPos pos,
Entity entity)
Gets the slipperiness at the given location at the given state.
|
SoundType |
getSoundType(BlockState state)
Deprecated.
|
float |
getSpeedFactor() |
static BlockState |
getStateById(int id) |
StateContainer<Block,BlockState> |
getStateContainer() |
BlockState |
getStateForPlacement(BlockItemUseContext context) |
static int |
getStateId(BlockState state) |
int |
getStrongPower(BlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
Direction side)
Deprecated.
|
java.util.Set<ResourceLocation> |
getTags()
Retrieves a list of tags names this is known to be associated with.
|
java.lang.String |
getTranslationKey() |
static BlockState |
getValidBlockForPosition(BlockState currentState,
IWorld worldIn,
BlockPos pos) |
int |
getWeakPower(BlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
Direction side)
Deprecated.
|
void |
harvestBlock(World worldIn,
PlayerEntity player,
BlockPos pos,
BlockState state,
TileEntity te,
ItemStack stack) |
boolean |
hasComparatorInputOverride(BlockState state)
Deprecated.
|
static boolean |
hasEnoughSolidSide(IWorldReader worldIn,
BlockPos pos,
Direction directionIn) |
static boolean |
hasSolidSide(BlockState state,
IBlockReader worldIn,
BlockPos pos,
Direction side) |
static boolean |
hasSolidSideOnTop(IBlockReader worldIn,
BlockPos pos) |
boolean |
hasTileEntity()
Deprecated.
|
boolean |
isAir(BlockState state)
Deprecated.
|
boolean |
isEmissiveRendering(BlockState p_225543_1_)
Deprecated.
|
boolean |
isIn(Tag<Block> tagIn) |
boolean |
isNormalCube(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
static boolean |
isOpaque(VoxelShape shape) |
boolean |
isOpaqueCube(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
boolean |
isReplaceable(BlockState state,
BlockItemUseContext useContext)
Deprecated.
|
boolean |
isReplaceable(BlockState p_225541_1_,
Fluid p_225541_2_)
Deprecated.
|
boolean |
isSideInvisible(BlockState state,
BlockState adjacentBlockState,
Direction side)
Deprecated.
|
boolean |
isSolid(BlockState state)
Deprecated.
|
boolean |
isTransparent(BlockState state)
Deprecated.
|
boolean |
isValidPosition(BlockState state,
IWorldReader worldIn,
BlockPos pos)
Deprecated.
|
boolean |
isVariableOpacity() |
boolean |
isViewBlocking(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
static VoxelShape |
makeCuboidShape(double x1,
double y1,
double z1,
double x2,
double y2,
double z2) |
BlockState |
mirror(BlockState state,
Mirror mirrorIn)
Deprecated.
|
boolean |
needsPostProcessing(BlockState state,
IBlockReader worldIn,
BlockPos pos)
Deprecated.
|
void |
neighborChanged(BlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos,
boolean isMoving)
Deprecated.
|
static BlockState |
nudgeEntitiesWithNewState(BlockState oldState,
BlockState newState,
World worldIn,
BlockPos pos) |
ActionResultType |
onBlockActivated(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player,
Hand handIn,
BlockRayTraceResult hit)
Deprecated.
|
void |
onBlockAdded(BlockState state,
World worldIn,
BlockPos pos,
BlockState oldState,
boolean isMoving)
Deprecated.
|
void |
onBlockClicked(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player)
Deprecated.
|
void |
onBlockHarvested(World worldIn,
BlockPos pos,
BlockState state,
PlayerEntity player) |
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
BlockState state,
LivingEntity placer,
ItemStack stack) |
void |
onEntityCollision(BlockState state,
World worldIn,
BlockPos pos,
Entity entityIn)
Deprecated.
|
void |
onEntityWalk(World worldIn,
BlockPos pos,
Entity entityIn) |
void |
onExplosionDestroy(World worldIn,
BlockPos pos,
Explosion explosionIn) |
void |
onFallenUpon(World worldIn,
BlockPos pos,
Entity entityIn,
float fallDistance) |
void |
onLanded(IBlockReader worldIn,
Entity entityIn) |
void |
onPlayerDestroy(IWorld worldIn,
BlockPos pos,
BlockState state) |
void |
onProjectileCollision(World worldIn,
BlockState state,
BlockRayTraceResult hit,
Entity projectile) |
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving)
Deprecated.
|
boolean |
propagatesSkylightDown(BlockState state,
IBlockReader reader,
BlockPos pos) |
void |
randomTick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random random)
Deprecated.
|
static void |
replaceBlock(BlockState oldState,
BlockState newState,
IWorld worldIn,
BlockPos pos,
int flags) |
BlockState |
rotate(BlockState state,
Rotation rot)
Deprecated.
|
protected void |
setDefaultState(BlockState state) |
static boolean |
shouldSideBeRendered(BlockState adjacentState,
IBlockReader blockState,
BlockPos blockAccess,
Direction pos) |
void |
spawnAdditionalDrops(BlockState state,
World worldIn,
BlockPos pos,
ItemStack stack)
Deprecated.
|
static void |
spawnAsEntity(World worldIn,
BlockPos pos,
ItemStack stack) |
static void |
spawnDrops(BlockState state,
World worldIn,
BlockPos pos) |
static void |
spawnDrops(BlockState state,
World worldIn,
BlockPos pos,
TileEntity tileEntityIn) |
static void |
spawnDrops(BlockState state,
World worldIn,
BlockPos pos,
TileEntity tileEntityIn,
Entity entityIn,
ItemStack stack) |
void |
tick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random rand)
Deprecated.
|
int |
tickRate(IWorldReader worldIn) |
boolean |
ticksRandomly(BlockState state) |
java.lang.String |
toString() |
void |
updateDiagonalNeighbors(BlockState state,
IWorld worldIn,
BlockPos pos,
int flags)
Deprecated.
|
void |
updateNeighbors(BlockState stateIn,
IWorld worldIn,
BlockPos pos,
int flags)
Deprecated.
|
BlockState |
updatePostPlacement(BlockState stateIn,
Direction facing,
BlockState facingState,
IWorld worldIn,
BlockPos currentPos,
BlockPos facingPos)
Deprecated.
|
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, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isSlimeBlock, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
protected static final org.apache.logging.log4j.Logger LOGGER
@Deprecated public static final ObjectIntIdentityMap<BlockState> BLOCK_STATE_IDS
private static final Direction[] UPDATE_ORDER
private static final com.google.common.cache.LoadingCache<VoxelShape,java.lang.Boolean> OPAQUE_CACHE
private static final VoxelShape field_220083_b
private static final VoxelShape field_220084_c
protected final int lightValue
protected final float blockHardness
protected final float blockResistance
protected final boolean ticksRandomly
protected final SoundType soundType
protected final Material material
protected final MaterialColor materialColor
private final float slipperiness
private final float speedFactor
private final float jumpFactor
protected final StateContainer<Block,BlockState> stateContainer
private BlockState defaultState
protected final boolean blocksMovement
private final boolean variableOpacity
private final boolean isSolid
@Nullable private ResourceLocation lootTable
@Nullable private java.lang.String translationKey
@Nullable private Item item
private static final java.lang.ThreadLocal<it.unimi.dsi.fastutil.objects.Object2ByteLinkedOpenHashMap<Block.RenderSideCacheKey>> SHOULD_SIDE_RENDER_CACHE
protected java.util.Random RANDOM
private ToolType harvestTool
private int harvestLevel
private final ReverseTagWrapper<Block> reverseTags
private final java.util.function.Supplier<ResourceLocation> lootTableSupplier
public Block(Block.Properties properties)
public static int getStateId(@Nullable BlockState state)
public static BlockState getStateById(int id)
public static BlockState nudgeEntitiesWithNewState(BlockState oldState, BlockState newState, World worldIn, BlockPos pos)
public static VoxelShape makeCuboidShape(double x1, double y1, double z1, double x2, double y2, double z2)
@Deprecated public boolean canEntitySpawn(BlockState state, IBlockReader worldIn, BlockPos pos, EntityType<?> type)
@Deprecated public boolean isAir(BlockState state)
@Deprecated public int getLightValue(BlockState state)
@Deprecated public Material getMaterial(BlockState state)
@Deprecated public MaterialColor getMaterialColor(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public void updateNeighbors(BlockState stateIn, IWorld worldIn, BlockPos pos, int flags)
public static BlockState getValidBlockForPosition(BlockState currentState, IWorld worldIn, BlockPos pos)
public static void replaceBlock(BlockState oldState, BlockState newState, IWorld worldIn, BlockPos pos, int flags)
@Deprecated public void updateDiagonalNeighbors(BlockState state, IWorld worldIn, BlockPos pos, int flags)
@Deprecated public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos)
@Deprecated public BlockState rotate(BlockState state, Rotation rot)
@Deprecated public BlockState mirror(BlockState state, Mirror mirrorIn)
public static boolean cannotAttach(Block blockIn)
@Deprecated public boolean isNormalCube(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean causesSuffocation(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean isViewBlocking(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean allowsMovement(BlockState state, IBlockReader worldIn, BlockPos pos, PathType type)
@Deprecated public BlockRenderType getRenderType(BlockState state)
@Deprecated public boolean isReplaceable(BlockState state, BlockItemUseContext useContext)
@Deprecated public boolean isReplaceable(BlockState p_225541_1_, Fluid p_225541_2_)
@Deprecated public float getBlockHardness(BlockState blockState, IBlockReader worldIn, BlockPos pos)
public boolean ticksRandomly(BlockState state)
@Deprecated public boolean hasTileEntity()
@Deprecated public boolean needsPostProcessing(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean isEmissiveRendering(BlockState p_225543_1_)
public static boolean shouldSideBeRendered(BlockState adjacentState, IBlockReader blockState, BlockPos blockAccess, Direction pos)
@Deprecated public final boolean isSolid(BlockState state)
@Deprecated public boolean isSideInvisible(BlockState state, BlockState adjacentBlockState, Direction side)
@Deprecated public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
@Deprecated public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
@Deprecated public VoxelShape getRenderShape(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public VoxelShape getRaytraceShape(BlockState state, IBlockReader worldIn, BlockPos pos)
public static boolean hasSolidSideOnTop(IBlockReader worldIn, BlockPos pos)
public static boolean hasEnoughSolidSide(IWorldReader worldIn, BlockPos pos, Direction directionIn)
public static boolean hasSolidSide(BlockState state, IBlockReader worldIn, BlockPos pos, Direction side)
public static boolean doesSideFillSquare(VoxelShape shape, Direction side)
public static boolean isOpaque(VoxelShape shape)
@Deprecated public final boolean isOpaqueCube(BlockState state, IBlockReader worldIn, BlockPos pos)
public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos)
@Deprecated public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public boolean isTransparent(BlockState state)
@Deprecated public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random random)
@Deprecated public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random rand)
public void animateTick(BlockState stateIn, World worldIn, BlockPos pos, java.util.Random rand)
public void onPlayerDestroy(IWorld worldIn, BlockPos pos, BlockState state)
@Deprecated public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving)
public int tickRate(IWorldReader worldIn)
@Nullable @Deprecated public INamedContainerProvider getContainer(BlockState state, World worldIn, BlockPos pos)
@Deprecated public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving)
@Deprecated public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
@Deprecated public float getPlayerRelativeBlockHardness(BlockState state, PlayerEntity player, IBlockReader worldIn, BlockPos pos)
@Deprecated public void spawnAdditionalDrops(BlockState state, World worldIn, BlockPos pos, ItemStack stack)
public ResourceLocation getLootTable()
@Deprecated public java.util.List<ItemStack> getDrops(BlockState state, LootContext.Builder builder)
public static java.util.List<ItemStack> getDrops(BlockState state, ServerWorld worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn)
public static java.util.List<ItemStack> getDrops(BlockState state, ServerWorld worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn, @Nullable Entity entityIn, ItemStack stack)
public static void spawnDrops(BlockState state, World worldIn, BlockPos pos)
public static void spawnDrops(BlockState state, World worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn)
public static void spawnDrops(BlockState state, World worldIn, BlockPos pos, @Nullable TileEntity tileEntityIn, Entity entityIn, ItemStack stack)
@Deprecated public float getExplosionResistance()
public void onExplosionDestroy(World worldIn, BlockPos pos, Explosion explosionIn)
@Deprecated public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos)
@Deprecated public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
@Nullable public BlockState getStateForPlacement(BlockItemUseContext context)
@Deprecated public void onBlockClicked(BlockState state, World worldIn, BlockPos pos, PlayerEntity player)
@Deprecated public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
@Deprecated public boolean canProvidePower(BlockState state)
@Deprecated public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn)
@Deprecated public int getStrongPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
public void harvestBlock(World worldIn, PlayerEntity player, BlockPos pos, BlockState state, @Nullable TileEntity te, ItemStack stack)
public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack)
public boolean canSpawnInBlock()
public ITextComponent getNameTextComponent()
public java.lang.String getTranslationKey()
@Deprecated public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param)
@Deprecated public PushReaction getPushReaction(BlockState state)
@Deprecated public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos)
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
public void onLanded(IBlockReader worldIn, Entity entityIn)
@Deprecated public ItemStack getItem(IBlockReader worldIn, BlockPos pos, BlockState state)
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items)
@Deprecated public IFluidState getFluidState(BlockState state)
@Deprecated public float getSlipperiness()
public float getSpeedFactor()
public float getJumpFactor()
@Deprecated public long getPositionRandom(BlockState state, BlockPos pos)
public void onProjectileCollision(World worldIn, BlockState state, BlockRayTraceResult hit, Entity projectile)
public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player)
@Deprecated public boolean canDropFromExplosion(Explosion explosionIn)
@Deprecated public boolean hasComparatorInputOverride(BlockState state)
@Deprecated public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos)
protected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
public StateContainer<Block,BlockState> getStateContainer()
protected final void setDefaultState(BlockState state)
public final BlockState getDefaultState()
public Block.OffsetType getOffsetType()
@Deprecated public Vec3d getOffset(BlockState state, IBlockReader worldIn, BlockPos pos)
@Deprecated public SoundType getSoundType(BlockState state)
public Item asItem()
asItem
in interface IItemProvider
public boolean isVariableOpacity()
public java.lang.String toString()
toString
in class java.lang.Object
public void addInformation(ItemStack stack, @Nullable IBlockReader worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
public float getSlipperiness(BlockState state, IWorldReader world, BlockPos pos, @Nullable Entity entity)
IForgeBlock
Note that entities may reduce slipperiness by a certain factor of their own;
for net.minecraft.entity.EntityLivingBase
, this is .91
.
net.minecraft.entity.item.EntityItem
uses .98
, and
net.minecraft.entity.projectile.EntityFishHook
uses .92
.
getSlipperiness
in interface IForgeBlock
state
- state of the blockworld
- the worldpos
- the position in the worldentity
- the entity in question@Nullable public ToolType getHarvestTool(BlockState state)
IForgeBlock
getHarvestTool
in interface IForgeBlock
public int getHarvestLevel(BlockState state)
IForgeBlock
getHarvestLevel
in interface IForgeBlock
public boolean canSustainPlant(BlockState state, IBlockReader world, BlockPos pos, Direction facing, IPlantable plantable)
IForgeBlock
canSustainPlant
in interface IForgeBlock
state
- The Current stateworld
- The current worldfacing
- The direction relative to the given position the plant wants to be, typically its UPplantable
- The plant that wants to checkpublic final java.util.Set<ResourceLocation> getTags()
IForgeBlock
getTags
in interface IForgeBlock