diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..722d5e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode diff --git a/.packwizignore b/.packwizignore index dd4d8b3..7e2f179 100644 --- a/.packwizignore +++ b/.packwizignore @@ -1,2 +1 @@ -compose.yaml -exports \ No newline at end of file +assets diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ab3a3cc --- /dev/null +++ b/Makefile @@ -0,0 +1,74 @@ +GRISTS = build agricultural intelligent energetic primordeal universal +RANKS = basic improved radiant + +GRIST_HUE_build = 203 +GRIST_HUE_agricultural = 40 +GRIST_HUE_intelligent = 77 +GRIST_HUE_energetic = 0 +GRIST_HUE_primordeal = 280 +GRIST_HUE_universal = 0 + +GRIST_VALUE_basic = 128 +GRIST_VALUE_improved = 199 +GRIST_VALUE_radiant = 255 + +GRIST_VALUE_basic_universal = 120 +GRIST_VALUE_improved_universal = 160 +GRIST_VALUE_radiant_universal = 190 + +GRIST_SATURATION_universal = 100 + +BLOCKS = kubejs/assets/malloc/textures/block +ITEMS = kubejs/assets/malloc/textures/item + +TEXTURES = $(foreach element,$(GRISTS),$(foreach rank,$(RANKS), grist_$(rank)_$(element).png)) + +ITEM_TEXTURES = $(addprefix $(ITEMS)/,$(TEXTURES)) +BLOCK_TEXTURES = $(addprefix $(BLOCKS)/,$(TEXTURES)) + +.PHONY: all + +all: $(ITEM_TEXTURES) $(BLOCK_TEXTURES) + +$(BLOCKS)/grist_basic_%.png: assets/textures/block/grist.png Makefile + if [ $* = "universal" ]; then \ + magick $< -modulate $(GRIST_VALUE_basic_universal),$(GRIST_SATURATION_universal) $@; \ + else \ + magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_basic))" -tint 100 $@; \ + fi + +$(BLOCKS)/grist_improved_%.png: assets/textures/block/grist.png Makefile + if [ $* = "universal" ]; then \ + magick $< -modulate $(GRIST_VALUE_improved_universal),$(GRIST_SATURATION_universal) $@; \ + else \ + magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_improved))" -tint 100 $@; \ + fi + +$(BLOCKS)/grist_radiant_%.png: assets/textures/block/grist.png Makefile + if [ $* = "universal" ]; then \ + magick $< -modulate $(GRIST_VALUE_radiant_universal),$(GRIST_SATURATION_universal) $@; \ + else \ + magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_radiant))" -tint 100 $@; \ + fi + +$(ITEMS)/grist_basic_%.png: assets/textures/item/grist_basic.png Makefile + if [ $* = "universal" ]; then \ + magick $< -modulate $(GRIST_VALUE_basic_universal),$(GRIST_SATURATION_universal) $@; \ + else \ + magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_basic))" -tint 100 $@; \ + fi + + +$(ITEMS)/grist_improved_%.png: assets/textures/item/grist_improved.png Makefile + if [ $* = "universal" ]; then \ + magick $< -modulate $(GRIST_VALUE_improved_universal),$(GRIST_SATURATION_universal) $@; \ + else \ + magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_improved))" -tint 100 $@; \ + fi + +$(ITEMS)/grist_radiant_%.png: assets/textures/item/grist_radiant.png Makefile + if [ $* = "universal" ]; then \ + magick $< -modulate $(GRIST_VALUE_radiant_universal),$(GRIST_SATURATION_universal) $@; \ + else \ + magick $< -fill "hsv(${GRIST_HUE_${*}}, 255, $(GRIST_VALUE_radiant))" -tint 100 $@; \ + fi \ No newline at end of file diff --git a/assets/textures/block/grist.png b/assets/textures/block/grist.png new file mode 100644 index 0000000..7c2bc86 Binary files /dev/null and b/assets/textures/block/grist.png differ diff --git a/kubejs/assets/malloc/textures/item/grist_basic.png b/assets/textures/item/grist_basic.png similarity index 100% rename from kubejs/assets/malloc/textures/item/grist_basic.png rename to assets/textures/item/grist_basic.png diff --git a/kubejs/assets/malloc/textures/item/grist_improved.png b/assets/textures/item/grist_improved.png similarity index 100% rename from kubejs/assets/malloc/textures/item/grist_improved.png rename to assets/textures/item/grist_improved.png diff --git a/kubejs/assets/malloc/textures/item/grist_radiant.png b/assets/textures/item/grist_radiant.png similarity index 100% rename from kubejs/assets/malloc/textures/item/grist_radiant.png rename to assets/textures/item/grist_radiant.png diff --git a/index.toml b/index.toml index eb24afa..7797c95 100644 --- a/index.toml +++ b/index.toml @@ -1,5 +1,13 @@ hash-format = "sha256" +[[files]] +file = "Makefile" +hash = "9d3e49c2786e4f668afb6b0b3061c3547949b7edb1013be066903f6ce87b9721" + +[[files]] +file = "compose.yaml" +hash = "e4d93964cb1ab3cc6f49a55307851e731ef07d56b076b746184b9f9644b6e814" + [[files]] file = "config/alexsmobs.toml" hash = "a60442351eb4a2fb2c74d4a7c62fd25d32faca43c0f192a1c261c13db9a71551" @@ -180,27 +188,19 @@ hash = "2a5a7e97cc8b21baa4a3f4b06fb48383abe8638f50b0138d3127ef22f6deb010" file = "defaultconfigs/weaponleveling-server.toml" hash = "0381c2b141fe6bf4bdb0fa1d7687b62da7e7e6500259c10951a7ad7963a8564f" +[[files]] +file = "exports/.gitkeep" +hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + +[[files]] +file = "exports/Malloc S4 Dev.zip" +hash = "7ef905ff57d9118cbcce52b4fad5211c57ecd75f6210fae8f6da42290bd123cf" + [[files]] file = "global_packs/required_data/repurposed-structures-irons-spells-n-spellbooks-compat.pw.toml" hash = "562849ad56d6b05b72495560233703827582608c7b5c9e301090f3d1e4089fb6" metafile = true -[[files]] -file = "kubejs/assets/malloc/textures/block/grist.png" -hash = "fb7c934a50e8fc07bce606f209e77df91b502ee6a85f55fd83f94c464b840e6d" - -[[files]] -file = "kubejs/assets/malloc/textures/item/grist_basic.png" -hash = "cb71e0ca5854602cdafb40caedb8eeb105e77d684e3aa50f345256c598d69fef" - -[[files]] -file = "kubejs/assets/malloc/textures/item/grist_improved.png" -hash = "174698fce79cae4e03cbeada41f234952910f4782b47d92f42a7dc5807e7a764" - -[[files]] -file = "kubejs/assets/malloc/textures/item/grist_radiant.png" -hash = "3251b72c91de9ea34d5269517598c5a77be52da822b530f232fa280aa38e47f1" - [[files]] file = "kubejs/client_scripts/jsconfig.json" hash = "dee1340c5e7927f5675987957c6b198f9ca2e1e731291d72396278dddc066a04" diff --git a/kubejs/assets/malloc/textures/block/.gitignore b/kubejs/assets/malloc/textures/block/.gitignore new file mode 100644 index 0000000..e38a32d --- /dev/null +++ b/kubejs/assets/malloc/textures/block/.gitignore @@ -0,0 +1 @@ +grist_*.png diff --git a/kubejs/assets/malloc/textures/block/grist.png b/kubejs/assets/malloc/textures/block/grist.png deleted file mode 100755 index f287887..0000000 Binary files a/kubejs/assets/malloc/textures/block/grist.png and /dev/null differ diff --git a/kubejs/assets/malloc/textures/item/.gitignore b/kubejs/assets/malloc/textures/item/.gitignore new file mode 100644 index 0000000..e38a32d --- /dev/null +++ b/kubejs/assets/malloc/textures/item/.gitignore @@ -0,0 +1 @@ +grist_*.png diff --git a/kubejs/startup_scripts/grist.js b/kubejs/startup_scripts/grist.js index 344d3b6..c58ffde 100755 --- a/kubejs/startup_scripts/grist.js +++ b/kubejs/startup_scripts/grist.js @@ -5,8 +5,7 @@ StartupEvents.registry('block', e => { e.create(grist.id()) .displayName(grist.displayName()) .tagBlock('mineable/pickaxe') - .textureAll(grist.blockTexture()) - .color(0, grist.color()); + .textureAll(grist.blockTexture()); }); }); @@ -18,8 +17,7 @@ StartupEvents.registry('item', e => { .displayName(grist.displayName()) .rarity('rare') .fireResistant(true) - .textureJson({layer0: grist.itemTexture()}) - .color(0, grist.color()); + .textureJson({layer0: grist.itemTexture()}); }); }); diff --git a/kubejs/startup_scripts/init.js b/kubejs/startup_scripts/init.js index b7c646a..3a8966b 100755 --- a/kubejs/startup_scripts/init.js +++ b/kubejs/startup_scripts/init.js @@ -218,11 +218,11 @@ Grist.prototype.toJson = function() { }; Grist.prototype.itemTexture = function() { - return `malloc:item/grist_${this.tier.name}`; + return `malloc:item/grist_${this.tier.name}_${this.element.name}`; }; Grist.prototype.blockTexture = function() { - return 'malloc:block/grist'; + return `malloc:block/grist_${this.tier.name}_${this.element.name}`; }; global.Grist = Grist; \ No newline at end of file diff --git a/pack.toml b/pack.toml index e5e6d7d..aac0824 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "cf85b20a7837c30b3997021086b754414e68974d6e6040e43656ff6a17a6d028" +hash = "3defe698f1e46a1a53a5f51c843e1b34ea451647031575a0d08a43c095c1c51f" [versions] forge = "47.4.0"