mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
24w05a
They forgot to bump the version string and protocol id, not an accident on my part.
This commit is contained in:
parent
7cdfa6ef36
commit
c84cad6d06
9 changed files with 92 additions and 5 deletions
|
@ -31,6 +31,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundCo
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundCommandsPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundCooldownPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundCustomChatCompletionsPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundDebugSamplePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundDeleteChatPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundDelimiterPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundDisguisedChatPacket;
|
||||
|
@ -141,6 +142,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCh
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundClientCommandPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundCommandSuggestionPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundConfigurationAcknowledgedPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundDebugSampleSubscriptionPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.ServerboundLockDifficultyPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.ServerboundContainerButtonClickPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.serverbound.inventory.ServerboundContainerClickPacket;
|
||||
|
@ -288,6 +290,7 @@ public class MinecraftCodec {
|
|||
.registerClientboundPacket(ClientboundCustomChatCompletionsPacket.class, ClientboundCustomChatCompletionsPacket::new)
|
||||
.registerClientboundPacket(ClientboundCustomPayloadPacket.class, ClientboundCustomPayloadPacket::new)
|
||||
.registerClientboundPacket(ClientboundDamageEventPacket.class, ClientboundDamageEventPacket::new)
|
||||
.registerClientboundPacket(ClientboundDebugSamplePacket.class, ClientboundDebugSamplePacket::new)
|
||||
.registerClientboundPacket(ClientboundDeleteChatPacket.class, ClientboundDeleteChatPacket::new)
|
||||
.registerClientboundPacket(ClientboundDisconnectPacket.class, ClientboundDisconnectPacket::new)
|
||||
.registerClientboundPacket(ClientboundDisguisedChatPacket.class, ClientboundDisguisedChatPacket::new)
|
||||
|
@ -399,6 +402,7 @@ public class MinecraftCodec {
|
|||
.registerServerboundPacket(ServerboundContainerSlotStateChangedPacket.class, ServerboundContainerSlotStateChangedPacket::new)
|
||||
.registerServerboundPacket(ServerboundCookieResponsePacket.class, ServerboundCookieResponsePacket::new)
|
||||
.registerServerboundPacket(ServerboundCustomPayloadPacket.class, ServerboundCustomPayloadPacket::new)
|
||||
.registerServerboundPacket(ServerboundDebugSampleSubscriptionPacket.class, ServerboundDebugSampleSubscriptionPacket::new)
|
||||
.registerServerboundPacket(ServerboundEditBookPacket.class, ServerboundEditBookPacket::new)
|
||||
.registerServerboundPacket(ServerboundEntityTagQuery.class, ServerboundEntityTagQuery::new)
|
||||
.registerServerboundPacket(ServerboundInteractPacket.class, ServerboundInteractPacket::new)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package com.github.steveice10.mc.protocol.data.game;
|
||||
|
||||
public enum RemoteDebugSampleType {
|
||||
TICK_TIME;
|
||||
|
||||
private static final RemoteDebugSampleType[] VALUES = values();
|
||||
|
||||
public static RemoteDebugSampleType from(int id) {
|
||||
return VALUES[id];
|
||||
}
|
||||
}
|
|
@ -45,7 +45,8 @@ public enum BlockEntityType {
|
|||
BRUSHABLE_BLOCK,
|
||||
DECORATED_POT,
|
||||
CRAFTER,
|
||||
TRIAL_SPAWNER;
|
||||
TRIAL_SPAWNER,
|
||||
VAULT;
|
||||
|
||||
private static final BlockEntityType[] VALUES = values();
|
||||
|
||||
|
|
|
@ -101,7 +101,8 @@ public enum ParticleType {
|
|||
EGG_CRACK,
|
||||
DUST_PLUME,
|
||||
GUST_DUST,
|
||||
TRIAL_SPAWNER_DETECTION;
|
||||
TRIAL_SPAWNER_DETECTION,
|
||||
VAULT_CONNECTION;
|
||||
|
||||
private static final ParticleType[] VALUES = values();
|
||||
|
||||
|
|
|
@ -1410,6 +1410,19 @@ public enum BuiltinSound implements Sound {
|
|||
UI_TOAST_CHALLENGE_COMPLETE("ui.toast.challenge_complete"),
|
||||
UI_TOAST_IN("ui.toast.in"),
|
||||
UI_TOAST_OUT("ui.toast.out"),
|
||||
BLOCK_VAULT_ACTIVATE("block.vault.activate"),
|
||||
BLOCK_VAULT_AMBIENT("block.vault.ambient"),
|
||||
BLOCK_VAULT_BREAK("block.vault.break"),
|
||||
BLOCK_VAULT_CLOSE_SHUTTER("block.vault.close_shutter"),
|
||||
BLOCK_VAULT_DEACTIVATE("block.vault.deactivate"),
|
||||
BLOCK_VAULT_EJECT_ITEM("block.vault.eject_item"),
|
||||
BLOCK_VAULT_FALL("block.vault.fall"),
|
||||
BLOCK_VAULT_HIT("block.vault.hit"),
|
||||
BLOCK_VAULT_INSERT_ITEM("block.vault.insert_item"),
|
||||
BLOCK_VAULT_INSERT_ITEM_FAIL("block.vault.insert_item_fail"),
|
||||
BLOCK_VAULT_OPEN_SHUTTER("block.vault.open_shutter"),
|
||||
BLOCK_VAULT_PLACE("block.vault.place"),
|
||||
BLOCK_VAULT_STEP("block.vault.step"),
|
||||
ENTITY_VEX_AMBIENT("entity.vex.ambient"),
|
||||
ENTITY_VEX_CHARGE("entity.vex.charge"),
|
||||
ENTITY_VEX_DEATH("entity.vex.death"),
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package com.github.steveice10.mc.protocol.packet.ingame.clientbound;
|
||||
|
||||
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
|
||||
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
|
||||
import com.github.steveice10.mc.protocol.data.game.RemoteDebugSampleType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.With;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Data
|
||||
@With
|
||||
@AllArgsConstructor
|
||||
public class ClientboundDebugSamplePacket implements MinecraftPacket {
|
||||
private final long[] sample;
|
||||
private final RemoteDebugSampleType debugSampleType;
|
||||
|
||||
public ClientboundDebugSamplePacket(ByteBuf in, MinecraftCodecHelper helper) throws IOException {
|
||||
this.sample = helper.readLongArray(in);
|
||||
this.debugSampleType = RemoteDebugSampleType.from(helper.readVarInt(in));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf out, MinecraftCodecHelper helper) throws IOException {
|
||||
helper.writeLongArray(out, this.sample);
|
||||
helper.writeVarInt(out, this.debugSampleType.ordinal());
|
||||
}
|
||||
}
|
|
@ -39,9 +39,9 @@ public class ClientboundMapItemDataPacket implements MinecraftPacket {
|
|||
if (hasIcons) {
|
||||
for (int index = 0; index < this.icons.length; index++) {
|
||||
int type = helper.readVarInt(in);
|
||||
int x = in.readUnsignedByte();
|
||||
int z = in.readUnsignedByte();
|
||||
int rotation = in.readUnsignedByte();
|
||||
int x = in.readByte();
|
||||
int z = in.readByte();
|
||||
int rotation = in.readByte();
|
||||
Component displayName = null;
|
||||
if (in.readBoolean()) {
|
||||
displayName = helper.readComponent(in);
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
package com.github.steveice10.mc.protocol.packet.ingame.serverbound;
|
||||
|
||||
import com.github.steveice10.mc.protocol.codec.MinecraftCodecHelper;
|
||||
import com.github.steveice10.mc.protocol.codec.MinecraftPacket;
|
||||
import com.github.steveice10.mc.protocol.data.game.RemoteDebugSampleType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.With;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Data
|
||||
@With
|
||||
@AllArgsConstructor
|
||||
public class ServerboundDebugSampleSubscriptionPacket implements MinecraftPacket {
|
||||
private final RemoteDebugSampleType debugSampleType;
|
||||
|
||||
public ServerboundDebugSampleSubscriptionPacket(ByteBuf in, MinecraftCodecHelper helper) throws IOException {
|
||||
this.debugSampleType = RemoteDebugSampleType.from(helper.readVarInt(in));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf out, MinecraftCodecHelper helper) throws IOException {
|
||||
helper.writeVarInt(out, this.debugSampleType.ordinal());
|
||||
}
|
||||
}
|
Binary file not shown.
Loading…
Reference in a new issue