Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ public void sendSwingPacketToServer() {
animate.write(Types.UNSIGNED_BYTE, (short) AnimatePacketPayload_Action.Swing.getValue()); // action
animate.write(BedrockTypes.UNSIGNED_VAR_LONG, this.runtimeId); // entity runtime id
animate.write(BedrockTypes.FLOAT_LE, 0F); // data
animate.write(BedrockTypes.OPTIONAL_STRING, ActorSwingSource.Attack.name().toLowerCase(Locale.ROOT)); // swing source // TODO: 1.21.130
animate.write(BedrockTypes.OPTIONAL_STRING, ActorSwingSource.Attack.name().toLowerCase(Locale.ROOT)); // swing source
animate.write(Types.BYTE, (byte) HandSlot.Mainhand.getValue()); // hand slot
animate.sendToServer(BedrockProtocol.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ record ReleaseItemTransactionData(
BedrockItem itemInHand,
Position3f headPosition,
HandSlot handSlot
) implements InventoryTransactionData {
) implements InventoryTransactionData {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ public static void register(final BedrockProtocol protocol) {
final long entityRuntimeId = wrapper.read(BedrockTypes.UNSIGNED_VAR_LONG); // entity runtime id
wrapper.read(BedrockTypes.FLOAT_LE); // data
wrapper.read(BedrockTypes.OPTIONAL_STRING); // swing source
HandSlot hand = HandSlot.getByValue(wrapper.read(Types.BYTE), HandSlot.Mainhand); // hand
final HandSlot hand = HandSlot.getByValue(wrapper.read(Types.BYTE), HandSlot.Mainhand); // hand

final Entity entity = wrapper.user().get(EntityTracker.class).getEntityByRid(entityRuntimeId);
if (entity == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void register(final BedrockProtocol protocol) {
final long entityUniqueId = wrapper.read(BedrockTypes.VAR_LONG); // actorUniqueId
final String name = wrapper.read(BedrockTypes.STRING); // name
final String xuid = wrapper.read(BedrockTypes.STRING); // xuid
final String skinPlayFabId = wrapper.read(BedrockTypes.STRING); // skin playfab id
wrapper.read(BedrockTypes.STRING); // skin playfab id
final String platformOnlineId = wrapper.read(BedrockTypes.STRING); // platform online id
final int deviceOs = wrapper.read(BedrockTypes.INT_LE); // device os
final SkinData skin = wrapper.read(BedrockTypes.SKIN); // skin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public static void register(final BedrockProtocol protocol) {
final boolean cachingEnabled = wrapper.read(Types.BOOLEAN); // caching enabled
final Long[] blobs = wrapper.read(BedrockTypes.LONG_ARRAY); // blob ids (always present in 1.26.40)
final byte[] data = wrapper.read(BedrockTypes.BYTE_ARRAY); // data
final boolean biomeUpdate = wrapper.read(Types.BOOLEAN); // biome update
wrapper.read(Types.BOOLEAN); // biome update
if (cachingEnabled) {
final int expectedLength = requestSubChunks ? 1 : sectionCount + 1;
if (blobs.length != expectedLength) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ public PassengerOfBlocksType() {
@Override
public PassengerOfBlocks read(final ByteBuf buffer) {

BlockPosition position = BedrockTypes.BLOCK_POSITION.read(buffer);
Position3f offset = BedrockTypes.POSITION_3F.read(buffer);
float rotation = BedrockTypes.FLOAT_LE.read(buffer);
float rotationLimit = BedrockTypes.FLOAT_LE.read(buffer);
PassengerOfBlockArguments_EmoteType emote = PassengerOfBlockArguments_EmoteType.getByValue(buffer.readByte());
final BlockPosition position = BedrockTypes.BLOCK_POSITION.read(buffer);
final Position3f offset = BedrockTypes.POSITION_3F.read(buffer);
final float rotation = BedrockTypes.FLOAT_LE.read(buffer);
final float rotationLimit = BedrockTypes.FLOAT_LE.read(buffer);
final PassengerOfBlockArguments_EmoteType emote = PassengerOfBlockArguments_EmoteType.getByValue(buffer.readByte());

return new PassengerOfBlocks(position, offset, rotation, rotationLimit, emote);
}
Expand Down