rename biome packet

This commit is contained in:
Sen 2025-05-24 18:49:50 +02:00
parent ffca1f62e5
commit 1eefb197f0
5 changed files with 11 additions and 11 deletions

View file

@ -95,7 +95,7 @@ import common.packet.S39PacketPlayerAbilities;
import common.packet.S3APacketTabComplete; import common.packet.S3APacketTabComplete;
import common.packet.S43PacketUpdateEntityNBT; import common.packet.S43PacketUpdateEntityNBT;
import common.packet.SPacketAnimation; import common.packet.SPacketAnimation;
import common.packet.SPacketBiomes; import common.packet.SPacketBiome;
import common.packet.SPacketBlockAction; import common.packet.SPacketBlockAction;
import common.packet.SPacketBlockBreakAnim; import common.packet.SPacketBlockBreakAnim;
import common.packet.SPacketBlockChange; import common.packet.SPacketBlockChange;
@ -776,7 +776,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
} }
} }
public void handleBiomes(SPacketBiomes packetIn) public void handleBiomes(SPacketBiome packetIn)
{ {
NetHandler.checkThread(packetIn, this, this.gameController, this.clientWorldController); NetHandler.checkThread(packetIn, this, this.gameController, this.clientWorldController);
ChunkClient chunk = this.clientWorldController.getChunk(packetIn.getChunkX(), packetIn.getChunkZ()); ChunkClient chunk = this.clientWorldController.getChunk(packetIn.getChunkX(), packetIn.getChunkZ());

View file

@ -34,7 +34,7 @@ import common.packet.S39PacketPlayerAbilities;
import common.packet.S3APacketTabComplete; import common.packet.S3APacketTabComplete;
import common.packet.S43PacketUpdateEntityNBT; import common.packet.S43PacketUpdateEntityNBT;
import common.packet.SPacketAnimation; import common.packet.SPacketAnimation;
import common.packet.SPacketBiomes; import common.packet.SPacketBiome;
import common.packet.SPacketBlockAction; import common.packet.SPacketBlockAction;
import common.packet.SPacketBlockBreakAnim; import common.packet.SPacketBlockBreakAnim;
import common.packet.SPacketBlockChange; import common.packet.SPacketBlockChange;
@ -100,7 +100,7 @@ public interface IClientPlayer {
void handlePlayerPosLook(SPacketPlayerPosLook packetIn); void handlePlayerPosLook(SPacketPlayerPosLook packetIn);
void handleMultiBlockChange(SPacketMultiBlockChange packetIn); void handleMultiBlockChange(SPacketMultiBlockChange packetIn);
void handleChunkData(SPacketChunkData packetIn); void handleChunkData(SPacketChunkData packetIn);
void handleBiomes(SPacketBiomes packetIn); void handleBiomes(SPacketBiome packetIn);
void handleBlockChange(SPacketBlockChange packetIn); void handleBlockChange(SPacketBlockChange packetIn);
void handleDisconnect(SPacketDisconnect packetIn); void handleDisconnect(SPacketDisconnect packetIn);
void handleCollectItem(SPacketCollectItem packetIn); void handleCollectItem(SPacketCollectItem packetIn);

View file

@ -56,7 +56,7 @@ import common.packet.S39PacketPlayerAbilities;
import common.packet.S3APacketTabComplete; import common.packet.S3APacketTabComplete;
import common.packet.S43PacketUpdateEntityNBT; import common.packet.S43PacketUpdateEntityNBT;
import common.packet.SPacketAnimation; import common.packet.SPacketAnimation;
import common.packet.SPacketBiomes; import common.packet.SPacketBiome;
import common.packet.SPacketBlockAction; import common.packet.SPacketBlockAction;
import common.packet.SPacketBlockBreakAnim; import common.packet.SPacketBlockBreakAnim;
import common.packet.SPacketBlockChange; import common.packet.SPacketBlockChange;
@ -177,7 +177,7 @@ public enum PacketRegistry
this.server(SPacketWorld.class); this.server(SPacketWorld.class);
// this.server(SPacketCapes.class); // this.server(SPacketCapes.class);
this.server(SPacketCamera.class); this.server(SPacketCamera.class);
this.server(SPacketBiomes.class); this.server(SPacketBiome.class);
// this.server(S42PacketTitle.class); // this.server(S42PacketTitle.class);
this.server(S43PacketUpdateEntityNBT.class); this.server(S43PacketUpdateEntityNBT.class);
// this.server(SPacketBook.class); // this.server(SPacketBook.class);

View file

@ -8,15 +8,15 @@ import common.network.Packet;
import common.network.PacketBuffer; import common.network.PacketBuffer;
import common.util.BlockPos; import common.util.BlockPos;
public class SPacketBiomes implements Packet<IClientPlayer> { public class SPacketBiome implements Packet<IClientPlayer> {
private int posX; private int posX;
private int posZ; private int posZ;
private Biome biome; private Biome biome;
public SPacketBiomes() { public SPacketBiome() {
} }
public SPacketBiomes(BlockPos pos, Biome biome) { public SPacketBiome(BlockPos pos, Biome biome) {
this.posX = pos.getX(); this.posX = pos.getX();
this.posZ = pos.getZ(); this.posZ = pos.getZ();
this.biome = biome; this.biome = biome;

View file

@ -54,7 +54,7 @@ import common.packet.S29PacketSoundEffect;
import common.packet.S2APacketParticles; import common.packet.S2APacketParticles;
import common.packet.S2BPacketChangeGameState; import common.packet.S2BPacketChangeGameState;
import common.packet.S2CPacketSpawnGlobalEntity; import common.packet.S2CPacketSpawnGlobalEntity;
import common.packet.SPacketBiomes; import common.packet.SPacketBiome;
import common.packet.SPacketBlockAction; import common.packet.SPacketBlockAction;
import common.packet.SPacketBlockBreakAnim; import common.packet.SPacketBlockBreakAnim;
import common.packet.SPacketBlockChange; import common.packet.SPacketBlockChange;
@ -1885,7 +1885,7 @@ public final class WorldServer extends AWorldServer {
long v = (long)chunkX + 2147483647L | (long)chunkZ + 2147483647L << 32; long v = (long)chunkX + 2147483647L | (long)chunkZ + 2147483647L << 32;
PlayerInstance ins = this.instances.getValueByKey(v); PlayerInstance ins = this.instances.getValueByKey(v);
if(ins != null) if(ins != null)
ins.sendToAllPlayersWatchingChunk(new SPacketBiomes(pos, biome)); ins.sendToAllPlayersWatchingChunk(new SPacketBiome(pos, biome));
} }
private PlayerInstance getPlayerInstance(int chunkX, int chunkZ, boolean create) { private PlayerInstance getPlayerInstance(int chunkX, int chunkZ, boolean create) {