(Level level, BlockPos pos, ItemStack remaining)
| 15 | public class Tools { |
| 16 | |
| 17 | public static void spawnInWorld(Level level, BlockPos pos, ItemStack remaining) { |
| 18 | if (!remaining.isEmpty()) { |
| 19 | ItemEntity entityitem = new ItemEntity(level, pos.getX() + .5, pos.getY() + .5, pos.getZ() + .5, remaining); |
| 20 | entityitem.setPickUpDelay(40); |
| 21 | entityitem.setDeltaMovement(entityitem.getDeltaMovement().multiply(0, 1, 0)); |
| 22 | level.addFreshEntity(entityitem); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | public static void teleport(ServerPlayer entity, ServerLevel destination, BlockPos pos, boolean findTop) { |
| 27 | entity.changeDimension(destination, new ITeleporter() { |
no outgoing calls
no test coverage detected