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

feat: jar size reduction #2014

Closed

Conversation

rhysdh540
Copy link

@rhysdh540 rhysdh540 commented Jan 28, 2024

changes

  • compressed all png images with ect and oxipng
  • compressed all sounds with optivorbis
  • added a small script that minifies json files and re-zips the jar with java/zlib's highest compression setting
  • removed datagen .cache/ folder from jar

should save at least 2-3 megabytes, probably more when combined with The-Aether-Team/Nitrogen#21

I didn't realize that there was a commit naming policy, if necessary I can redo this, but squashing this pr should fix it anyways


I agree to the Contributor License Agreement (CLA).

@bconlon1
Copy link
Contributor

I can't check this out at the moment, but do block textures like leaves still have their transparent cutout parts made black when opaque with fast graphics? That has been an issue in the past with texture optimization attempts.

@rhysdh540
Copy link
Author

They do.
leaves
(the berry bush not becoming opaque also happens with the non-pr branch)

@bconlon1 bconlon1 added the status/pending-review The issue references a pull request which is pending review. label Jan 28, 2024
apparently it's really easy to do without external things
temporary files begone
@bconlon1 bconlon1 added the priority/high This issue is of high priority to fix. label Feb 28, 2024
@bconlon1
Copy link
Contributor

Apologies for not having been able to get around to reviewing this yet. We've been in the middle of a porting period which has been taking longer than expected, so I plan to look more in-depth at this after we release the 1.20.4 port and focus on the 1.5.0 update milestone.

@mrjasonn

This comment was marked as resolved.

@rhysdh540
Copy link
Author

sorry! it should be more accurate now.

build.gradle Outdated Show resolved Hide resolved
Copy link
Contributor

@mrjasonn mrjasonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also suggest you can switch the branch to 1.20.4 and account for the updated textures that need to be compressed such as the updated berry bush texture

@rhysdh540
Copy link
Author

Should I do that by creating a new PR or by switching the branch on this one and merging everything?

@mrjasonn
Copy link
Contributor

mrjasonn commented Apr 25, 2024

Should I do that by creating a new PR or by switching the branch on this one and merging everything?

Switching branch and merge everything then encompass new things and updated things etc (just would be my personal preference)

…velop

# Conflicts:
#	src/main/resources/assets/aether/textures/block/natural/berry_bush.png
#	src/main/resources/assets/aether/textures/block/natural/potted_berry_bush.png
#	src/main/resources/assets/aether/textures/block/natural/potted_berry_bush_stem.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle_emissive.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_saddle.png
#	src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_saddle.png
bconlon1 added a commit that referenced this pull request Jun 19, 2024
@bconlon1
Copy link
Contributor

Ended up implementing a different implementation of the first iteration of this as #2196. Keeping the image optimizations to the script instead of manually updating them on the repository is better for future-proofing, and the sound designers are more in charge of the audio optimizations. Using the machete plugin will also likely be better for maintainability from its simplicity.

@bconlon1 bconlon1 closed this Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/high This issue is of high priority to fix. status/pending-review The issue references a pull request which is pending review.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants