net.minecraft.server.world.ServerChunkManager Java Examples
The following examples show how to use
net.minecraft.server.world.ServerChunkManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PacketDistributor.java From patchwork-api with GNU Lesser General Public License v2.1 | 5 votes |
private Consumer<Packet<?>> trackingChunk(final Supplier<WorldChunk> worldChunk) { return packet -> { final WorldChunk chunk = worldChunk.get(); ((ServerChunkManager) chunk.getWorld().getChunkManager()).threadedAnvilChunkStorage.getPlayersWatchingChunk(chunk.getPos(), false) .forEach(e -> e.networkHandler.sendPacket(packet)); }; }
Example #2
Source File: PacketDistributor.java From patchwork-api with GNU Lesser General Public License v2.1 | 4 votes |
private Consumer<Packet<?>> trackingEntity(final Supplier<Entity> entitySupplier) { return packet -> { final Entity entity = entitySupplier.get(); ((ServerChunkManager) entity.getEntityWorld().getChunkManager()).sendToOtherNearbyPlayers(entity, packet); }; }
Example #3
Source File: PacketDistributor.java From patchwork-api with GNU Lesser General Public License v2.1 | 4 votes |
private Consumer<Packet<?>> trackingEntityAndSelf(final Supplier<Entity> entitySupplier) { return packet -> { final Entity entity = entitySupplier.get(); ((ServerChunkManager) entity.getEntityWorld().getChunkManager()).sendToNearbyPlayers(entity, packet); }; }
Example #4
Source File: SpawnChunks.java From fabric-carpet with MIT License | 4 votes |
public static void changeSpawnChunks(ServerChunkManager chunkManager, ChunkPos pos, int size) { ChunkTicketManager ticketManager = ((ServerChunkManagerInterface)chunkManager).getCMTicketManager(); ((ChunkTicketManagerInterface)ticketManager).changeSpawnChunks(pos, size); }
Example #5
Source File: MixinPreGenSpawn_MinecraftServer.java From Galaxy with GNU Affero General Public License v3.0 | 4 votes |
@Redirect(method = "prepareStartRegion", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ServerChunkManager;getTotalChunksLoadedCount()I")) private <T> int skipLoadSpawn(ServerChunkManager serverChunkManager) { return 441; }