From e7382036d913a06ab5e181c57b12981b9fc23acf Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Sat, 5 Nov 2022 15:02:59 -0400 Subject: [PATCH 1/2] Fix z-fighting and use forge render type format Closes #163 --- .../8f7cd5c924d3264b7777ef1696459761f9a70902 | 14 +-- .../d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 | 34 +++---- .../models/block/akashic_bookshelf.json | 68 ++++++++++++++ .../models/block/akashic_record.json | 87 ++++++++++++++++++ .../models/block/amethyst_edified_leaves.json | 3 +- .../block/aventurine_edified_leaves.json | 3 +- .../models/block/citrine_edified_leaves.json | 3 +- .../hexcasting/models/block/conjured.json | 3 +- .../block/edified_door_bottom_left.json | 3 +- .../block/edified_door_bottom_left_open.json | 3 +- .../block/edified_door_bottom_right.json | 3 +- .../block/edified_door_bottom_right_open.json | 3 +- .../models/block/edified_door_top_left.json | 3 +- .../block/edified_door_top_left_open.json | 3 +- .../models/block/edified_door_top_right.json | 3 +- .../block/edified_door_top_right_open.json | 3 +- .../models/block/edified_trapdoor_bottom.json | 3 +- .../models/block/edified_trapdoor_open.json | 3 +- .../models/block/edified_trapdoor_top.json | 3 +- .../assets/hexcasting/models/item/focus.json | 2 +- .../hexcasting/models/item/focus_filled.json | 2 +- .../hexcasting/models/item/focus_sealed.json | 2 +- .../hexcasting/models/item/spellbook.json | 2 +- .../models/item/spellbook_filled.json | 2 +- .../models/item/spellbook_sealed.json | 2 +- .../models/block/akashic_bookshelf.json | 32 ------- .../models/block/akashic_record.json | 67 -------------- .../models/block/amethyst_sconce.json | 1 + .../hexcasting/textures/item/focus_base.png | Bin 0 -> 417 bytes .../textures/item/focus_base_sealed.png | Bin 0 -> 305 bytes .../item/{focus.png => focus_empty.png} | Bin .../textures/item/spellbook_base.png | Bin 0 -> 3075 bytes .../textures/item/spellbook_base_sealed.png | Bin 0 -> 3086 bytes .../{spellbook.png => spellbook_empty.png} | Bin .../textures/item/spellbook_overlay.png | Bin 2797 -> 2799 bytes .../xplat/HexBlockStatesAndModels.java | 48 ++++++++-- .../forge/datagen/xplat/HexItemModels.java | 65 +++++++------ .../forge/xplat/ForgeClientXplatImpl.java | 4 +- 38 files changed, 298 insertions(+), 179 deletions(-) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/akashic_bookshelf.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/akashic_record.json delete mode 100644 Common/src/main/resources/assets/hexcasting/models/block/akashic_bookshelf.json delete mode 100644 Common/src/main/resources/assets/hexcasting/models/block/akashic_record.json create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/focus_base.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/focus_base_sealed.png rename Common/src/main/resources/assets/hexcasting/textures/item/{focus.png => focus_empty.png} (100%) create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/spellbook_base.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/spellbook_base_sealed.png rename Common/src/main/resources/assets/hexcasting/textures/item/{spellbook.png => spellbook_empty.png} (100%) diff --git a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 index ec3bd20f..8a23b294 100644 --- a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 +++ b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 @@ -1,4 +1,4 @@ -// 1.19.2 2022-11-04T11:49:15.7613829 Item Models: hexcasting +// 1.19.2 2022-11-05T14:56:40.628663 Item Models: hexcasting f2156b3a7041cf99891b528393db64c6b9ca1a4f assets/hexcasting/models/item/abacus.json 783d8454d6b74f926be0d3e02d87c6505e9d76d0 assets/hexcasting/models/item/acacia_staff.json 19730853397b109cfedd0c3bbda83d5de6cd15b9 assets/hexcasting/models/item/akashic_record.json @@ -41,9 +41,9 @@ c9faada6299f388afc2d2798843d2b45159950d1 assets/hexcasting/models/item/edified_d 2584421c2e9e1cdf22a703018b54cf449613d7d9 assets/hexcasting/models/item/edified_stairs.json ae58c5b7c304d33cbde60caf44a4c4ee4ec1a633 assets/hexcasting/models/item/edified_trapdoor.json 084183e4351973c8165f6f459c0f0dba2463d957 assets/hexcasting/models/item/edified_wood.json -65fe891f55bc2284690cb1e294cf92dc86dacc7f assets/hexcasting/models/item/focus.json -19b3474a96fa5631ed2a36c6f72cd8853ae4b3cc assets/hexcasting/models/item/focus_filled.json -f7f67f4dce21cdd309ae3dae665e4fb141bded30 assets/hexcasting/models/item/focus_sealed.json +7659d7b7bf93deba4c55405c29b8fa6b8b810ac1 assets/hexcasting/models/item/focus.json +947d1539d88f9d6fd0afcdf831f4327356d19baf assets/hexcasting/models/item/focus_filled.json +cb2d973af25a2ec07e6094ecc106c896a06918dc assets/hexcasting/models/item/focus_sealed.json 6ec61fea7d8c49cc0c45b64857fd926451b4845f assets/hexcasting/models/item/jeweler_hammer.json e8ce683966f007b56cc551b3137c77f0a1fe2d9a assets/hexcasting/models/item/jungle_staff.json abfc028c974a02780aed3d7a5859352503bbd920 assets/hexcasting/models/item/lens.json @@ -94,9 +94,9 @@ c809785d09b2545dac68d4a10b1e576454dd51e7 assets/hexcasting/models/item/scroll_sm 9b82beea7667a8f9de3d1e8df136bb2034ed51a8 assets/hexcasting/models/item/slate.json 612d4c65fb907c75975659edf00c7d92bf1b43d8 assets/hexcasting/models/item/slate_blank.json e6452f95b60240e0067769d7f32a0b9fa7718a1b assets/hexcasting/models/item/slate_written.json -a36727102e1debfd1839a8f9e4e9107b8470658e assets/hexcasting/models/item/spellbook.json -162687ccff4ea2a140883fc708b8bb5c781a4791 assets/hexcasting/models/item/spellbook_filled.json -af553b3d434c3db667329338735393912c7866d7 assets/hexcasting/models/item/spellbook_sealed.json +986674763b45e0f9381f9f34a708082e5230652a assets/hexcasting/models/item/spellbook.json +f962c13ab9e299885387cee35b16006651821e81 assets/hexcasting/models/item/spellbook_filled.json +c29e6e7b2168eeeb13b1fc3e93ffc3e0c9bd11ce assets/hexcasting/models/item/spellbook_sealed.json 7f03c6ea7a07cfedc7d580bb9ba5fcdc54cccb86 assets/hexcasting/models/item/spruce_staff.json d6ebc87cb0fa6f86bee3a4eade7329ebb0cf2d38 assets/hexcasting/models/item/stripped_edified_log.json ea3f18f75776022127f3a108119e3f7a5c211c0f assets/hexcasting/models/item/stripped_edified_wood.json diff --git a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 index 9c68186b..21019dee 100644 --- a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 +++ b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 @@ -1,4 +1,4 @@ -// 1.19.2 2022-11-04T11:49:15.7663843 Block States: hexcasting +// 1.19.2 2022-11-05T14:30:43.69127 Block States: hexcasting 901e38574bdaa40ea4a0f6e773a88a95d9c03e55 assets/hexcasting/blockstates/akashic_bookshelf.json 32a77ef668198002563d68be35a24fa93c8d454a assets/hexcasting/blockstates/akashic_connector.json 85080ce0a0387583a839e4788517d675a1a35e24 assets/hexcasting/blockstates/akashic_record.json @@ -35,30 +35,32 @@ ef6b44bd2360926cb9dcde5bb3f1380385acea90 assets/hexcasting/blockstates/slate.jso 571fe1d5dfdfd9dacd88bc6d04b1a10e01920bd9 assets/hexcasting/blockstates/slate_block.json 13fc293e23c575b19f81f9c4bcd7131d2c34f678 assets/hexcasting/blockstates/stripped_edified_log.json d66dd72dfbc57537c39d98cf221cc0bfd108dc47 assets/hexcasting/blockstates/stripped_edified_wood.json +b2f3c31e92c7ce6d5b42d95d7ece82b898a9f4f7 assets/hexcasting/models/block/akashic_bookshelf.json 4e925a9a46bd486e5d245dc88911ea57ef0b6319 assets/hexcasting/models/block/akashic_bookshelf_1.json 1a61088aa8efb77c9132bcd3fc69b1d7b9536603 assets/hexcasting/models/block/akashic_bookshelf_2.json 25f6c17cd7b73a83a86e4c15389722d7abfe737e assets/hexcasting/models/block/akashic_bookshelf_3.json d3b9ed0fd896d96d9bf571ccf3e37d1101e5c162 assets/hexcasting/models/block/akashic_bookshelf_4.json 12871356fc4ecaff1247b7350de79b8783cec96c assets/hexcasting/models/block/akashic_bookshelf_empty.json 215f340a583d72345410c21c43691cd2d8c86724 assets/hexcasting/models/block/akashic_ligature.json +e2a738dede302484f7c8d19dde58c08f841f0432 assets/hexcasting/models/block/akashic_record.json 218a4e73a221eae6b0da7ecdd7f64c0532be46ee assets/hexcasting/models/block/amethyst_dust_block.json -922686586b6eb932d05c094ccdf8269fae0190d3 assets/hexcasting/models/block/amethyst_edified_leaves.json +031fefc08eaad4f0d5b7b4b23a0f311f5b5b84b4 assets/hexcasting/models/block/amethyst_edified_leaves.json a01a3f7c666a611dbf675b66eea2087d435e99d9 assets/hexcasting/models/block/amethyst_tiles.json c0a2818ae1162e8b93d32a913602ba8523476695 assets/hexcasting/models/block/ancient_scroll_paper.json 77d0a5c4496678f96da5103b49777e612e3cba1e assets/hexcasting/models/block/ancient_scroll_paper_lantern.json -bf2ac4bb632b79584105cd97da8bff4277f82883 assets/hexcasting/models/block/aventurine_edified_leaves.json -c2b44b5c2221789ef82f7fdff20da174fe9d490c assets/hexcasting/models/block/citrine_edified_leaves.json -3fcdaeb2f5addc90e290fef3ebe5e12805ace0ca assets/hexcasting/models/block/conjured.json +8b6de8cb9ccea9a8e4ce207f0b72048881c11da9 assets/hexcasting/models/block/aventurine_edified_leaves.json +7b47963b4fb1598595cc972f8ac6a38d542c6cf8 assets/hexcasting/models/block/citrine_edified_leaves.json +8b556039d842c21d8cb4cb902aaa5ab6f657a566 assets/hexcasting/models/block/conjured.json d04e6e7976a44e4286f0693a0ea173bc08525c6d assets/hexcasting/models/block/edified_button.json 79b149288702e1239dee1f94f8562f8c37410d14 assets/hexcasting/models/block/edified_button_pressed.json -01f69ba1c6fa772d2ce27b208bb70ed2657535a1 assets/hexcasting/models/block/edified_door_bottom_left.json -b211bc9cb6ee06cb81a33d8e6350fb6de6b01fb5 assets/hexcasting/models/block/edified_door_bottom_left_open.json -1baf7ed7c9ef61ed9105d7c0038ebc1ba3339a40 assets/hexcasting/models/block/edified_door_bottom_right.json -346813b29069fa8e19164a660d9179e47fd87a6d assets/hexcasting/models/block/edified_door_bottom_right_open.json -cf55585376d16ae26009cb07b063f4ef23e56d50 assets/hexcasting/models/block/edified_door_top_left.json -ae5f925b138c9f3039f0399624396a3b36eb9627 assets/hexcasting/models/block/edified_door_top_left_open.json -f02f9f92d14d1848f8e41d431ae72f60e6b3acf4 assets/hexcasting/models/block/edified_door_top_right.json -a2e8a3612226f36f53f63b4e9b43e4956575726c assets/hexcasting/models/block/edified_door_top_right_open.json +b13efe9e1aade0163a8d378184a19a639b98c460 assets/hexcasting/models/block/edified_door_bottom_left.json +1e138fe4503fa0d37713ff5b76e8ff82090e8e8e assets/hexcasting/models/block/edified_door_bottom_left_open.json +3d001d0388fd3287ad14dca7eac1581c5ce75b0c assets/hexcasting/models/block/edified_door_bottom_right.json +9dd09e2267b2ae77314c86b1ea1c7406b5b25ce2 assets/hexcasting/models/block/edified_door_bottom_right_open.json +5525ac927fa8165243862504325be6219b40a968 assets/hexcasting/models/block/edified_door_top_left.json +11922c18e84d393bc99380d52c187bbaa6079359 assets/hexcasting/models/block/edified_door_top_left_open.json +729cf57ba13bf915999b4297aadb2ef6848d0337 assets/hexcasting/models/block/edified_door_top_right.json +db3008a51e611ee3ffb86b5829df6b7da6bfcc61 assets/hexcasting/models/block/edified_door_top_right_open.json c5433d0b5c9f039ae3c314c8a82c7e1d3238447d assets/hexcasting/models/block/edified_log.json 71f1505d8255e1d57b8a9100b008dbaf73beacdc assets/hexcasting/models/block/edified_log_horizontal.json e691e8592c9ba75a2c67979ebef11e1c9280075b assets/hexcasting/models/block/edified_panel.json @@ -73,9 +75,9 @@ dfd5d21b09dea57135e50dc025a1652c9eb74a29 assets/hexcasting/models/block/edified_ fbd8b3a4e77e4488e25e5b49e4ef7dcb73eb4785 assets/hexcasting/models/block/edified_stairs_inner.json f0100add1e9997b68bc2e910da63e5a772959486 assets/hexcasting/models/block/edified_stairs_outer.json e76164c5fd831acccf914c7f05d7fe9639c27c30 assets/hexcasting/models/block/edified_tile.json -c8275464703da726ab683f7c01bacd8248138fbd assets/hexcasting/models/block/edified_trapdoor_bottom.json -79cb6d21c9d8e6cb338a19cc391f2bb90d45be75 assets/hexcasting/models/block/edified_trapdoor_open.json -09eb09e1312da4deec21878bd688ee776b2316d9 assets/hexcasting/models/block/edified_trapdoor_top.json +abca4332771fe0c3e24b6624907b3206d8cb02f4 assets/hexcasting/models/block/edified_trapdoor_bottom.json +807d363ca1fffe9af1c40319a8c2338822b54f31 assets/hexcasting/models/block/edified_trapdoor_open.json +ba95ea7a856895ca2a3438293b79fe4798b212ad assets/hexcasting/models/block/edified_trapdoor_top.json d4f286180e320c0ca819067b9e9a9b1db7f72e0a assets/hexcasting/models/block/edified_wood.json b2e1617c6549ffdf0a38bfbb6e9270a54c7a2718 assets/hexcasting/models/block/edified_wood_horizontal.json ce5a129137f8783bcec10017b8511c6e547be790 assets/hexcasting/models/block/empty_directrix_dim_x.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/akashic_bookshelf.json b/Common/src/generated/resources/assets/hexcasting/models/block/akashic_bookshelf.json new file mode 100644 index 00000000..dfd9013c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/akashic_bookshelf.json @@ -0,0 +1,68 @@ +{ + "elements": [ + { + "faces": { + "down": { + "cullface": "down", + "texture": "#top_bottom" + }, + "east": { + "cullface": "east", + "texture": "#side" + }, + "north": { + "cullface": "north", + "texture": "#front" + }, + "south": { + "cullface": "south", + "texture": "#side" + }, + "up": { + "cullface": "up", + "texture": "#top_bottom" + }, + "west": { + "cullface": "west", + "texture": "#side" + } + }, + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ] + }, + { + "faces": { + "north": { + "cullface": "north", + "texture": "#overlay", + "tintindex": 0 + } + }, + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ] + } + ], + "render_type": "minecraft:cutout", + "textures": { + "front": "hexcasting:block/akashic_bookshelf", + "particle": "hexcasting:block/akashic_bookshelf_vert", + "side": "hexcasting:block/akashic_bookshelf_horiz", + "top_bottom": "hexcasting:block/akashic_bookshelf_vert" + } +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/akashic_record.json b/Common/src/generated/resources/assets/hexcasting/models/block/akashic_record.json new file mode 100644 index 00000000..099f9920 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/akashic_record.json @@ -0,0 +1,87 @@ +{ + "parent": "minecraft:block/block", + "elements": [ + { + "faces": { + "down": { + "cullface": "down", + "texture": "#outer" + }, + "east": { + "cullface": "east", + "texture": "#outer" + }, + "north": { + "cullface": "north", + "texture": "#outer" + }, + "south": { + "cullface": "south", + "texture": "#outer" + }, + "up": { + "cullface": "up", + "texture": "#outer" + }, + "west": { + "cullface": "west", + "texture": "#outer" + } + }, + "from": [ + 0, + 0, + 0 + ], + "to": [ + 16, + 16, + 16 + ] + }, + { + "faces": { + "down": { + "rotation": 180, + "texture": "#inner" + }, + "east": { + "rotation": 180, + "texture": "#inner" + }, + "north": { + "rotation": 180, + "texture": "#inner" + }, + "south": { + "rotation": 180, + "texture": "#inner" + }, + "up": { + "rotation": 180, + "texture": "#inner" + }, + "west": { + "rotation": 180, + "texture": "#inner" + } + }, + "from": [ + 15.75, + 15.75, + 15.75 + ], + "to": [ + 0.25, + 0.25, + 0.25 + ] + } + ], + "render_type": "minecraft:translucent", + "textures": { + "inner": "hexcasting:block/akashic_ligature", + "outer": "hexcasting:block/akashic_record", + "particle": "hexcasting:block/akashic_ligature" + } +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/amethyst_edified_leaves.json b/Common/src/generated/resources/assets/hexcasting/models/block/amethyst_edified_leaves.json index 6e74280d..1430430c 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/amethyst_edified_leaves.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/amethyst_edified_leaves.json @@ -1,6 +1,7 @@ { "parent": "minecraft:block/leaves", + "render_type": "minecraft:cutout_mipped", "textures": { "all": "hexcasting:block/amethyst_edified_leaves" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/aventurine_edified_leaves.json b/Common/src/generated/resources/assets/hexcasting/models/block/aventurine_edified_leaves.json index ca3fe396..96c1a5ee 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/aventurine_edified_leaves.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/aventurine_edified_leaves.json @@ -1,6 +1,7 @@ { "parent": "minecraft:block/leaves", + "render_type": "minecraft:cutout_mipped", "textures": { "all": "hexcasting:block/aventurine_edified_leaves" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/citrine_edified_leaves.json b/Common/src/generated/resources/assets/hexcasting/models/block/citrine_edified_leaves.json index 456ba972..37ff29d3 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/citrine_edified_leaves.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/citrine_edified_leaves.json @@ -1,6 +1,7 @@ { "parent": "minecraft:block/leaves", + "render_type": "minecraft:cutout_mipped", "textures": { "all": "hexcasting:block/citrine_edified_leaves" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/conjured.json b/Common/src/generated/resources/assets/hexcasting/models/block/conjured.json index 4e90fd01..1844be1d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/conjured.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/conjured.json @@ -1,5 +1,6 @@ { + "render_type": "minecraft:cutout", "textures": { "particle": "minecraft:block/amethyst_block" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left.json index 24c0ceeb..13c75114 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_bottom_left", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left_open.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left_open.json index 212a8c1b..3c6b57c8 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left_open.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_left_open.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_bottom_left_open", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right.json index 2d805ccb..a1a3a08e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_bottom_right", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right_open.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right_open.json index a5ba5f1b..41c7bbc9 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right_open.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_bottom_right_open.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_bottom_right_open", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left.json index 5e5e6c94..b135ece5 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_top_left", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left_open.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left_open.json index f91cae6e..7d8ba1df 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left_open.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_left_open.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_top_left_open", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right.json index 4d9e9d61..16401105 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_top_right", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right_open.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right_open.json index 1da22d7f..c60867c2 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right_open.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_door_top_right_open.json @@ -1,7 +1,8 @@ { "parent": "minecraft:block/door_top_right_open", + "render_type": "minecraft:cutout", "textures": { "bottom": "hexcasting:block/edified_door_lower", "top": "hexcasting:block/edified_door_upper" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_bottom.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_bottom.json index 87895172..67b61c83 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_bottom.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_bottom.json @@ -1,6 +1,7 @@ { "parent": "minecraft:block/template_orientable_trapdoor_bottom", + "render_type": "minecraft:cutout", "textures": { "texture": "hexcasting:block/edified_trapdoor" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_open.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_open.json index feed0635..03b0a364 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_open.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_open.json @@ -1,6 +1,7 @@ { "parent": "minecraft:block/template_orientable_trapdoor_open", + "render_type": "minecraft:cutout", "textures": { "texture": "hexcasting:block/edified_trapdoor" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_top.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_top.json index aad074f7..bb9768cc 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_top.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_trapdoor_top.json @@ -1,6 +1,7 @@ { "parent": "minecraft:block/template_orientable_trapdoor_top", + "render_type": "minecraft:cutout", "textures": { "texture": "hexcasting:block/edified_trapdoor" } -} \ No newline at end of file +} diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus.json index 7b4ae7a1..013dc98f 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/focus.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus.json @@ -21,6 +21,6 @@ } ], "textures": { - "layer0": "hexcasting:item/focus" + "layer0": "hexcasting:item/focus_empty" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json index d6aca5aa..3f3fcaa4 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json @@ -1,7 +1,7 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/focus", + "layer0": "hexcasting:item/focus_base", "layer1": "hexcasting:item/focus_overlay" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json index 09f48e85..786de1ea 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json @@ -1,7 +1,7 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/focus", + "layer0": "hexcasting:item/focus_base_sealed", "layer1": "hexcasting:item/focus_overlay_sealed" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json index b1d4cc24..1a9c4ba6 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json @@ -21,6 +21,6 @@ } ], "textures": { - "layer0": "hexcasting:item/spellbook" + "layer0": "hexcasting:item/spellbook_empty" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json index 76877ed4..9527a5ec 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json @@ -1,7 +1,7 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/spellbook", + "layer0": "hexcasting:item/spellbook_base", "layer1": "hexcasting:item/spellbook_overlay" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json index e4a8fd42..d2df3984 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json @@ -1,7 +1,7 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/spellbook", + "layer0": "hexcasting:item/spellbook_base_sealed", "layer1": "hexcasting:item/spellbook_overlay_sealed" } } \ No newline at end of file diff --git a/Common/src/main/resources/assets/hexcasting/models/block/akashic_bookshelf.json b/Common/src/main/resources/assets/hexcasting/models/block/akashic_bookshelf.json deleted file mode 100644 index a9fba58f..00000000 --- a/Common/src/main/resources/assets/hexcasting/models/block/akashic_bookshelf.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "front": "hexcasting:block/akashic_bookshelf", - "side": "hexcasting:block/akashic_bookshelf_horiz", - "particle": "hexcasting:block/akashic_bookshelf_vert", - "top_bottom": "hexcasting:block/akashic_bookshelf_vert" - }, - "elements": [ - { - "name": "body", - "from": [0, 0, 0], - "to": [16, 16, 16], - "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#front", "cullface": "north"}, - "east": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "east"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "south"}, - "west": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "west"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#top_bottom", "cullface": "up"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#top_bottom", "cullface": "down"} - } - }, - { - "name": "overlay", - "from": [0, 0, 0], - "to": [16, 16, 0], - "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#overlay", "cullface": "north", "tintindex": 0} - } - } - ] -} diff --git a/Common/src/main/resources/assets/hexcasting/models/block/akashic_record.json b/Common/src/main/resources/assets/hexcasting/models/block/akashic_record.json deleted file mode 100644 index 5178e0bf..00000000 --- a/Common/src/main/resources/assets/hexcasting/models/block/akashic_record.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "hexcasting:block/akashic_record", - "1": "hexcasting:block/akashic_ligature", - "particle": "hexcasting:block/akashic_ligature" - }, - "elements": [ - { - "name": "body", - "from": [0, 0, 0], - "to": [16, 16, 16], - "faces": { - "north": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "east": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "south": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "west": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "up": {"uv": [0, 0, 16, 16], "texture": "#0"}, - "down": {"uv": [0, 0, 16, 16], "texture": "#0"} - } - }, - { - "name": "inner", - "from": [15.75, 15.75, 15.75], - "to": [0.25, 0.25, 0.25], - "faces": { - "north": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, - "east": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, - "south": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, - "west": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, - "up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"}, - "down": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#1"} - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [75, 45, 0], - "translation": [0, 2.5, 0], - "scale": [0.375, 0.375, 0.375] - }, - "thirdperson_lefthand": { - "rotation": [75, 45, 0], - "translation": [0, 2.5, 0], - "scale": [0.375, 0.375, 0.375] - }, - "firstperson_righthand": { - "rotation": [0, 45, 0], - "scale": [0.4, 0.4, 0.4] - }, - "firstperson_lefthand": { - "rotation": [0, 225, 0], - "scale": [0.4, 0.4, 0.4] - }, - "ground": { - "translation": [0, 3, 0], - "scale": [0.25, 0.25, 0.25] - }, - "gui": { - "rotation": [30, 225, 0], - "scale": [0.625, 0.625, 0.625] - }, - "fixed": { - "scale": [0.5, 0.5, 0.5] - } - } -} \ No newline at end of file diff --git a/Common/src/main/resources/assets/hexcasting/models/block/amethyst_sconce.json b/Common/src/main/resources/assets/hexcasting/models/block/amethyst_sconce.json index 9269a728..eda47043 100644 --- a/Common/src/main/resources/assets/hexcasting/models/block/amethyst_sconce.json +++ b/Common/src/main/resources/assets/hexcasting/models/block/amethyst_sconce.json @@ -5,6 +5,7 @@ "3": "block/large_amethyst_bud", "particle": "block/cut_copper" }, + "render_type": "cutout", "elements": [ { "name": "base", diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/focus_base.png b/Common/src/main/resources/assets/hexcasting/textures/item/focus_base.png new file mode 100644 index 0000000000000000000000000000000000000000..3b7f238115cf77fcf9d31e4fdfdb4bd06b8a0724 GIT binary patch literal 417 zcmV;S0bc%zP)Px$TS-JgR5*>zl08U5VHky!+Bp0=X>E_%46*o^{{V; zpSH(^)1()*SXqrVqwqh|`0kE5VLhT?Bc1WY23l8GV0O-@r6{(^znOr^tfR<%;K6_9*xXdZM zov(?_P>^U$CaaVfz-A~&E}x;lC5X!ysaV`lejKJB7j=c31;1NEBEC*E1$VCo9!^*B zyEUX!yA1YqvX#81<}VbKX8>Hr2wIjaSY7f@8h&(0RrRY={&Rf*2X2%XowXdf00000 LNkvXXu0mjfzb&UM literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/focus_base_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/focus_base_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..a80ec8b8eba9290638e753dfb38dae010511e8d7 GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|UVFMYhFJ6_ zCrC_LaL)OoyHfH9%ejWx6fkDfx85o|d%lv0JV*?-1+YFwrelF{r5}E)sx`9go literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/focus.png b/Common/src/main/resources/assets/hexcasting/textures/item/focus_empty.png similarity index 100% rename from Common/src/main/resources/assets/hexcasting/textures/item/focus.png rename to Common/src/main/resources/assets/hexcasting/textures/item/focus_empty.png diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/spellbook_base.png b/Common/src/main/resources/assets/hexcasting/textures/item/spellbook_base.png new file mode 100644 index 0000000000000000000000000000000000000000..17daf96142f7deb5dea481a84a4ad015c40ea405 GIT binary patch literal 3075 zcmV+e4E*znP)EX>4Tx07!|QmUmQB*%pV-y*Is3k`RiN&}(Q?0!R(LNRcioF$oY#z>okUHbhi# zL{X8Z2r?+(fTKf^u_B6v0a3B*1Q|rsac~qHmPur-8Q;8l@6DUvANPK1pS{oBXYYO1 zx&V;;g9XA&SP6g(p;#2*=f#MPi)Ua50Sxc}18e}`aI>>Q7WhU2nF4&+jBJ?`_!qsp z4j}paD$_rV!2tiCl(|_VF#u4QjOX(B*<2YH$v8b%oF%tU$(Xh@P0lb%&LUZYGFFpw z@+@0?_L*f5IrB1vJQ>S#&f;b8cV}o=_hCs$|GJ-ARc>v%@$zSl&FIdda6Uz_9&dgda5+tXH875p)hK-XG zi{a1DP3Mcn%rFi&jU(bQ*qIqw9N}^RX3zXt6nSkKvLZX!I5{{lZ7prSDAa#l{F{>Z zc9vd*f9@GXANa%eSALld0I;TIwb}ZIZD|z%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JUF^E#aH(^^ zexTzA`yV<69R@px9EZ9uJ6-M>o;Q5riu;w*SG}*EyB2Wm(#ZUg;pqt>?FMZqM9Va~FNLGD$lbNT*KP&%S`^@CocfWZ2GB6c8HU3=m{L`|I+Sd?{wJo{Z|>UW?q-PQGavbE$eOnyO?(qGr8}v?<+r;e(3oa^zrVej8C6_ z1NVgU`*8t=>i_@&jY&j7R5*>TlfO$_Q5c4wubQ}IQk*VH2oBOT{tF>s3)1Y#aOrI8 z+(n0ut{n=NECq4$56F}Xm*UW_1}`#taXo?j-3 zm((`%1?Q4I|G&BnGMm-4Kn()Q6sS<-$kueM$()HjPvBsun70BLFrq?{Gk%dZd6kXY zHq!~goMV-r=HLM%K2Yb#)_je%KmZK_8ob7JYm&@G>9Q?nl1*ZVQBda4hU|7ae(sO4R4TDI z?ecx4NtprzMm}l_lnX=Z^}4ThW2=D<2>3MZ()(Hk;O29Mh_UaO1p(4DID!W&Mu)Z8Gmk-++4H!zU+&ab#!3=>00|eNaA(ij;Q*M zM%-Hp#yoh?OA^;VCi?dAN|LC7P6*Tj9g)+3GY&?a@^ RCCC5(002ovPDHLkV1ip=;5`5U literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/spellbook_base_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/spellbook_base_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..22037a7da61429b51b65efcfa4902e8a177bbeb4 GIT binary patch literal 3086 zcmV+p4Ds`cP)EX>4Tx07!|QmUmQB*%pV-y*Is3k`RiN&}(Q?0!R(LNRcioF$oY#z>okUHbhi# zL{X8Z2r?+(fTKf^u_B6v0a3B*1Q|rsac~qHmPur-8Q;8l@6DUvANPK1pS{oBXYYO1 zx&V;;g9XA&SP6g(p;#2*=f#MPi)Ua50Sxc}18e}`aI>>Q7WhU2nF4&+jBJ?`_!qsp z4j}paD$_rV!2tiCl(|_VF#u4QjOX(B*<2YH$v8b%oF%tU$(Xh@P0lb%&LUZYGFF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rtZr z&5q5@Et)N5t#GTPb@E`s!OP!xf79K@Y^!glx0fCQha`s{f1CL2^}|7jdylY=w0&pz zU2O-oqofn+T;4g=mC_~cj_V#i8hEs~$EBy^d&}?lAJaWnb6n+k*$Kjlq7$D^=AWEC zm38Xr>EzR6y-RxUoQXYituMT9@NCf8^XGieo$2@NKY8Bu{ILtp7mi+JUF^E#aH(^^ zexTzA`yV<69R@px9EZ9uJ6-M>o;Q5riu;w*SG}*EyB2Wm(#ZUg;pqt>?FMZqM9Va~FNLGD$lbNT*KP&%S`^@CocfWZ2GB6c8HU3=m{L`|I+Sd?{wJo{Z|>UW?q-PQGavbE$eOnyO?(qGr8}v?<+r;e(3oa^zrVej8C6_ z1NVgU`*8t=>i_@&m`OxIR5*>5lRIl0K@^3*n}^i6a!3&t?IIj7QRKfM7V;p%yN`y{LY(4=uA z1Yp99j45l>7FWoaGGXS04&(%`HYx0of{ZD5x3}5T-24u158nI};rI1!*MOOAJT=v!STi48N2 zzMnJvc8`n4$CPEs^2Bbp>lfMs<>3`Zmrt}fJt0XF;yCugIF7FX^GnT0GXIo|d=>ab z)_O*o4=YyJs8s-?FcXqEc|X^?S3e|)Ht2vzJoGo6 znuH)yq)OcV%Q{&$@P)Nos2i0N}l! z`nK7@T5Fth0Dx7JDWHdh5HKqCQsM|g^43RweOCw9RxP_$)M^dB00000NkvXXu0mjf DEWth5 diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java index 78890796..4a390afd 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java @@ -14,6 +14,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.client.model.generators.BlockModelBuilder; import net.minecraftforge.client.model.generators.ConfiguredModel; +import net.minecraftforge.client.model.generators.ModelBuilder; import net.minecraftforge.common.data.ExistingFileHelper; import static net.minecraftforge.client.model.generators.ModelProvider.BLOCK_FOLDER; @@ -122,12 +123,41 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { .build(); }); - var akashicRecordModel = models().getExistingFile(modLoc("block/akashic_record")); + var akashicRecordModel = models().withExistingParent("akashic_record", "block/block") + .renderType("translucent") + .texture("inner", modLoc("block/akashic_ligature")) + .texture("outer", modLoc("block/akashic_record")) + .texture("particle", modLoc("block/akashic_ligature")) + .element() + .cube("#outer") + .end() + .element() + .from(15.75f, 15.75f, 15.75f) + .to(0.25f, 0.25f, 0.25f) + .allFaces((dir, builder) -> builder.texture("#inner").rotation(ModelBuilder.FaceRotation.UPSIDE_DOWN)) + .end(); + simpleBlock(HexBlocks.AKASHIC_RECORD, akashicRecordModel); simpleBlockItem(HexBlocks.AKASHIC_RECORD, akashicRecordModel); blockAndItem(HexBlocks.AKASHIC_LIGATURE, models().cubeAll("akashic_ligature", modLoc("block/akashic_ligature"))); + models().getBuilder("akashic_bookshelf") + .renderType("cutout") + .texture("front", modLoc("block/akashic_bookshelf")) + .texture("side", modLoc("block/akashic_bookshelf_horiz")) + .texture("top_bottom", modLoc("block/akashic_bookshelf_vert")) + .texture("particle", modLoc("block/akashic_bookshelf_vert")) + .element() + .allFaces((dir, builder) -> builder.texture(switch (dir) { + case DOWN, UP -> "#top_bottom"; + case EAST, SOUTH, WEST -> "#side"; + default -> "#front"; + }).cullface(dir)) + .end() + .element() + .face(Direction.NORTH).texture("#overlay").cullface(Direction.NORTH).tintindex(0); + getVariantBuilder(HexBlocks.AKASHIC_BOOKSHELF).forAllStates(bs -> { Direction dir = bs.getValue(BlockAkashicBookshelf.FACING); @@ -197,17 +227,20 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { ResourceLocation leavesParent = new ResourceLocation("block/leaves"); blockAndItem(HexBlocks.AMETHYST_EDIFIED_LEAVES, models().withExistingParent("amethyst_edified_leaves", leavesParent) - .texture("all", modLoc("block/amethyst_edified_leaves"))); + .texture("all", modLoc("block/amethyst_edified_leaves")) + .renderType("cutout_mipped")); blockAndItem(HexBlocks.AVENTURINE_EDIFIED_LEAVES, models().withExistingParent("aventurine_edified_leaves", leavesParent) - .texture("all", modLoc("block/aventurine_edified_leaves"))); + .texture("all", modLoc("block/aventurine_edified_leaves")) + .renderType("cutout_mipped")); blockAndItem(HexBlocks.CITRINE_EDIFIED_LEAVES, models().withExistingParent("citrine_edified_leaves", leavesParent) - .texture("all", modLoc("block/citrine_edified_leaves"))); + .texture("all", modLoc("block/citrine_edified_leaves")) + .renderType("cutout_mipped")); - doorBlock(HexBlocks.EDIFIED_DOOR, modLoc("block/edified_door_lower"), modLoc("block/edified_door_upper")); + doorBlockWithRenderType(HexBlocks.EDIFIED_DOOR, modLoc("block/edified_door_lower"), modLoc("block/edified_door_upper"), "cutout"); // door model via the given texture - trapdoorBlock(HexBlocks.EDIFIED_TRAPDOOR, modLoc("block/edified_trapdoor"), true); + trapdoorBlockWithRenderType(HexBlocks.EDIFIED_TRAPDOOR, modLoc("block/edified_trapdoor"), true, "cutout"); ResourceLocation planks1 = modLoc("block/edified_planks"); BlockModelBuilder planksModel = models().cubeAll("edified_planks", planks1); @@ -231,7 +264,8 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { simpleBlock(HexBlocks.SCONCE, sconceModel); simpleBlockItem(HexBlocks.SCONCE, sconceModel); - var conjuredModel = models().getBuilder("conjured").texture("particle", mcLoc("block/amethyst_block")); + var conjuredModel = models().getBuilder("conjured").texture("particle", mcLoc("block/amethyst_block")) + .renderType("cutout"); simpleBlock(HexBlocks.CONJURED_BLOCK, conjuredModel); simpleBlock(HexBlocks.CONJURED_LIGHT, conjuredModel); } diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java index a8076d7f..3701b237 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java @@ -12,13 +12,16 @@ import at.petrak.hexcasting.common.lib.HexBlocks; import at.petrak.hexcasting.common.lib.HexItems; import at.petrak.paucal.api.forge.datagen.PaucalItemModelProvider; import net.minecraft.client.renderer.block.model.ItemTransforms; -import net.minecraft.core.Registry; import net.minecraft.data.DataGenerator; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.Objects; public class HexItemModels extends PaucalItemModelProvider { public HexItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) { @@ -27,6 +30,14 @@ public class HexItemModels extends PaucalItemModelProvider { private static final String[] PHIAL_SIZES = {"small", "medium", "large"}; + private static String getPath(Item item) { + return Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)).getPath(); + } + + private static String getPath(Block block) { + return Objects.requireNonNull(ForgeRegistries.BLOCKS.getKey(block)).getPath(); + } + @Override protected void registerModels() { simpleItem(HexItems.AMETHYST_DUST); @@ -37,10 +48,10 @@ public class HexItemModels extends PaucalItemModelProvider { simpleItem(HexItems.CREATIVE_UNLOCKER); simpleItem(HexItems.LORE_FRAGMENT); - singleTexture(Registry.BLOCK.getKey(HexBlocks.CONJURED_BLOCK).getPath(), + singleTexture(getPath(HexBlocks.CONJURED_BLOCK), new ResourceLocation("item/generated"), "layer0", new ResourceLocation("item/amethyst_shard")); - singleTexture(Registry.BLOCK.getKey(HexBlocks.CONJURED_LIGHT).getPath(), + singleTexture(getPath(HexBlocks.CONJURED_LIGHT), new ResourceLocation("item/generated"), "layer0", new ResourceLocation("item/amethyst_shard")); @@ -54,7 +65,7 @@ public class HexItemModels extends PaucalItemModelProvider { buildScroll(HexItems.SCROLL_LARGE, "large"); simpleItem(HexItems.SCRYING_LENS); - getBuilder(Registry.ITEM.getKey(HexItems.SCRYING_LENS).getPath()) + getBuilder(getPath(HexItems.SCRYING_LENS)) .transforms() .transform(ItemTransforms.TransformType.HEAD) .rotation(0f, 0f, 0f) @@ -95,7 +106,7 @@ public class HexItemModels extends PaucalItemModelProvider { "layer0", modLoc("item/phial/" + name)); float fillProp = (float) fill / maxFill; - getBuilder(Registry.ITEM.getKey(HexItems.BATTERY).getPath()).override() + getBuilder(getPath(HexItems.BATTERY)).override() .predicate(ItemMediaBattery.MANA_PREDICATE, fillProp) .predicate(ItemMediaBattery.MAX_MANA_PREDICATE, size) .model(new ModelFile.UncheckedModelFile(modLoc("item/" + name))) @@ -104,21 +115,21 @@ public class HexItemModels extends PaucalItemModelProvider { } for (var dye : DyeColor.values()) { - singleTexture(Registry.ITEM.getKey(HexItems.DYE_COLORIZERS.get(dye)).getPath(), + singleTexture(getPath(HexItems.DYE_COLORIZERS.get(dye)), new ResourceLocation("item/generated"), "layer0", modLoc("item/colorizer/dye_" + dye.getName())); } for (var type : ItemPrideColorizer.Type.values()) { - singleTexture(Registry.ITEM.getKey(HexItems.PRIDE_COLORIZERS.get(type)).getPath(), + singleTexture(getPath(HexItems.PRIDE_COLORIZERS.get(type)), new ResourceLocation("item/generated"), "layer0", modLoc("item/colorizer/pride_" + type.getName())); } - singleTexture(Registry.ITEM.getKey(HexItems.UUID_COLORIZER).getPath(), new ResourceLocation("item/generated"), + singleTexture(getPath(HexItems.UUID_COLORIZER), new ResourceLocation("item/generated"), "layer0", modLoc("item/colorizer/uuid")); simpleItem(modLoc("slate_blank")); simpleItem(modLoc("slate_written")); - getBuilder(Registry.ITEM.getKey(HexItems.SLATE).getPath()).override() + getBuilder(getPath(HexItems.SLATE)).override() .predicate(ItemSlate.WRITTEN_PRED, 0) .model(new ModelFile.UncheckedModelFile(modLoc("item/slate_blank"))) .end() @@ -127,39 +138,39 @@ public class HexItemModels extends PaucalItemModelProvider { .model(new ModelFile.UncheckedModelFile(modLoc("item/slate_written"))) .end(); - getBuilder(Registry.BLOCK.getKey(HexBlocks.AKASHIC_RECORD).getPath()).parent( + getBuilder(getPath(HexBlocks.AKASHIC_RECORD)).parent( new ModelFile.UncheckedModelFile(modLoc("block/akashic_record"))); simpleItem(modLoc("edified_door")); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_TRAPDOOR).getPath()).parent( + getBuilder(getPath(HexBlocks.EDIFIED_TRAPDOOR)).parent( new ModelFile.UncheckedModelFile(modLoc("block/edified_trapdoor_bottom"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_LOG).getPath()).parent( + getBuilder(getPath(HexBlocks.EDIFIED_LOG)).parent( new ModelFile.UncheckedModelFile(modLoc("block/edified_log"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.STRIPPED_EDIFIED_LOG).getPath()).parent( + getBuilder(getPath(HexBlocks.STRIPPED_EDIFIED_LOG)).parent( new ModelFile.UncheckedModelFile(modLoc("block/stripped_edified_log"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_WOOD).getPath()).parent( + getBuilder(getPath(HexBlocks.EDIFIED_WOOD)).parent( new ModelFile.UncheckedModelFile(modLoc("block/edified_wood"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.STRIPPED_EDIFIED_WOOD).getPath()).parent( + getBuilder(getPath(HexBlocks.STRIPPED_EDIFIED_WOOD)).parent( new ModelFile.UncheckedModelFile(modLoc("block/stripped_edified_wood"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_STAIRS).getPath()).parent( + getBuilder(getPath(HexBlocks.EDIFIED_STAIRS)).parent( new ModelFile.UncheckedModelFile(modLoc("block/edified_stairs"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_SLAB).getPath()).parent( + getBuilder(getPath(HexBlocks.EDIFIED_SLAB)).parent( new ModelFile.UncheckedModelFile(modLoc("block/edified_slab"))); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_BUTTON).getPath()).parent( + getBuilder(getPath(HexBlocks.EDIFIED_BUTTON)).parent( new ModelFile.UncheckedModelFile(new ResourceLocation("block/button_inventory"))) .texture("texture", modLoc("block/edified_planks")); - getBuilder(Registry.BLOCK.getKey(HexBlocks.EDIFIED_PRESSURE_PLATE).getPath()) + getBuilder(getPath(HexBlocks.EDIFIED_PRESSURE_PLATE)) .parent(new ModelFile.UncheckedModelFile(modLoc("block/edified_pressure_plate"))); } private void buildSealableIotaHolder(Item item, String stub) { - var name = Registry.ITEM.getKey(item).getPath(); + var name = getPath(item); var plain = singleTexture(name, new ResourceLocation("item/generated"), - "layer0", modLoc("item/" + stub)); + "layer0", modLoc("item/" + stub + "_empty")); var unsealed = withExistingParent(name + "_filled", new ResourceLocation("item/generated")) - .texture("layer0", modLoc("item/" + stub)) + .texture("layer0", modLoc("item/" + stub + "_base")) .texture("layer1", modLoc("item/" + stub) + "_overlay"); var sealed = withExistingParent(name + "_sealed", new ResourceLocation("item/generated")) - .texture("layer0", modLoc("item/" + stub)) + .texture("layer0", modLoc("item/" + stub + "_base_sealed")) .texture("layer1", modLoc("item/" + stub) + "_overlay_sealed"); getBuilder(name) .override().predicate(ItemFocus.OVERLAY_PRED, 0f) @@ -171,7 +182,7 @@ public class HexItemModels extends PaucalItemModelProvider { } private void buildScroll(Item item, String size) { - getBuilder(Registry.ITEM.getKey(item).getPath()) + getBuilder(getPath(item)) .override() .predicate(ItemScroll.ANCIENT_PREDICATE, 0f) .model(new ModelFile.UncheckedModelFile(modLoc("item/scroll_pristine_" + size))).end() @@ -181,9 +192,9 @@ public class HexItemModels extends PaucalItemModelProvider { } private void buildStaff(Item item, String name) { - singleTexture(Registry.ITEM.getKey(item).getPath(), new ResourceLocation("item/handheld_rod"), + singleTexture(getPath(item), new ResourceLocation("item/handheld_rod"), "layer0", modLoc("item/staves/" + name)); - getBuilder(Registry.ITEM.getKey(item).getPath()) + getBuilder(getPath(item)) .override() .predicate(ItemStaff.FUNNY_LEVEL_PREDICATE, 0) .model(new ModelFile.UncheckedModelFile(modLoc("item/" + name + "_staff"))) @@ -199,7 +210,7 @@ public class HexItemModels extends PaucalItemModelProvider { private void buildPackagedSpell(Item item, String name) { simpleItem(modLoc(name)); simpleItem(modLoc(name + "_filled")); - getBuilder(Registry.ITEM.getKey(item).getPath()) + getBuilder(getPath(item)) .override() .predicate(ItemPackagedHex.HAS_PATTERNS_PRED, -0.01f) .model(new ModelFile.UncheckedModelFile(modLoc("item/" + name))) diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeClientXplatImpl.java b/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeClientXplatImpl.java index 4d31c369..185b24a2 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeClientXplatImpl.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeClientXplatImpl.java @@ -6,7 +6,6 @@ import at.petrak.hexcasting.xplat.IClientXplatAbstractions; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.ParticleProvider; import net.minecraft.client.particle.SpriteSet; -import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.EntityRenderers; @@ -31,7 +30,8 @@ public class ForgeClientXplatImpl implements IClientXplatAbstractions { @Override public void setRenderLayer(Block block, RenderType type) { - ItemBlockRenderTypes.setRenderLayer(block, type); + // For forge, handled in block models +// ItemBlockRenderTypes.setRenderLayer(block, type); } @Override From ae07475528a27e2f1c77af5a25bff10dc78280bc Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Sat, 5 Nov 2022 15:04:06 -0400 Subject: [PATCH 2/2] fix #193, #192 --- .../at/petrak/hexcasting/api/spell/iota/ListIota.java | 2 +- .../at/petrak/hexcasting/api/spell/iota/PatternIota.java | 8 +++++--- .../main/java/at/petrak/hexcasting/api/utils/HexUtils.kt | 5 ++++- .../common/casting/operators/lists/OpLastNToList.kt | 4 ++-- .../hexcasting/forge/cap/ForgeCapabilityHandler.java | 4 ++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ListIota.java b/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ListIota.java index 82895695..95817080 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ListIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ListIota.java @@ -118,7 +118,7 @@ public class ListIota extends Iota { // We aim to not break one iota between lines var listTag = HexUtils.downcast(tag, ListTag.TYPE); - var start = FormattedCharSequence.forward("[", Style.EMPTY.withColor(ChatFormatting.DARK_PURPLE)); + var start = FormattedCharSequence.forward(listTag.isEmpty() ? "[]" : "[", Style.EMPTY.withColor(ChatFormatting.DARK_PURPLE)); var cursor = font.width(start); var currentLine = new ArrayList<>(List.of(start)); var out = new ArrayList(); diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/PatternIota.java b/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/PatternIota.java index cd4d7f3c..56c0362b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/PatternIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/PatternIota.java @@ -67,7 +67,8 @@ public class PatternIota extends Iota { } public static Component display(HexPattern pat) { - var bob = new StringBuilder("HexPattern("); + var component = Component.literal("HexPattern(").withStyle(ChatFormatting.GOLD); + var bob = new StringBuilder(); bob.append(pat.getStartDir()); var sig = pat.anglesSignature(); @@ -75,7 +76,8 @@ public class PatternIota extends Iota { bob.append(" "); bob.append(sig); } - bob.append(")"); - return Component.literal(bob.toString()).withStyle(ChatFormatting.GOLD); + component.append(Component.literal(bob.toString()).withStyle(ChatFormatting.WHITE)); + component.append(Component.literal(")").withStyle(ChatFormatting.GOLD)); + return component; } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt index 93748697..7d3f4bc3 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt @@ -8,7 +8,9 @@ import at.petrak.hexcasting.api.spell.math.HexCoord import at.petrak.hexcasting.common.lib.HexIotaTypes import net.minecraft.ChatFormatting import net.minecraft.nbt.* -import net.minecraft.network.chat.* +import net.minecraft.network.chat.Component +import net.minecraft.network.chat.MutableComponent +import net.minecraft.network.chat.Style import net.minecraft.world.InteractionHand import net.minecraft.world.item.ItemStack import net.minecraft.world.phys.Vec2 @@ -245,6 +247,7 @@ fun ItemStack.serializeToNBT(): CompoundTag { return out } +@Suppress("UNCHECKED_CAST") @Throws(IllegalArgumentException::class) fun Tag.downcast(type: TagType): T { if (this.type == type) { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt index 805e4609..4954ac97 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt @@ -5,7 +5,7 @@ import at.petrak.hexcasting.api.spell.OperationResult import at.petrak.hexcasting.api.spell.asActionResult import at.petrak.hexcasting.api.spell.casting.CastingContext import at.petrak.hexcasting.api.spell.casting.SpellContinuation -import at.petrak.hexcasting.api.spell.getPositiveIntUnder +import at.petrak.hexcasting.api.spell.getIntBetween import at.petrak.hexcasting.api.spell.iota.Iota import at.petrak.hexcasting.api.spell.mishaps.MishapNotEnoughArgs @@ -18,7 +18,7 @@ object OpLastNToList : Action { ): OperationResult { if (stack.isEmpty()) throw MishapNotEnoughArgs(1, 0) - val yoinkCount = stack.takeLast(1).getPositiveIntUnder(0, stack.size - 1) + val yoinkCount = stack.takeLast(1).getIntBetween(0, 0, stack.size - 1) stack.removeLast() val output = mutableListOf() output.addAll(stack.takeLast(yoinkCount)) diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java index 495b15a0..4c99f009 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java @@ -23,12 +23,12 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.common.util.NonNullSupplier; import net.minecraftforge.event.AttachCapabilitiesEvent; -import net.minecraftforge.items.CapabilityItemHandler; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -116,7 +116,7 @@ public class ForgeCapabilityHandler { public static void attachBlockEntityCaps(AttachCapabilitiesEvent evt) { if (evt.getObject() instanceof BlockEntityAbstractImpetus impetus) { - evt.addCapability(IMPETUS_HANDLER, provide(impetus, CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, + evt.addCapability(IMPETUS_HANDLER, provide(impetus, ForgeCapabilities.ITEM_HANDLER, () -> new ForgeImpetusCapability(impetus))); } }