Package codechicken.multipart.block
Class BlockMultipart
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
codechicken.multipart.block.BlockMultipart
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.block.EntityBlock,net.minecraft.world.level.ItemLike,net.neoforged.neoforge.common.extensions.IBlockExtension
public class BlockMultipart
extends net.minecraft.world.level.block.Block
implements net.minecraft.world.level.block.EntityBlock
Created by covers1624 on 1/1/21.
-
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>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate -
Field Summary
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddLandingEffects(net.minecraft.world.level.block.state.BlockState state1, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state2, net.minecraft.world.entity.LivingEntity entity, int numberOfParticles) booleanaddRunningEffects(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) voidanimateTick(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.util.RandomSource rand) voidattack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) booleancanConnectRedstone(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.core.Direction side) static voiddropAndDestroy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) voidentityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) net.minecraft.world.phys.shapes.VoxelShapegetBlockSupportShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, 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) net.minecraft.world.phys.shapes.VoxelShapegetCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) floatgetDestroyProgress(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) intgetDirectSignal(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) List<net.minecraft.world.item.ItemStack> getDrops(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.storage.loot.LootParams.Builder builder) floatgetExplosionResistance(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.Explosion explosion) net.minecraft.world.phys.shapes.VoxelShapegetInteractionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) intgetLightEmission(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) net.minecraft.world.phys.shapes.VoxelShapegetOcclusionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) static @Nullable MultiPartgetPart(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, int slot) net.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) intgetSignal(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) <T extends net.minecraft.world.level.block.entity.BlockEntity>
@Nullable net.minecraft.world.level.block.entity.BlockEntityTicker<T> getTicker(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntityType<T> type) static @Nullable TileMultipartgetTile(net.minecraft.world.level.block.entity.BlockEntity tile) static @Nullable TileMultipartgetTile(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) net.minecraft.world.phys.shapes.VoxelShapegetVisualShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) booleangetWeakChanges(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos) booleanhasDynamicLightEmission(net.minecraft.world.level.block.state.BlockState state) voidinitializeClient(Consumer<net.neoforged.neoforge.client.extensions.common.IClientBlockExtensions> consumer) booleanisRandomlyTicking(net.minecraft.world.level.block.state.BlockState state) booleanisSignalSource(net.minecraft.world.level.block.state.BlockState state) voidneighborChanged(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Block block, net.minecraft.core.BlockPos fromPos, boolean isMoving) @Nullable net.minecraft.world.level.block.entity.BlockEntitynewBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) 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) voidonNeighborChange(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos neighbor) static @Nullable PartRayTraceResultretracePart(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) voidstepOn(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.Entity entity) net.minecraft.world.ItemInteractionResultuseItemOn(net.minecraft.world.item.ItemStack stack, 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, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit_) protected net.minecraft.world.InteractionResultuseWithoutItem(net.minecraft.world.level.block.state.BlockState stack, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hit_) Methods inherited from class net.minecraft.world.level.block.Block
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, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, getAnalogOutputSignal, getFluidState, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getRenderShape, getSeed, getShadeBrightness, getSoundType, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, mirror, onExplosionHit, onPlace, onProjectileHit, onRemove, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, updateShape, useShapeForLightOcclusionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListenerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
canBeHydrated, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getEnchantPowerBonus, getExpDrop, getFireSpreadSpeed, getFlammability, getFriction, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPushReaction, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
-
Constructor Details
-
BlockMultipart
public BlockMultipart()
-
-
Method Details
-
initializeClient
public void initializeClient(Consumer<net.neoforged.neoforge.client.extensions.common.IClientBlockExtensions> consumer) - Overrides:
initializeClientin classnet.minecraft.world.level.block.Block
-
newBlockEntity
@Nullable public @Nullable net.minecraft.world.level.block.entity.BlockEntity newBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Specified by:
newBlockEntityin interfacenet.minecraft.world.level.block.EntityBlock
-
getTicker
@Nullable public <T extends net.minecraft.world.level.block.entity.BlockEntity> @Nullable net.minecraft.world.level.block.entity.BlockEntityTicker<T> getTicker(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntityType<T> type) - Specified by:
getTickerin interfacenet.minecraft.world.level.block.EntityBlock
-
isRandomlyTicking
public boolean isRandomlyTicking(net.minecraft.world.level.block.state.BlockState state) - Overrides:
isRandomlyTickingin classnet.minecraft.world.level.block.state.BlockBehaviour
-
getShape
public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getCollisionShape
public net.minecraft.world.phys.shapes.VoxelShape getCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getCollisionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getOcclusionShape
public net.minecraft.world.phys.shapes.VoxelShape getOcclusionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) - Overrides:
getOcclusionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getInteractionShape
public net.minecraft.world.phys.shapes.VoxelShape getInteractionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) - Overrides:
getInteractionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getBlockSupportShape
public net.minecraft.world.phys.shapes.VoxelShape getBlockSupportShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) - Overrides:
getBlockSupportShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getVisualShape
public net.minecraft.world.phys.shapes.VoxelShape getVisualShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext context) - Overrides:
getVisualShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getExplosionResistance
public float getExplosionResistance(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.Explosion explosion) - Specified by:
getExplosionResistancein interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
hasDynamicLightEmission
public boolean hasDynamicLightEmission(net.minecraft.world.level.block.state.BlockState state) - Specified by:
hasDynamicLightEmissionin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
getLightEmission
public int getLightEmission(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) - Specified by:
getLightEmissionin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
getDestroyProgress
public float getDestroyProgress(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) - Overrides:
getDestroyProgressin 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) - Specified by:
onDestroyedByPlayerin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
getDrops
public List<net.minecraft.world.item.ItemStack> getDrops(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.storage.loot.LootParams.Builder builder) - Overrides:
getDropsin classnet.minecraft.world.level.block.state.BlockBehaviour
-
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) - Specified by:
getCloneItemStackin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
useItemOn
public net.minecraft.world.ItemInteractionResult useItemOn(net.minecraft.world.item.ItemStack stack, 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, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult hit_) - Overrides:
useItemOnin classnet.minecraft.world.level.block.state.BlockBehaviour
-
useWithoutItem
protected net.minecraft.world.InteractionResult useWithoutItem(net.minecraft.world.level.block.state.BlockState stack, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hit_) - Overrides:
useWithoutItemin classnet.minecraft.world.level.block.state.BlockBehaviour
-
attack
public void attack(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player) - Overrides:
attackin classnet.minecraft.world.level.block.state.BlockBehaviour
-
entityInside
public void entityInside(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) - Overrides:
entityInsidein classnet.minecraft.world.level.block.state.BlockBehaviour
-
stepOn
public void stepOn(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.Entity entity) - Overrides:
stepOnin classnet.minecraft.world.level.block.Block
-
neighborChanged
public void neighborChanged(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Block block, net.minecraft.core.BlockPos fromPos, boolean isMoving) - Overrides:
neighborChangedin classnet.minecraft.world.level.block.state.BlockBehaviour
-
onNeighborChange
public void onNeighborChange(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos neighbor) - Specified by:
onNeighborChangein interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
getWeakChanges
public boolean getWeakChanges(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos) - Specified by:
getWeakChangesin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
isSignalSource
public boolean isSignalSource(net.minecraft.world.level.block.state.BlockState state) - Overrides:
isSignalSourcein classnet.minecraft.world.level.block.state.BlockBehaviour
-
canConnectRedstone
public boolean canConnectRedstone(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, @Nullable @Nullable net.minecraft.core.Direction side) - Specified by:
canConnectRedstonein interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
getDirectSignal
public int getDirectSignal(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) - Overrides:
getDirectSignalin classnet.minecraft.world.level.block.state.BlockBehaviour
-
getSignal
public int getSignal(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side) - Overrides:
getSignalin classnet.minecraft.world.level.block.state.BlockBehaviour
-
animateTick
public void animateTick(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.util.RandomSource rand) - Overrides:
animateTickin classnet.minecraft.world.level.block.Block
-
addLandingEffects
public boolean addLandingEffects(net.minecraft.world.level.block.state.BlockState state1, net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state2, net.minecraft.world.entity.LivingEntity entity, int numberOfParticles) - Specified by:
addLandingEffectsin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
addRunningEffects
public boolean addRunningEffects(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.Entity entity) - Specified by:
addRunningEffectsin interfacenet.neoforged.neoforge.common.extensions.IBlockExtension
-
dropAndDestroy
public static void dropAndDestroy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) -
getTile
@Nullable public static @Nullable TileMultipart getTile(net.minecraft.world.level.block.entity.BlockEntity tile) -
getTile
@Nullable public static @Nullable TileMultipart getTile(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) -
getPart
@Nullable public static @Nullable MultiPart getPart(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, int slot) -
retracePart
@Nullable public static @Nullable PartRayTraceResult retracePart(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player)
-