Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase size caps in some places (animation size, geometry size etc.) #231

Merged
merged 2 commits into from
Jun 6, 2024
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 @@ -77,7 +77,7 @@ public void writeSkin(ByteBuf buffer, SerializedSkin skin) {

@Override
public AnimationData readAnimationData(ByteBuf buffer) {
ImageData image = this.readImage(buffer, ImageData.SKIN_128_128_SIZE);
ImageData image = this.readImage(buffer, ImageData.ANIMATION_SIZE);
AnimatedTextureType type = TEXTURE_TYPES[buffer.readIntLE()];
float frames = buffer.readFloatLE();
return new AnimationData(image, type, frames);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void writeExperiments(ByteBuf buffer, List<ExperimentData> experiments) {

@Override
public AnimationData readAnimationData(ByteBuf buffer) {
ImageData image = this.readImage(buffer, ImageData.SKIN_128_128_SIZE);
ImageData image = this.readImage(buffer, ImageData.ANIMATION_SIZE);
AnimatedTextureType textureType = TEXTURE_TYPES[buffer.readIntLE()];
float frames = buffer.readFloatLE();
AnimationExpressionType expressionType = EXPRESSION_TYPES[buffer.readIntLE()];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class EncodingSettings {
.maxByteArraySize(1024 * 1024 * 20) // 20MB
.maxNetworkNBTSize(1024 * 1024 * 10) // 10MB
.maxItemNBTSize(1024 * 1024 * 5) // 5MB
.maxStringLength(1024 * 1024) // 1MB
.maxStringLength(1024 * 1024 * 2) // 2MB
.build();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class ImageData {
public static final int SKIN_128_64_SIZE = 128 * 64 * PIXEL_SIZE;
public static final int SKIN_128_128_SIZE = 128 * 128 * PIXEL_SIZE;
public static final int SKIN_PERSONA_SIZE = 256 * 256 * PIXEL_SIZE;
public static final int ANIMATION_SIZE = 1024 * 1024; // 1 MB

private final int width;
private final int height;
Expand Down