public class InfestedBlock extends Block
Block.NeighborGroup
AbstractBlock.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, stateManager
collidable, 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)
Called when this block is destroyed by an explosion.
|
void |
onStacksDropped(BlockState state,
ServerWorld world,
BlockPos pos,
ItemStack stack) |
private void |
spawnSilverfish(ServerWorld serverWorld,
BlockPos pos) |
addStacksForDisplay, afterBreak, appendProperties, appendTooltip, asBlock, asItem, 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, isTranslucent, onBreak, onBroken, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStateReplaced, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTick
private 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)
private void spawnSilverfish(ServerWorld serverWorld, BlockPos pos)
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack)
onStacksDropped
in class AbstractBlock
public void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion)
onDestroyedByExplosion
in class Block
public static BlockState fromRegularBlock(Block regularBlock)