Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected CommandData readCommand(ByteBuf buffer, BedrockCodecHelper helper, Lis
overloads[i].getOverloads()[i2] = readParameter(buffer, helper, enums, postfixes, softEnumParameters);
}
}
return new CommandData(name, description, flags, permissions, aliases, Collections.emptyList(), overloads);
return new CommandData(name, description, flags, permissions, aliases, overloads, Collections.emptyList());
}

protected void writeFlags(ByteBuf buffer, Set<CommandData.Flag> flags) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ protected MobKilledEventData readMobKilled(ByteBuf buffer, BedrockCodecHelper he
int entityDamageCause = VarInts.readInt(buffer);
int villagerTradeTier = VarInts.readInt(buffer);
String villagerDisplayName = helper.readString(buffer);
return new MobKilledEventData(killerUniqueEntityId, victimUniqueEntityId, -1, entityDamageCause,
villagerTradeTier, villagerDisplayName);
return new MobKilledEventData(killerUniqueEntityId, victimUniqueEntityId, entityDamageCause,
villagerTradeTier, villagerDisplayName, -1);
}

protected void writeMobKilled(ByteBuf buffer, BedrockCodecHelper helper, EventData eventData) {
Expand Down Expand Up @@ -172,7 +172,7 @@ protected void writeCauldronUsed(ByteBuf buffer, BedrockCodecHelper helper, Even
protected PlayerDiedEventData readPlayerDied(ByteBuf buffer, BedrockCodecHelper helper) {
int attackerEntityId = VarInts.readInt(buffer);
int entityDamageCause = VarInts.readInt(buffer);
return new PlayerDiedEventData(attackerEntityId, -1, entityDamageCause, false);
return new PlayerDiedEventData(attackerEntityId, entityDamageCause, -1, false);
}

protected void writePlayerDied(ByteBuf buffer, BedrockCodecHelper helper, EventData eventData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected ResourcePacksInfoPacket.Entry readEntry(ByteBuf buffer, BedrockCodecHe
String contentKey = helper.readString(buffer);
String subPackName = helper.readString(buffer);
String contentId = helper.readString(buffer);
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId, false, false, false, null);
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId, false, false, null, false);
}

protected void writeEntry(ByteBuf buffer, BedrockCodecHelper helper, ResourcePacksInfoPacket.Entry entry, boolean resource) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, StructureBloc
// Structure Editor Data end
boolean boundingBoxVisible = buffer.readBoolean();

StructureSettings settings = new StructureSettings("", ignoreEntities, ignoreBlocks, true, size, offset,
-1, rotation, mirror, StructureAnimationMode.NONE, 0f,
structureIntegrity, integritySeed, Vector3f.ZERO);
StructureEditorData editorData = new StructureEditorData(name, "", dataField, includePlayers, boundingBoxVisible,
structureType, settings, StructureRedstoneSaveMode.SAVES_TO_DISK);
StructureSettings settings = new StructureSettings(ignoreEntities, ignoreBlocks, size, offset, rotation, mirror,
structureIntegrity, integritySeed, "", -1, Vector3f.ZERO, StructureAnimationMode.NONE, 0f, true);
StructureEditorData editorData = new StructureEditorData(name, includePlayers, boundingBoxVisible, structureType,
settings, dataField, StructureRedstoneSaveMode.SAVES_TO_DISK, "");

packet.setEditorData(editorData);
packet.setPowered(buffer.readBoolean());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ public ResourcePacksInfoPacket.Entry readEntry(ByteBuf buffer, BedrockCodecHelpe
String contentId = helper.readString(buffer);
boolean isScripting = buffer.readBoolean();
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId,
isScripting, false, false, null);
isScripting, false, null, false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ public void deserialize(ByteBuf buffer, BedrockCodecHelper helper, StructureBloc
// Structure Editor Data end
boolean boundingBoxVisible = buffer.readBoolean();

StructureSettings settings = new StructureSettings("", ignoreEntities, ignoreBlocks, true, size, offset,
-1, rotation, mirror, StructureAnimationMode.NONE, 0f,
structureIntegrity, integritySeed, Vector3f.ZERO);
StructureEditorData editorData = new StructureEditorData(name, "", dataField, includePlayers, boundingBoxVisible,
structureType, settings, StructureRedstoneSaveMode.SAVES_TO_DISK);
StructureSettings settings = new StructureSettings(ignoreEntities, ignoreBlocks, size, offset, rotation, mirror,
structureIntegrity, integritySeed, "", -1, Vector3f.ZERO, StructureAnimationMode.NONE, 0f, true);
StructureEditorData editorData = new StructureEditorData(name, includePlayers, boundingBoxVisible, structureType,
settings, dataField, StructureRedstoneSaveMode.SAVES_TO_DISK, "");

packet.setEditorData(editorData);
packet.setPowered(buffer.readBoolean());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,8 @@ public StructureSettings readStructureSettings(ByteBuf buffer) {
float integrityValue = buffer.readFloatLE();
int integritySeed = buffer.readIntLE();

return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks, true, size, offset, lastEditedByEntityId,
rotation, mirror, StructureAnimationMode.NONE, 0f, integrityValue, integritySeed,
Vector3f.ZERO);
return new StructureSettings(ignoringEntities, ignoringBlocks, size, offset, rotation, mirror, integrityValue,
integritySeed, paletteName, lastEditedByEntityId, Vector3f.ZERO, StructureAnimationMode.NONE, 0f, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ protected StructureEditorData readEditorData(ByteBuf buffer, BedrockCodecHelper
boolean boundingBoxVisible = buffer.readBoolean();
StructureBlockType type = StructureBlockType.from(VarInts.readInt(buffer));
StructureSettings settings = helper.readStructureSettings(buffer);
return new StructureEditorData(name, "", dataField, includingPlayers, boundingBoxVisible, type, settings,
StructureRedstoneSaveMode.SAVES_TO_DISK);
return new StructureEditorData(name, includingPlayers, boundingBoxVisible, type, settings, dataField,
StructureRedstoneSaveMode.SAVES_TO_DISK, "");
}

protected void writeEditorData(ByteBuf buffer, BedrockCodecHelper helper, StructureEditorData data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ public StructureSettings readStructureSettings(ByteBuf buffer) {
int integritySeed = buffer.readIntLE();
Vector3f pivot = this.readVector3f(buffer);

return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks, true, size, offset, lastEditedByEntityId,
rotation, mirror, StructureAnimationMode.NONE, 0f, integrityValue, integritySeed, pivot);
return new StructureSettings(ignoringEntities, ignoringBlocks, size, offset, rotation, mirror, integrityValue,
integritySeed, paletteName, lastEditedByEntityId, pivot, StructureAnimationMode.NONE, 0f, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ protected MobKilledEventData readMobKilled(ByteBuf buffer, BedrockCodecHelper he
int entityDamageCause = VarInts.readInt(buffer);
int villagerTradeTier = VarInts.readInt(buffer);
String villagerDisplayName = helper.readString(buffer);
return new MobKilledEventData(killerUniqueEntityId, victimUniqueEntityId, killerEntityType, entityDamageCause,
villagerTradeTier, villagerDisplayName);
return new MobKilledEventData(killerUniqueEntityId, victimUniqueEntityId, entityDamageCause,
villagerTradeTier, villagerDisplayName, killerEntityType);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ protected StructureEditorData readEditorData(ByteBuf buffer, BedrockCodecHelper
StructureBlockType type = StructureBlockType.from(VarInts.readInt(buffer));
StructureSettings settings = helper.readStructureSettings(buffer);
StructureRedstoneSaveMode redstoneSaveMode = StructureRedstoneSaveMode.from(VarInts.readInt(buffer));
return new StructureEditorData(name, "", dataField, includingPlayers, boundingBoxVisible, type, settings,
redstoneSaveMode);
return new StructureEditorData(name, includingPlayers, boundingBoxVisible, type, settings, dataField,
redstoneSaveMode, "");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected PlayerDiedEventData readPlayerDied(ByteBuf buffer, BedrockCodecHelper
int attackerVariant = VarInts.readInt(buffer);
int entityDamageCause = VarInts.readInt(buffer);
boolean inRaid = buffer.readBoolean();
return new PlayerDiedEventData(attackerEntityId, attackerVariant, entityDamageCause, inRaid);
return new PlayerDiedEventData(attackerEntityId, entityDamageCause, attackerVariant, inRaid);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public ResourcePacksInfoPacket.Entry readEntry(ByteBuf buffer, BedrockCodecHelpe
boolean isScripting = buffer.readBoolean();
boolean raytracingCapable = resource && buffer.readBoolean();
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId,
isScripting, raytracingCapable, false, null);
isScripting, raytracingCapable, null, false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public StructureSettings readStructureSettings(ByteBuf buffer) {
int integritySeed = buffer.readIntLE();
Vector3f pivot = this.readVector3f(buffer);

return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks, true, size, offset, lastEditedByEntityId,
rotation, mirror, animationMode, animationSeconds, integrityValue, integritySeed, pivot);
return new StructureSettings(ignoringEntities, ignoringBlocks, size, offset, rotation, mirror, integrityValue,
integritySeed, paletteName, lastEditedByEntityId, pivot, animationMode, animationSeconds, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public StructureSettings readStructureSettings(ByteBuf buffer) {
int integritySeed = buffer.readIntLE();
Vector3f pivot = this.readVector3f(buffer);

return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks,
nonTickingPlayersAndTickingAreasEnabled, size, offset, lastEditedByEntityId, rotation, mirror,
animationMode, animationSeconds, integrityValue, integritySeed, pivot);
return new StructureSettings(ignoringEntities, ignoringBlocks, size, offset, rotation, mirror, integrityValue,
integritySeed, paletteName, lastEditedByEntityId, pivot, animationMode, animationSeconds,
nonTickingPlayersAndTickingAreasEnabled);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ protected CommandData readCommand(ByteBuf buffer, BedrockCodecHelper helper, Lis
params[i2] = readParameter(buffer, helper, enums, postfixes, softEnumParameters);
}
}
return new CommandData(name, description, flags, permissions, aliases, subcommands, overloads);
return new CommandData(name, description, flags, permissions, aliases, overloads, subcommands);
}

protected void writeSubCommand(ByteBuf buffer, BedrockCodecHelper helper, List<String> values, ChainedSubCommandData data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public CameraPreset readPreset(ByteBuf buffer, BedrockCodecHelper helper) {

CameraAudioListener listener = helper.readOptional(buffer, null, buf -> CameraAudioListener.values()[buf.readUnsignedByte()]);
OptionalBoolean effects = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, null, null, null, null, listener, effects, null, null, null, null, null, null, null, null, null, null);
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, listener, effects, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public CameraPreset readPreset(ByteBuf buffer, BedrockCodecHelper helper) {

CameraAudioListener listener = helper.readOptional(buffer, null, buf -> CameraAudioListener.values()[buf.readUnsignedByte()]);
OptionalBoolean effects = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, viewOffset, radius, null, null, listener, effects, null, null, null, null, null, null, null, null, null, null);
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, listener, effects, viewOffset, radius, null, null, null, null, null, null, null, null, null, null, null, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public ResourcePacksInfoPacket.Entry readEntry(ByteBuf buffer, BedrockCodecHelpe
boolean isAddonPack = buffer.readBoolean();
boolean raytracingCapable = resource && buffer.readBoolean();
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId,
isScripting, raytracingCapable, isAddonPack, null);
isScripting, raytracingCapable, null, isAddonPack);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ public CameraPreset readPreset(ByteBuf buffer, BedrockCodecHelper helper) {

CameraAudioListener listener = helper.readOptional(buffer, null, buf -> CameraAudioListener.values()[buf.readUnsignedByte()]);
OptionalBoolean effects = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, viewOffset, radius, null, null, listener, effects, rotationSpeed, snapToTarget, entityOffset, null, null, null, null, null, null, null);
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, listener, effects, viewOffset, radius, rotationSpeed, snapToTarget, entityOffset, null, null, null, null, null, null, null, null, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ public CameraPreset readPreset(ByteBuf buffer, BedrockCodecHelper helper) {
CameraAudioListener listener = helper.readOptional(buffer, null, buf -> CameraAudioListener.values()[buf.readUnsignedByte()]);
OptionalBoolean effects = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
OptionalBoolean alignTargetAndCameraForward = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, viewOffset, radius, null, null, listener, effects, rotationSpeed, snapToTarget, entityOffset, horizontalRotationLimit, verticalRotationLimit, continueTargeting, alignTargetAndCameraForward, null, null, null);
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, listener, effects, viewOffset, radius, rotationSpeed, snapToTarget, entityOffset, horizontalRotationLimit, verticalRotationLimit, continueTargeting, alignTargetAndCameraForward, null, null, null, null, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public ResourcePacksInfoPacket.Entry readEntry(ByteBuf buffer, BedrockCodecHelpe
boolean raytracingCapable = resource && buffer.readBoolean();
String cdnUrl = helper.readString(buffer);
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId,
isScripting, raytracingCapable, isAddonPack, cdnUrl);
isScripting, raytracingCapable, cdnUrl, isAddonPack);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public CameraPreset readPreset(ByteBuf buffer, BedrockCodecHelper helper) {
OptionalBoolean alignTargetAndCameraForward = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
CameraAimAssistPreset aimAssist = helper.readOptional(buffer, null, buf -> readCameraAimAssist(buf, helper));

return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, viewOffset, radius, null, null, listener, effects, rotationSpeed, snapToTarget, entityOffset, horizontalRotationLimit, verticalRotationLimit, continueTargeting, alignTargetAndCameraForward, blockListeningRadius, aimAssist, null);
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, listener, effects, viewOffset, radius, rotationSpeed, snapToTarget, entityOffset, horizontalRotationLimit, verticalRotationLimit, continueTargeting, alignTargetAndCameraForward, blockListeningRadius, aimAssist, null, null, null);
}

protected CameraAimAssistPreset readCameraAimAssist(ByteBuf buffer, BedrockCodecHelper helper) {
Expand All @@ -88,4 +88,4 @@ protected void writeCameraAimAssist(ByteBuf buffer, BedrockCodecHelper helper, C
helper.writeOptionalNull(buffer, aimAssist.getAngle(), helper::writeVector2f);
helper.writeOptionalNull(buffer, aimAssist.getDistance(), ByteBuf::writeFloatLE);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ public ResourcePacksInfoPacket.Entry readEntry(ByteBuf buffer, BedrockCodecHelpe
boolean raytracingCapable = resource && buffer.readBoolean();
String cdnUrl = helper.readString(buffer);
return new ResourcePacksInfoPacket.Entry(packId, packVersion, packSize, contentKey, subPackName, contentId,
isScripting, raytracingCapable, isAddonPack, cdnUrl);
isScripting, raytracingCapable, cdnUrl, isAddonPack);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public CameraPreset readPreset(ByteBuf buffer, BedrockCodecHelper helper) {
OptionalBoolean alignTargetAndCameraForward = helper.readOptional(buffer, OptionalBoolean.empty(), buf -> OptionalBoolean.of(buf.readBoolean()));
CameraAimAssistPreset aimAssist = helper.readOptional(buffer, null, buf -> readCameraAimAssist(buf, helper));

return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, viewOffset, radius, minYawLimit, maxYawLimit, listener, effects, rotationSpeed, snapToTarget, entityOffset, horizontalRotationLimit, verticalRotationLimit, continueTargeting, alignTargetAndCameraForward, blockListeningRadius, aimAssist, null);
return new CameraPreset(identifier, parentPreset, pos, yaw, pitch, listener, effects, viewOffset, radius, rotationSpeed, snapToTarget, entityOffset, horizontalRotationLimit, verticalRotationLimit, continueTargeting, alignTargetAndCameraForward, blockListeningRadius, aimAssist, minYawLimit, maxYawLimit, null);
}

protected CameraAimAssistPreset readCameraAimAssist(ByteBuf buffer, BedrockCodecHelper helper) {
Expand All @@ -93,4 +93,4 @@ protected void writeCameraAimAssist(ByteBuf buffer, BedrockCodecHelper helper, C
helper.writeOptionalNull(buffer, aimAssist.getAngle(), helper::writeVector2f);
helper.writeOptionalNull(buffer, aimAssist.getDistance(), ByteBuf::writeFloatLE);
}
}
}
Loading
Loading