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 czfintermediary net/minecraft/class_8431named net/minecraft/block/PlaceBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested 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, TRIGGEREDFields 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, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static BoxcreateSearchBox(BlockPos pos) findInventories(World world, BlockPos pos) static @Nullable ItemEntityfindItemEntity(World world, BlockPos pos) protected TickPrioritystatic booleaninsertItem(World world, BlockPos pos, Direction side, ItemStack stack) static booleanvoidscheduledTick(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, rotateMethods 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, toStringMethods 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, shouldLetAirThroughMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Constructor Details
-
PlaceBlock
- Mappings:
Namespace Name Mixin selector official <init>Ldgg;<init>(Ldgg$d;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getTickPriority
- Specified by:
getTickPriorityin classWorldModifyingBlock- Mappings:
Namespace Name Mixin selector official bLcwe;b()Lejx;intermediary method_50863Lnet/minecraft/class_8427;method_50863()Lnet/minecraft/class_1953;named getTickPriorityLnet/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:
SugarCaneBlockchecks the placement requirement.DispenserBlockdispenses its content.CommandBlockexecutes its command.FrogspawnBlockspawns a tadpole.SoulSandBlockupdates a bubble column.FallingBlocktries to fall.
- Overrides:
scheduledTickin 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 bLdgg;b(Ldgh;Laik;Lgt;Lapj;)Vintermediary method_9588Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vnamed scheduledTickLnet/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 bLczf;b(Lcql;Lgt;Lgz;Lcjr;)Zintermediary method_50881Lnet/minecraft/class_8431;method_50881(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_1799;)Znamed insertItemLnet/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 aLczf;a(Lcql;Lgt;Lgz;Ljava/util/function/Function;)Zintermediary method_50878Lnet/minecraft/class_8431;method_50878(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Ljava/util/function/Function;)Znamed placeBlockLnet/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 aLczf;a(Lcql;Lgt;)Ljava/util/List;intermediary method_50877Lnet/minecraft/class_8431;method_50877(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Ljava/util/List;named findInventoriesLnet/minecraft/block/PlaceBlock;findInventories(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Ljava/util/List;
-
findItemEntity
- Mappings:
Namespace Name Mixin selector official bLczf;b(Lcql;Lgt;)Lbyq;intermediary method_50880Lnet/minecraft/class_8431;method_50880(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_1542;named findItemEntityLnet/minecraft/block/PlaceBlock;findItemEntity(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/entity/ItemEntity;
-
createSearchBox
- Mappings:
Namespace Name Mixin selector official aLczf;a(Lgt;)Leid;intermediary method_50879Lnet/minecraft/class_8431;method_50879(Lnet/minecraft/class_2338;)Lnet/minecraft/class_238;named createSearchBoxLnet/minecraft/block/PlaceBlock;createSearchBox(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/Box;
-