mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-14 12:11:27 +01:00
Remove unnecessary synchronized blocks
This commit is contained in:
parent
eca6a657c3
commit
91dc4eb675
@ -7,7 +7,7 @@ import net.minestom.server.world.biomes.Biome;
|
||||
import net.minestom.server.world.biomes.BiomeManager;
|
||||
|
||||
/**
|
||||
* Hacky class for Optifine because of an issue making the client crash if biomes 'swamp' or 'swamp_hills'
|
||||
* Hacky class for Optifine because of an issue making the client crash if biomes 'swamp' and 'swamp_hills'
|
||||
* are not registered.
|
||||
* <p>
|
||||
* Can be removed anytime, hope that it will be fixed.
|
||||
|
@ -508,7 +508,7 @@ public abstract class Chunk implements Viewable, DataContainer {
|
||||
*
|
||||
* @param player the player
|
||||
*/
|
||||
public synchronized void sendChunk(@NotNull Player player) {
|
||||
public void sendChunk(@NotNull Player player) {
|
||||
// Only send loaded chunk
|
||||
if (!isLoaded())
|
||||
return;
|
||||
@ -521,7 +521,7 @@ public abstract class Chunk implements Viewable, DataContainer {
|
||||
playerConnection.sendPacket(getLightPacket());
|
||||
}
|
||||
|
||||
public synchronized void sendChunk() {
|
||||
public void sendChunk() {
|
||||
if (!isLoaded()) {
|
||||
return;
|
||||
}
|
||||
@ -535,7 +535,7 @@ public abstract class Chunk implements Viewable, DataContainer {
|
||||
*
|
||||
* @param player the player to update the chunk to
|
||||
*/
|
||||
public synchronized void sendChunkUpdate(@NotNull Player player) {
|
||||
public void sendChunkUpdate(@NotNull Player player) {
|
||||
final PlayerConnection playerConnection = player.getPlayerConnection();
|
||||
playerConnection.sendPacket(getFreshFullDataPacket());
|
||||
}
|
||||
@ -543,7 +543,7 @@ public abstract class Chunk implements Viewable, DataContainer {
|
||||
/**
|
||||
* Sends a full {@link ChunkDataPacket} to all chunk viewers.
|
||||
*/
|
||||
public synchronized void sendChunkUpdate() {
|
||||
public void sendChunkUpdate() {
|
||||
PacketUtils.sendGroupedPacket(getViewers(), getFreshFullDataPacket());
|
||||
}
|
||||
|
||||
@ -554,7 +554,7 @@ public abstract class Chunk implements Viewable, DataContainer {
|
||||
* @param player the player to send the packet to
|
||||
* @throws IllegalArgumentException if {@code section} is not a valid section
|
||||
*/
|
||||
public synchronized void sendChunkSectionUpdate(int section, @NotNull Player player) {
|
||||
public void sendChunkSectionUpdate(int section, @NotNull Player player) {
|
||||
if (!PlayerUtils.isNettyClient(player))
|
||||
return;
|
||||
Check.argCondition(!MathUtils.isBetween(section, 0, CHUNK_SECTION_COUNT),
|
||||
|
Loading…
Reference in New Issue
Block a user