mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-28 19:39:11 +00:00
fix packet id
This commit is contained in:
@@ -4,6 +4,7 @@ import com.sk89q.worldedit.blocks.Blocks;
|
||||
import net.momirealms.craftengine.bukkit.block.BukkitBlockManager;
|
||||
import net.momirealms.craftengine.bukkit.nms.FastNMS;
|
||||
import net.momirealms.craftengine.bukkit.plugin.injector.BukkitInjector;
|
||||
import net.momirealms.craftengine.bukkit.plugin.network.BukkitNetworkManager;
|
||||
import net.momirealms.craftengine.bukkit.util.BlockStateUtils;
|
||||
import net.momirealms.craftengine.bukkit.util.LocationUtils;
|
||||
import net.momirealms.craftengine.bukkit.util.Reflections;
|
||||
|
||||
@@ -72,7 +72,9 @@ public class BukkitNetworkManager implements NetworkManager, Listener, PluginMes
|
||||
|
||||
public BukkitNetworkManager(BukkitCraftEngine plugin) {
|
||||
this.plugin = plugin;
|
||||
if (VersionHelper.isVersionNewerThan1_21_2()) {
|
||||
if (VersionHelper.isVersionNewerThan1_21_5()) {
|
||||
this.packetIds = new PacketIds1_21_5();
|
||||
} else if (VersionHelper.isVersionNewerThan1_21_2()) {
|
||||
this.packetIds = new PacketIds1_21_2();
|
||||
} else if (VersionHelper.isVersionNewerThan1_20_5()) {
|
||||
this.packetIds = new PacketIds1_20_5();
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package net.momirealms.craftengine.bukkit.plugin.network.impl;
|
||||
|
||||
import net.momirealms.craftengine.bukkit.plugin.network.PacketIds;
|
||||
|
||||
public class PacketIds1_21_5 implements PacketIds {
|
||||
|
||||
@Override
|
||||
public int clientboundBlockUpdatePacket() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clientboundSectionBlocksUpdatePacket() {
|
||||
return 72;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clientboundLevelParticlesPacket() {
|
||||
return 40;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clientboundLevelEventPacket() {
|
||||
return 39;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clientboundAddEntityPacket() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user