Package net.minecraft.util
Class ItemScatterer
java.lang.Object
net.minecraft.util.ItemScatterer
Contains utility methods for spawning item entities scattered around a certain position.
All methods consume the item stack, so there is no need for decrementing the
stack size yourself.
- See Also:
- Mappings:
Namespace Name named net/minecraft/util/ItemScattererintermediary net/minecraft/class_1264official bqn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidonStateReplaced(BlockState state, BlockState newState, World world, BlockPos pos) private static voidSpawns item entities frominventoryaround the given position.static voidSpawns an item entity ofstackaround the given position.static voidSpawns item entities frominventoryaroundentity's position.static voidSpawns item entities frominventoryaroundpos.static voidspawn(World world, BlockPos pos, DefaultedList<ItemStack> stacks) Spawns item entities fromstacksaroundpos.
-
Constructor Details
-
ItemScatterer
public ItemScatterer()
-
-
Method Details
-
spawn
Spawns item entities frominventoryaroundpos.- Mappings:
Namespace Name Mixin selector named spawnLnet/minecraft/util/ItemScatterer;spawn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/inventory/Inventory;)Vintermediary method_5451Lnet/minecraft/class_1264;method_5451(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1263;)Vofficial aLbqn;a(Ldcw;Ljd;Lbqk;)V
-
spawn
Spawns item entities frominventoryaroundentity's position.- Mappings:
Namespace Name Mixin selector named spawnLnet/minecraft/util/ItemScatterer;spawn(Lnet/minecraft/world/World;Lnet/minecraft/entity/Entity;Lnet/minecraft/inventory/Inventory;)Vintermediary method_5452Lnet/minecraft/class_1264;method_5452(Lnet/minecraft/class_1937;Lnet/minecraft/class_1297;Lnet/minecraft/class_1263;)Vofficial aLbqn;a(Ldcw;Lbsr;Lbqk;)V
-
spawn
Spawns item entities frominventoryaround the given position.- Mappings:
Namespace Name Mixin selector named spawnLnet/minecraft/util/ItemScatterer;spawn(Lnet/minecraft/world/World;DDDLnet/minecraft/inventory/Inventory;)Vintermediary method_5450Lnet/minecraft/class_1264;method_5450(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1263;)Vofficial aLbqn;a(Ldcw;DDDLbqk;)V
-
spawn
Spawns item entities fromstacksaroundpos.- Mappings:
Namespace Name Mixin selector named spawnLnet/minecraft/util/ItemScatterer;spawn(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/collection/DefaultedList;)Vintermediary method_17349Lnet/minecraft/class_1264;method_17349(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2371;)Vofficial aLbqn;a(Ldcw;Ljd;Ljv;)V
-
spawn
Spawns an item entity ofstackaround the given position.- Mappings:
Namespace Name Mixin selector named spawnLnet/minecraft/util/ItemScatterer;spawn(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)Vintermediary method_5449Lnet/minecraft/class_1264;method_5449(Lnet/minecraft/class_1937;DDDLnet/minecraft/class_1799;)Vofficial aLbqn;a(Ldcw;DDDLcuq;)V
-
onStateReplaced
public static void onStateReplaced(BlockState state, BlockState newState, World world, BlockPos pos) ImplementationAbstractBlock.onStateReplaced(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, boolean). This assumes that the block has a corresponding block entity.If the block changes, this spawns item entities around the block and updates redstone comparators.
- See Also:
- Mappings:
Namespace Name Mixin selector named onStateReplacedLnet/minecraft/util/ItemScatterer;onStateReplaced(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Vintermediary method_54291Lnet/minecraft/class_1264;method_54291(Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Vofficial aLbqn;a(Ldtc;Ldtc;Ldcw;Ljd;)V
-