Skip to content

Commit

Permalink
Increase size caps in some places (animation size, geometry size etc.) (
Browse files Browse the repository at this point in the history
  • Loading branch information
Alemiz112 authored Jun 6, 2024
2 parents 362ae8a + 355a172 commit cb1bdd6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
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

0 comments on commit cb1bdd6

Please sign in to comment.