public class InfestedBlock extends Block
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
private static Map<Block,Block> |
REGULAR_TO_INFESTED |
private Block |
regularBlock |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
InfestedBlock(Block regularBlock,
AbstractBlock.Settings settings)
Creates an infested block
|
| Modifier and Type | Method and Description |
|---|---|
static BlockState |
fromRegularBlock(Block regularBlock) |
Block |
getRegularBlock() |
static boolean |
isInfestable(BlockState block) |
void |
onDestroyedByExplosion(World world,
BlockPos pos,
Explosion explosion) |
void |
onStacksDropped(BlockState state,
World world,
BlockPos pos,
ItemStack stack) |
private void |
spawnSilverfish(World world,
BlockPos pos) |
addStacksForDisplay, afterBreak, appendProperties, asBlock, asItem, buildTooltip, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isSideSolidFullSquare, isTranslucent, onBreak, onBroken, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, replaced, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRayTraceShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStateReplaced, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTickprivate final Block regularBlock
public InfestedBlock(Block regularBlock, AbstractBlock.Settings settings)
regularBlock - the block this infested block should mimicsettings - block settingspublic Block getRegularBlock()
public static boolean isInfestable(BlockState block)
public void onStacksDropped(BlockState state, World world, BlockPos pos, ItemStack stack)
onStacksDropped in class AbstractBlockpublic void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion)
onDestroyedByExplosion in class Blockpublic static BlockState fromRegularBlock(Block regularBlock)