Skip to content

Commit

Permalink
im gonna break packsquash guys!
Browse files Browse the repository at this point in the history
  • Loading branch information
LogyBanana committed Jan 13, 2025
1 parent 4c411c9 commit cf2e846
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 22 deletions.
9 changes: 0 additions & 9 deletions .gitconfig

This file was deleted.

17 changes: 4 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Optimize resource pack
name: Optimize and encrypt the resource pack
on: [push]
permissions:
contents: write
Expand All @@ -12,19 +12,10 @@ jobs:
with:
fetch-depth: 0 # A non-shallow repository clone is required
- name: Run PackSquash
uses: ComunidadAylas/PackSquash-action@v4.0.2
uses: ComunidadAylas/PackSquash-action@v4
with:
packsquash_version: latest
options: |
# Optimize the pack in the root repository directory.
# This is the default value for pack_directory when no PackSquash options are defined
pack_directory = 'main'
# Set a custom output file path to work with the generated ZIP file
# without needing to download its artifact in a separate step
output_file_path = '/tmp/pack.zip'
zip_spec_conformance_level = 'disregard'
size_increasing_zip_obfuscation = true
packsquash_version: latest # Uses the latest PackSquash release supported by the action
options: 'packsquash.toml'
- name: Tag and create release
uses: softprops/action-gh-release@v1
with:
Expand Down
6 changes: 6 additions & 0 deletions gitignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Tools
tools/

# Texture assets
*.ase
*.psd
78 changes: 78 additions & 0 deletions packsquash.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
pack_directory = 'main'
output_file_path = '/tmp/pack.zip'
# Global options
recompress_compressed_files = true
zip_compression_iterations = 5
automatic_minecraft_quirks_detection = true
work_around_minecraft_quirks = ['grayscale_images_gamma_miscorrection', 'restrictive_banner_layer_texture_format_check', 'bad_entity_eye_layer_texture_transparency_blending', 'java8_zip_parsing']
automatic_asset_types_mask_detection = true
allow_mods = ['OptiFine', 'Minecraft Transit Railway 3']
validate_pack_metadata_file = true
ignore_system_and_hidden_files = false
zip_spec_conformance_level = 'disregard'
size_increasing_zip_obfuscation = true
percentage_of_zip_structures_tuned_for_obfuscation_discretion = 100
never_store_squash_times = true
# System dependent values
threads = 4
spooling_buffers_size = 256 # MiB

# --- Per-file options ---

# Ogg files do not get transcoded
['**/*?.ogg']
transcode_ogg = false

# JSON files with comments get prettified and nothing is removed from them
['**/*?.jsonc']
minify_json = false
delete_bloat_keys = false

# Do not allow comments in any JSON file.
# Comments may be an useful JSON extension for documentation purposes, so
# please avoid blindly copying and pasting this unless you really want to
# limit their usage to .jsonc, .jemc, .jpmc, .mcmetac and .bbmodelc files!
['**/*?.{json,jem,jpm,mcmeta,bbmodel}']
always_allow_json_comments = false

# Quantize big natural-looking image, doing the highest quality dither
['assets/craftmine/textures/landscape.png']
color_quantization_target = 'eight_bit_depth'
color_quantization_dithering_level = 1


['**/*?.png']
image_data_compression_iterations = 15
color_quantization_target = 'none'
skip_alpha_optimizations = true
maximum_width_and_height = 4096

# Don't minify shaders
['**/*?.{fsh,vsh,glsl}']
shader_source_transformation_strategy = 'keep_as_is'
# minify_shader = false
# keep_shader = true

# Don't touch Minecraft 1.12.2 or older language files
['**/*?.lang']
minify_legacy_language = false
strip_legacy_language_bom = false

# Don't minify properties files
['**/*?.properties']
minify_properties = false

# Don't minify an example command function.
# Note that command functions are only accepted in data packs, and
# data packs do not contain other file types shown throughout this
# example file!
['data/craftmine/functions/main.mcfunction']
minify_command_function = false

# Include copyright and authorship information files in any directory.
# More information:
# https://www.gnu.org/prep/maintain/html_node/License-Notices.html
# https://www.gnu.org/prep/maintain/html_node/Recording-Contributors.html
['**/{COPYING,AUTHORS}']
['assets/atlases/*?.json']
force_include = true

0 comments on commit cf2e846

Please sign in to comment.