Package net.minecraft.block
Class PlaceBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.WorldModifyingBlock
net.minecraft.block.PlaceBlock
- All Implemented Interfaces:
ItemConvertible
,ToggleableFeature
- Mappings:
Namespace Name official czf
intermediary net/minecraft/class_8431
named net/minecraft/block/PlaceBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields inherited from class net.minecraft.block.WorldModifyingBlock
FACING, TRIGGERED
Fields inherited from class net.minecraft.block.Block
field_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Box
createSearchBox
(BlockPos pos) findInventories
(World world, BlockPos pos) static @Nullable ItemEntity
findItemEntity
(World world, BlockPos pos) protected TickPriority
static boolean
insertItem
(World world, BlockPos pos, Direction side, ItemStack stack) static boolean
void
scheduledTick
(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.Methods inherited from class net.minecraft.block.WorldModifyingBlock
appendProperties, getPlacementState, getRenderType, mirror, neighborUpdate, rotate
Methods inherited from class net.minecraft.block.Block
afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, method_50848, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getOutlineShape, getRaycastShape, getRenderingSeed, getRequiredFeatures, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, method_50847, method_50855, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, randomTick, shouldLetAirThrough
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Constructor Details
-
PlaceBlock
- Mappings:
Namespace Name Mixin selector official <init>
Ldgg;<init>(Ldgg$d;)V
intermediary <init>
Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)V
named <init>
Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getTickPriority
- Specified by:
getTickPriority
in classWorldModifyingBlock
- Mappings:
Namespace Name Mixin selector official b
Lcwe;b()Lejx;
intermediary method_50863
Lnet/minecraft/class_8427;method_50863()Lnet/minecraft/class_1953;
named getTickPriority
Lnet/minecraft/block/WorldModifyingBlock;getTickPriority()Lnet/minecraft/world/tick/TickPriority;
-
scheduledTick
Called server-side when a block receives a scheduled tick. This can be used like a timer. Scheduled ticks are added usingWorldAccess.scheduleBlockTick(BlockPos, Block, int)
. Additionally,AbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)
by default calls this method; overrideAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)
to disable this behavior.Scheduled ticks are often used inside
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos)
.Here are some examples:
SugarCaneBlock
checks the placement requirement.DispenserBlock
dispenses its content.CommandBlock
executes its command.FrogspawnBlock
spawns a tadpole.SoulSandBlock
updates a bubble column.FallingBlock
tries to fall.
- Overrides:
scheduledTick
in classAbstractBlock
- See Also:
-
WorldAccess.scheduleBlockTick(BlockPos, Block, int)
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos)
AbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)
- Mappings:
Namespace Name Mixin selector official b
Ldgg;b(Ldgh;Laik;Lgt;Lapj;)V
intermediary method_9588
Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V
named scheduledTick
Lnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
-
insertItem
- Mappings:
Namespace Name Mixin selector official b
Lczf;b(Lcql;Lgt;Lgz;Lcjr;)Z
intermediary method_50881
Lnet/minecraft/class_8431;method_50881(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_1799;)Z
named insertItem
Lnet/minecraft/block/PlaceBlock;insertItem(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/item/ItemStack;)Z
-
placeBlock
public static boolean placeBlock(World world, BlockPos pos, Direction side, Function<ItemStack, Boolean> placer) - Mappings:
Namespace Name Mixin selector official a
Lczf;a(Lcql;Lgt;Lgz;Ljava/util/function/Function;)Z
intermediary method_50878
Lnet/minecraft/class_8431;method_50878(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Ljava/util/function/Function;)Z
named placeBlock
Lnet/minecraft/block/PlaceBlock;placeBlock(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Ljava/util/function/Function;)Z
-
findInventories
- Mappings:
Namespace Name Mixin selector official a
Lczf;a(Lcql;Lgt;)Ljava/util/List;
intermediary method_50877
Lnet/minecraft/class_8431;method_50877(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Ljava/util/List;
named findInventories
Lnet/minecraft/block/PlaceBlock;findInventories(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/util/List;
-
findItemEntity
- Mappings:
Namespace Name Mixin selector official b
Lczf;b(Lcql;Lgt;)Lbyq;
intermediary method_50880
Lnet/minecraft/class_8431;method_50880(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1542;
named findItemEntity
Lnet/minecraft/block/PlaceBlock;findItemEntity(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/ItemEntity;
-
createSearchBox
- Mappings:
Namespace Name Mixin selector official a
Lczf;a(Lgt;)Leid;
intermediary method_50879
Lnet/minecraft/class_8431;method_50879(Lnet/minecraft/class_2338;)Lnet/minecraft/class_238;
named createSearchBox
Lnet/minecraft/block/PlaceBlock;createSearchBox(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-