Class MultiPartBlock<PART extends MultiPartBlock.IPart>
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
com.petrolpark.core.world.block.multiPart.MultiPartBlock<PART>
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IBlockExtension
- Direct Known Subclasses:
CreateMultiPartBlock
@ParametersAreNonnullByDefault
public abstract class MultiPartBlock<PART extends MultiPartBlock.IPart>
extends net.minecraft.world.level.block.Block
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interfaceNested 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>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<net.minecraft.world.level.block.state.BlockState, MultiPartBlock.Clipper<PART>> protected final Map<net.minecraft.world.level.block.state.BlockState, net.minecraft.world.phys.shapes.VoxelShape> Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, CODEC, 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
ConstructorsConstructorDescriptionMultiPartBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoiddropPartResources(PART part, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.world.entity.Entity entity, net.minecraft.world.item.ItemStack tool) protected net.minecraft.world.phys.shapes.VoxelShapegetBlockSupportShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos) net.minecraft.world.item.ItemStackgetCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) protected net.minecraft.world.phys.shapes.VoxelShapegetCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) protected List<net.minecraft.world.item.ItemStack> getDrops(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.storage.loot.LootParams.Builder params) net.minecraft.world.phys.shapes.VoxelShapegetFullShape(net.minecraft.world.level.block.state.BlockState state) List<net.minecraft.world.item.ItemStack> getPartDrops(PART part, net.minecraft.world.level.block.state.BlockState state, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.entity.BlockEntity blockEntity, net.minecraft.world.entity.Entity entity, net.minecraft.world.item.ItemStack tool) List<net.minecraft.world.item.ItemStack> getPartDrops(PART part, net.minecraft.world.level.storage.loot.LootParams.Builder paramsBuilder) abstract Collection<PART> getParts(net.minecraft.world.level.block.state.BlockState state) protected net.minecraft.world.level.block.RenderShapegetRenderShape(net.minecraft.world.level.block.state.BlockState state) protected net.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) getTargetedPart(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) protected net.minecraft.world.phys.shapes.VoxelShapegetVisualShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) booleanonDestroyedByPlayer(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean willHarvest, net.minecraft.world.level.material.FluidState fluid) abstract net.minecraft.world.level.block.state.BlockStatewithoutPart(net.minecraft.world.level.block.state.BlockState state, PART part) Methods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, codec, createBlockStateDefinition, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, getStateForPlacement, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, 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, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getDestroyProgress, getDirectSignal, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getSeed, getShadeBrightness, getSignal, getSoundType, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods 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.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
shapeCache
protected final Map<net.minecraft.world.level.block.state.BlockState,net.minecraft.world.phys.shapes.VoxelShape> shapeCache -
clipperCache
protected final Map<net.minecraft.world.level.block.state.BlockState,MultiPartBlock.Clipper<PART extends MultiPartBlock.IPart>> clipperCache
-
-
Constructor Details
-
MultiPartBlock
public MultiPartBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties properties)
-
-
Method Details
-
getParts
-
withoutPart
public abstract net.minecraft.world.level.block.state.BlockState withoutPart(net.minecraft.world.level.block.state.BlockState state, PART part) -
getTargetedPart
@Nullable public PART getTargetedPart(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) -
getCloneItemStack
public net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.HitResult target, net.minecraft.world.level.LevelReader level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) -
getShape
protected net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getFullShape
public net.minecraft.world.phys.shapes.VoxelShape getFullShape(net.minecraft.world.level.block.state.BlockState state) -
getCollisionShape
protected net.minecraft.world.phys.shapes.VoxelShape getCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getCollisionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getBlockSupportShape
protected net.minecraft.world.phys.shapes.VoxelShape getBlockSupportShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos) - Overrides:
getBlockSupportShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getVisualShape
protected net.minecraft.world.phys.shapes.VoxelShape getVisualShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getVisualShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getRenderShape
protected net.minecraft.world.level.block.RenderShape getRenderShape(net.minecraft.world.level.block.state.BlockState state) - Overrides:
getRenderShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
onDestroyedByPlayer
public boolean onDestroyedByPlayer(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean willHarvest, net.minecraft.world.level.material.FluidState fluid) -
dropPartResources
public void dropPartResources(PART part, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.level.block.entity.BlockEntity blockEntity, @Nullable net.minecraft.world.entity.Entity entity, net.minecraft.world.item.ItemStack tool) -
getPartDrops
public List<net.minecraft.world.item.ItemStack> getPartDrops(PART part, net.minecraft.world.level.block.state.BlockState state, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.level.block.entity.BlockEntity blockEntity, @Nullable net.minecraft.world.entity.Entity entity, net.minecraft.world.item.ItemStack tool) -
getPartDrops
-
getDrops
protected List<net.minecraft.world.item.ItemStack> getDrops(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.storage.loot.LootParams.Builder params) - Overrides:
getDropsin classnet.minecraft.world.level.block.state.BlockBehaviour
-