Package com.mrbysco.flowerpatch.block
Class MushroomPatchBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BushBlock
net.minecraft.world.level.block.MushroomBlock
com.mrbysco.flowerpatch.block.MushroomPatchBlock
- All Implemented Interfaces:
PatchBlock,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.block.BonemealableBlock,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeBlock,net.minecraftforge.common.IPlantable
public class MushroomPatchBlock
extends net.minecraft.world.level.block.MushroomBlock
implements PatchBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
net.minecraft.world.level.block.Block.BlockStatePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase, net.minecraft.world.level.block.state.BlockBehaviour.OffsetFunction, net.minecraft.world.level.block.state.BlockBehaviour.OffsetType, net.minecraft.world.level.block.state.BlockBehaviour.Properties, net.minecraft.world.level.block.state.BlockBehaviour.StateArgumentPredicate<A extends Object>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final net.minecraft.world.phys.shapes.VoxelShapestatic final intstatic final net.minecraft.world.level.block.state.properties.IntegerPropertyprotected static final net.minecraft.world.phys.shapes.VoxelShapeprotected static final net.minecraft.world.phys.shapes.VoxelShapeprotected static final net.minecraft.world.phys.shapes.VoxelShapeFields inherited from class net.minecraft.world.level.block.MushroomBlock
AABB_OFFSET, SHAPEFields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionMushroomPatchBlock(Supplier<net.minecraft.world.level.block.Block> mushroomSupplier, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBeReplaced(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext placeContext) protected voidcreateBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> blockStateBuilder) net.minecraft.world.item.ItemStackgetCloneItemStack(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) intSupplier<net.minecraft.world.level.block.Block>net.minecraft.world.level.block.state.properties.IntegerPropertynet.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter blockGetter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext) booleanisBonemealSuccess(net.minecraft.world.level.Level level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) booleanisValidBonemealTarget(net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, boolean isClient) voidperformBonemeal(net.minecraft.server.level.ServerLevel level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Methods inherited from class net.minecraft.world.level.block.MushroomBlock
canSurvive, growMushroom, mayPlaceOn, randomTickMethods inherited from class net.minecraft.world.level.block.BushBlock
getPlant, isPathfindable, propagatesSkylightDown, updateShapeMethods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, mirror, neighborChanged, onPlace, onProjectileHit, onRemove, requiredFeatures, rotate, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, use, useShapeForLightOcclusionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHidingMethods inherited from interface net.minecraftforge.common.IPlantable
getPlantType
-
Field Details
-
MAX_MUSHROOMS
public static final int MAX_MUSHROOMS- See Also:
-
MUSHROOMS
public static final net.minecraft.world.level.block.state.properties.IntegerProperty MUSHROOMS -
ONE_AABB
protected static final net.minecraft.world.phys.shapes.VoxelShape ONE_AABB -
TWO_AABB
protected static final net.minecraft.world.phys.shapes.VoxelShape TWO_AABB -
THREE_AABB
protected static final net.minecraft.world.phys.shapes.VoxelShape THREE_AABB -
FOUR_AABB
protected static final net.minecraft.world.phys.shapes.VoxelShape FOUR_AABB
-
-
Constructor Details
-
MushroomPatchBlock
public MushroomPatchBlock(Supplier<net.minecraft.world.level.block.Block> mushroomSupplier, net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
-
-
Method Details
-
canBeReplaced
public boolean canBeReplaced(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.item.context.BlockPlaceContext placeContext) - Overrides:
canBeReplacedin classnet.minecraft.world.level.block.state.BlockBehaviour
-
getPatchDelegate
- Specified by:
getPatchDelegatein interfacePatchBlock
-
getProperty
public net.minecraft.world.level.block.state.properties.IntegerProperty getProperty()- Specified by:
getPropertyin interfacePatchBlock
-
getMaxAmount
public int getMaxAmount()- Specified by:
getMaxAmountin interfacePatchBlock
-
getShape
public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter blockGetter, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext collisionContext) - Overrides:
getShapein classnet.minecraft.world.level.block.MushroomBlock
-
createBlockStateDefinition
protected void createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> blockStateBuilder) - Overrides:
createBlockStateDefinitionin classnet.minecraft.world.level.block.Block
-
getCloneItemStack
public net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Overrides:
getCloneItemStackin classnet.minecraft.world.level.block.Block
-
isValidBonemealTarget
public boolean isValidBonemealTarget(net.minecraft.world.level.LevelReader levelReader, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, boolean isClient) - Specified by:
isValidBonemealTargetin interfacenet.minecraft.world.level.block.BonemealableBlock- Overrides:
isValidBonemealTargetin classnet.minecraft.world.level.block.MushroomBlock
-
isBonemealSuccess
public boolean isBonemealSuccess(net.minecraft.world.level.Level level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Specified by:
isBonemealSuccessin interfacenet.minecraft.world.level.block.BonemealableBlock- Overrides:
isBonemealSuccessin classnet.minecraft.world.level.block.MushroomBlock
-
performBonemeal
public void performBonemeal(net.minecraft.server.level.ServerLevel level, net.minecraft.util.RandomSource randomSource, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Specified by:
performBonemealin interfacenet.minecraft.world.level.block.BonemealableBlock- Overrides:
performBonemealin classnet.minecraft.world.level.block.MushroomBlock
-