Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 19:02:36 +01:00
fix: remove synchronisation on chunk GET when sending packet
Dieser Commit ist enthalten in:
Ursprung
15c6027958
Commit
a14bb7ed2c
@ -350,7 +350,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
MinecraftServer.getServer().execute(() -> {
|
||||
ClientboundLevelChunkWithLightPacket packet;
|
||||
if (PaperLib.isPaper()) {
|
||||
synchronized (chunk) {
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
nmsWorld.getChunkSource().getLightEngine(),
|
||||
@ -359,9 +358,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
true,
|
||||
false // last false is to not bother with x-ray
|
||||
);
|
||||
}
|
||||
} else {
|
||||
synchronized (chunk) {
|
||||
// deprecated on paper - deprecation suppressed
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
@ -371,7 +368,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
nearbyPlayers(nmsWorld, coordIntPair).forEach(p -> p.connection.send(packet));
|
||||
});
|
||||
}
|
||||
|
@ -364,7 +364,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
MinecraftServer.getServer().execute(() -> {
|
||||
ClientboundLevelChunkWithLightPacket packet;
|
||||
if (PaperLib.isPaper()) {
|
||||
synchronized (chunk) {
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
nmsWorld.getChunkSource().getLightEngine(),
|
||||
@ -372,9 +371,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null,
|
||||
false // last false is to not bother with x-ray
|
||||
);
|
||||
}
|
||||
} else {
|
||||
synchronized (chunk) {
|
||||
// deprecated on paper - deprecation suppressed
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
@ -383,7 +380,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
nearbyPlayers(nmsWorld, coordIntPair).forEach(p -> p.connection.send(packet));
|
||||
});
|
||||
}
|
||||
|
@ -364,7 +364,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
MinecraftServer.getServer().execute(() -> {
|
||||
ClientboundLevelChunkWithLightPacket packet;
|
||||
if (PaperLib.isPaper()) {
|
||||
synchronized (chunk) {
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
nmsWorld.getChunkSource().getLightEngine(),
|
||||
@ -372,9 +371,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null,
|
||||
false // last false is to not bother with x-ray
|
||||
);
|
||||
}
|
||||
} else {
|
||||
synchronized (chunk) {
|
||||
// deprecated on paper - deprecation suppressed
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
@ -383,7 +380,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
nearbyPlayers(nmsWorld, coordIntPair).forEach(p -> p.connection.send(packet));
|
||||
});
|
||||
}
|
||||
|
@ -353,7 +353,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
MinecraftServer.getServer().execute(() -> {
|
||||
ClientboundLevelChunkWithLightPacket packet;
|
||||
if (PaperLib.isPaper()) {
|
||||
synchronized (chunk) {
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
nmsWorld.getChunkSource().getLightEngine(),
|
||||
@ -361,9 +360,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null,
|
||||
false // last false is to not bother with x-ray
|
||||
);
|
||||
}
|
||||
} else {
|
||||
synchronized (chunk) {
|
||||
// deprecated on paper - deprecation suppressed
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
@ -372,7 +369,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
nearbyPlayers(nmsWorld, coordIntPair).forEach(p -> p.connection.send(packet));
|
||||
});
|
||||
}
|
||||
|
@ -361,7 +361,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
MinecraftServer.getServer().execute(() -> {
|
||||
ClientboundLevelChunkWithLightPacket packet;
|
||||
if (PaperLib.isPaper()) {
|
||||
synchronized (chunk) {
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
nmsWorld.getChunkSource().getLightEngine(),
|
||||
@ -369,9 +368,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null,
|
||||
false // last false is to not bother with x-ray
|
||||
);
|
||||
}
|
||||
} else {
|
||||
synchronized (chunk) {
|
||||
// deprecated on paper - deprecation suppressed
|
||||
packet = new ClientboundLevelChunkWithLightPacket(
|
||||
levelChunk,
|
||||
@ -380,7 +377,6 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
nearbyPlayers(nmsWorld, coordIntPair).forEach(p -> p.connection.send(packet));
|
||||
});
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren