Package net.minecraft.block
Class FlowerPotBlock
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Block>
-
- net.minecraft.block.AbstractBlock
-
- net.minecraft.block.Block
-
- net.minecraft.block.FlowerPotBlock
-
- All Implemented Interfaces:
IItemProvider
,IForgeBlock
,IForgeRegistryEntry<Block>
public class FlowerPotBlock extends Block
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
-
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description private Block
content
private java.util.function.Supplier<FlowerPotBlock>
emptyPot
private java.util.function.Supplier<? extends Block>
flowerDelegate
private java.util.Map<ResourceLocation,java.util.function.Supplier<? extends Block>>
fullPots
private static java.util.Map<Block,Block>
POTTED_BY_CONTENT
protected static VoxelShape
SHAPE
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
-
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Constructor Description FlowerPotBlock(java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, AbstractBlock.Properties properties)
For mod use, eliminates the need to extend this class, and prevents modded flower pots from altering vanilla behavior.FlowerPotBlock(Block p_i48395_1_, AbstractBlock.Properties p_i48395_2_)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPlant(ResourceLocation flower, java.util.function.Supplier<? extends Block> fullPot)
ItemStack
getCloneItemStack(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_)
Block
getContent()
FlowerPotBlock
getEmptyPot()
java.util.Map<ResourceLocation,java.util.function.Supplier<? extends Block>>
getFullPotsView()
BlockRenderType
getRenderShape(BlockState p_149645_1_)
VoxelShape
getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
boolean
isPathfindable(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_)
BlockState
updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_)
ActionResultType
use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
-
Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, createBlockStateDefinition, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getStateForPlacement, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
-
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, canSurvive, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isSignalSource, mirror, neighborChanged, onPlace, onProjectileHit, onRemove, randomTick, rotate, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusion
-
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
-
-
-
Field Detail
-
SHAPE
protected static final VoxelShape SHAPE
-
content
private final Block content
-
fullPots
private final java.util.Map<ResourceLocation,java.util.function.Supplier<? extends Block>> fullPots
-
emptyPot
private final java.util.function.Supplier<FlowerPotBlock> emptyPot
-
flowerDelegate
private final java.util.function.Supplier<? extends Block> flowerDelegate
-
-
Constructor Detail
-
FlowerPotBlock
@Deprecated public FlowerPotBlock(Block p_i48395_1_, AbstractBlock.Properties p_i48395_2_)
Deprecated.
-
FlowerPotBlock
public FlowerPotBlock(@Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, AbstractBlock.Properties properties)
For mod use, eliminates the need to extend this class, and prevents modded flower pots from altering vanilla behavior.- Parameters:
emptyPot
- The empty pot for this pot, or null for self.block
- The flower block.properties
-
-
-
Method Detail
-
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
- Overrides:
getShape
in classAbstractBlock
-
getRenderShape
public BlockRenderType getRenderShape(BlockState p_149645_1_)
- Overrides:
getRenderShape
in classAbstractBlock
-
use
public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
- Overrides:
use
in classAbstractBlock
-
getCloneItemStack
public ItemStack getCloneItemStack(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_)
- Overrides:
getCloneItemStack
in classBlock
-
updateShape
public BlockState updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_)
- Overrides:
updateShape
in classAbstractBlock
-
getContent
public Block getContent()
-
isPathfindable
public boolean isPathfindable(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_)
- Overrides:
isPathfindable
in classAbstractBlock
-
getEmptyPot
public FlowerPotBlock getEmptyPot()
-
addPlant
public void addPlant(ResourceLocation flower, java.util.function.Supplier<? extends Block> fullPot)
-
getFullPotsView
public java.util.Map<ResourceLocation,java.util.function.Supplier<? extends Block>> getFullPotsView()
-
-