Java 如何移动丢弃的项目?
使用Java 如何移动丢弃的项目?,java,minecraft,bukkit,Java,Minecraft,Bukkit,使用world.dropItem()或world.dropItemNaturally()删除项目后,如何移动它?该方法将允许您将项目传送到另一个位置。您可以这样使用它: final Location dropLocation = new Location(world, x, y, z); final Location teleportLocation = new Location(world, x + 1, y + 1, z + 1); final Item dropped = world.d
world.dropItem()
或world.dropItemNaturally()
删除项目后,如何移动它?该方法将允许您将项目传送到另一个位置。您可以这样使用它:
final Location dropLocation = new Location(world, x, y, z);
final Location teleportLocation = new Location(world, x + 1, y + 1, z + 1);
final Item dropped = world.dropItem(dropLocation, new ItemStack(Block.anvil));
dropped.teleport(teleportLocation);
尽管您可能需要使用计时器来完成此操作,或者它可能发生得太快而无法察觉。此方法将允许您将项目传送到另一个位置。您可以这样使用它:
final Location dropLocation = new Location(world, x, y, z);
final Location teleportLocation = new Location(world, x + 1, y + 1, z + 1);
final Item dropped = world.dropItem(dropLocation, new ItemStack(Block.anvil));
dropped.teleport(teleportLocation);
尽管您可能需要使用计时器来完成此操作,或者它可能发生得太快而无法察觉。此方法将允许您将项目传送到另一个位置。您可以这样使用它:
final Location dropLocation = new Location(world, x, y, z);
final Location teleportLocation = new Location(world, x + 1, y + 1, z + 1);
final Item dropped = world.dropItem(dropLocation, new ItemStack(Block.anvil));
dropped.teleport(teleportLocation);
尽管您可能需要使用计时器来完成此操作,或者它可能发生得太快而无法察觉。此方法将允许您将项目传送到另一个位置。您可以这样使用它:
final Location dropLocation = new Location(world, x, y, z);
final Location teleportLocation = new Location(world, x + 1, y + 1, z + 1);
final Item dropped = world.dropItem(dropLocation, new ItemStack(Block.anvil));
dropped.teleport(teleportLocation);
尽管您可能需要使用计时器来执行此操作,或者它发生得太快而无法察觉。移动它是什么意思?掉落的物品静止不动,如果没有捡起,5分钟后就会消失。@MrLore将其移动到另一个位置…是的,但为什么?这两种方法都允许您指定将其放置在何处,那么您为什么要将其放置在不希望的位置,然后移动它?@MrLore,因为我想让它移动。我的意思是让它移动通过传送它到下一个点,然后到下一个点,然后到下一个点,所以它“浮动”到另一个点。我只需要知道如何将它传送到另一个点。你说的移动它是什么意思?掉落的物品静止不动,如果没有捡起,5分钟后就会消失。@MrLore将其移动到另一个位置…是的,但为什么?这两种方法都允许您指定将其放置在何处,那么您为什么要将其放置在不希望的位置,然后移动它?@MrLore,因为我想让它移动。我的意思是让它移动通过传送它到下一个点,然后到下一个点,然后到下一个点,所以它“浮动”到另一个点。我只需要知道如何将它传送到另一个点。你说的移动它是什么意思?掉落的物品静止不动,如果没有捡起,5分钟后就会消失。@MrLore将其移动到另一个位置…是的,但为什么?这两种方法都允许您指定将其放置在何处,那么您为什么要将其放置在不希望的位置,然后移动它?@MrLore,因为我想让它移动。我的意思是让它移动通过传送它到下一个点,然后到下一个点,然后到下一个点,所以它“浮动”到另一个点。我只需要知道如何将它传送到另一个点。你说的移动它是什么意思?掉落的物品静止不动,如果没有捡起,5分钟后就会消失。@MrLore将其移动到另一个位置…是的,但为什么?这两种方法都允许您指定将其放置在何处,那么您为什么要将其放置在不希望的位置,然后移动它?@MrLore,因为我想让它移动。我的意思是让它移动通过传送它到下一个点,然后到下一个点,然后到下一个点,所以它“浮动”到另一个点。我只需要知道如何将它传送到另一个点。