From 2b59c89d57826b43fb2d1e7040363706be1f6bac Mon Sep 17 00:00:00 2001 From: rearth Date: Thu, 22 Feb 2024 21:51:24 +0100 Subject: [PATCH] Add inventory proxy addon model --- .../machine_inventory_proxy_addon.json | 7 - .../block/machine_inventory_proxy_addon.json | 6 - .../item/machine_inventory_proxy_addon.json | 3 - .../client/ui/InventoryProxyScreen.java | 2 +- .../oritech/init/datagen/ModelGenerator.java | 2 +- .../machine_inventory_proxy_addon.json | 58 ++++++ .../block/machine_inventory_proxy_addon.json | 170 ++++++++++++++++++ .../item/machine_inventory_proxy_addon.json | 91 ++++++++++ .../block/machine_inventory_proxy_addon.png | Bin 917 -> 1896 bytes 9 files changed, 321 insertions(+), 18 deletions(-) delete mode 100644 src/main/generated/assets/oritech/blockstates/machine_inventory_proxy_addon.json delete mode 100644 src/main/generated/assets/oritech/models/block/machine_inventory_proxy_addon.json delete mode 100644 src/main/generated/assets/oritech/models/item/machine_inventory_proxy_addon.json create mode 100644 src/main/resources/assets/oritech/blockstates/machine_inventory_proxy_addon.json create mode 100644 src/main/resources/assets/oritech/models/block/machine_inventory_proxy_addon.json create mode 100644 src/main/resources/assets/oritech/models/item/machine_inventory_proxy_addon.json diff --git a/src/main/generated/assets/oritech/blockstates/machine_inventory_proxy_addon.json b/src/main/generated/assets/oritech/blockstates/machine_inventory_proxy_addon.json deleted file mode 100644 index cbec3d3fb..000000000 --- a/src/main/generated/assets/oritech/blockstates/machine_inventory_proxy_addon.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "oritech:block/machine_inventory_proxy_addon" - } - } -} \ No newline at end of file diff --git a/src/main/generated/assets/oritech/models/block/machine_inventory_proxy_addon.json b/src/main/generated/assets/oritech/models/block/machine_inventory_proxy_addon.json deleted file mode 100644 index fee97dcd6..000000000 --- a/src/main/generated/assets/oritech/models/block/machine_inventory_proxy_addon.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:block/cube_all", - "textures": { - "all": "oritech:block/machine_inventory_proxy_addon" - } -} \ No newline at end of file diff --git a/src/main/generated/assets/oritech/models/item/machine_inventory_proxy_addon.json b/src/main/generated/assets/oritech/models/item/machine_inventory_proxy_addon.json deleted file mode 100644 index 0d857b6ae..000000000 --- a/src/main/generated/assets/oritech/models/item/machine_inventory_proxy_addon.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "oritech:block/machine_inventory_proxy_addon" -} \ No newline at end of file diff --git a/src/main/java/rearth/oritech/client/ui/InventoryProxyScreen.java b/src/main/java/rearth/oritech/client/ui/InventoryProxyScreen.java index 9f5ef0035..c5b1c38b6 100644 --- a/src/main/java/rearth/oritech/client/ui/InventoryProxyScreen.java +++ b/src/main/java/rearth/oritech/client/ui/InventoryProxyScreen.java @@ -53,7 +53,7 @@ protected void build(FlowLayout rootComponent) { }); buttons.add(button); overlay.child(getItemFrame(slot.x(), slot.y())); - overlay.child(button.sizing(Sizing.fixed(8)).positioning(Positioning.absolute(slot.x() + 3, slot.y() + 3))); + overlay.child(button.sizing(Sizing.fixed(10)).positioning(Positioning.absolute(slot.x() + 2, slot.y() + 2))); } for (int i = 0; i < buttons.size(); i++) { diff --git a/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java b/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java index faf1b3ba6..6623a3373 100644 --- a/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java +++ b/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java @@ -27,7 +27,7 @@ public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGen // blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_SPEED_ADDON); blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_EFFICIENCY_ADDON); - blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_INVENTORY_PROXY_ADDON); + // blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_INVENTORY_PROXY_ADDON); blockStateModelGenerator.registerSimpleCubeAll(BlockContent.MACHINE_EXTENDER); diff --git a/src/main/resources/assets/oritech/blockstates/machine_inventory_proxy_addon.json b/src/main/resources/assets/oritech/blockstates/machine_inventory_proxy_addon.json new file mode 100644 index 000000000..de68db27e --- /dev/null +++ b/src/main/resources/assets/oritech/blockstates/machine_inventory_proxy_addon.json @@ -0,0 +1,58 @@ +{ + "variants": { + "face=wall,facing=north": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 90, + "y": 0 + }, + "face=wall,facing=south": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 90, + "y": 180 + }, + "face=wall,facing=west": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 90, + "y": 270 + }, + "face=wall,facing=east": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 90, + "y": 90 + }, + "face=floor,facing=north": { + "model": "oritech:block/machine_inventory_proxy_addon" + }, + "face=floor,facing=south": { + "model": "oritech:block/machine_inventory_proxy_addon", + "y": 180 + }, + "face=floor,facing=west": { + "model": "oritech:block/machine_inventory_proxy_addon", + "y": 270 + }, + "face=floor,facing=east": { + "model": "oritech:block/machine_inventory_proxy_addon", + "y": 90 + }, + "face=ceiling,facing=north": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 180, + "y": 180 + }, + "face=ceiling,facing=south": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 0 + }, + "face=ceiling,facing=west": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 180, + "y": 90 + }, + "face=ceiling,facing=east": { + "model": "oritech:block/machine_inventory_proxy_addon", + "x": 180, + "y": 270 + } + } +} diff --git a/src/main/resources/assets/oritech/models/block/machine_inventory_proxy_addon.json b/src/main/resources/assets/oritech/models/block/machine_inventory_proxy_addon.json new file mode 100644 index 000000000..7a58b64e1 --- /dev/null +++ b/src/main/resources/assets/oritech/models/block/machine_inventory_proxy_addon.json @@ -0,0 +1,170 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [128, 128], + "textures": { + "0": "oritech:block/machine_inventory_proxy_addon", + "particle": "oritech:block/machine_inventory_proxy_addon" + }, + "elements": [ + { + "name": "base", + "from": [1, 0, 1], + "to": [15, 2, 15], + "faces": { + "north": {"uv": [6, 3, 7.75, 3.25], "texture": "#0"}, + "east": {"uv": [6, 3.25, 7.75, 3.5], "texture": "#0"}, + "south": {"uv": [6, 3.5, 7.75, 3.75], "texture": "#0"}, + "west": {"uv": [5.75, 6.75, 7.5, 7], "texture": "#0"}, + "up": {"uv": [5.75, 5.5, 4, 3.75], "texture": "#0"}, + "down": {"uv": [5.75, 5.5, 4, 7.25], "texture": "#0"} + } + }, + { + "name": "chest_like", + "from": [2, 2, 2], + "to": [14, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 7]}, + "faces": { + "north": {"uv": [0, 5.625, 1.5, 7.125], "texture": "#0"}, + "east": {"uv": [1.5, 5.625, 3, 7.125], "texture": "#0"}, + "south": {"uv": [5.75, 3.75, 7.25, 5.25], "texture": "#0"}, + "west": {"uv": [5.75, 5.25, 7.25, 6.75], "texture": "#0"}, + "up": {"uv": [7.5, 1.5, 6, 0], "texture": "#0"}, + "down": {"uv": [7.5, 1.5, 6, 3], "texture": "#0"} + } + }, + { + "from": [14, 6, 6], + "to": [16, 10, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 7, 6]}, + "faces": { + "north": {"uv": [1.5, 7.375, 1.75, 7.875], "texture": "#0"}, + "east": {"uv": [3, 5.625, 3.5, 6.125], "texture": "#0"}, + "south": {"uv": [1.75, 7.375, 2, 7.875], "texture": "#0"}, + "west": {"uv": [3.5, 5.625, 4, 6.125], "texture": "#0"}, + "up": {"uv": [2.25, 7.875, 2, 7.375], "texture": "#0"}, + "down": {"uv": [2.5, 7.375, 2.25, 7.875], "texture": "#0"} + } + }, + { + "from": [0, 6, 6], + "to": [2, 10, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [2, 7, 6]}, + "faces": { + "north": {"uv": [2.5, 7.375, 2.75, 7.875], "texture": "#0"}, + "east": {"uv": [3, 6.125, 3.5, 6.625], "texture": "#0"}, + "south": {"uv": [2.75, 7.375, 3, 7.875], "texture": "#0"}, + "west": {"uv": [3.5, 6.125, 4, 6.625], "texture": "#0"}, + "up": {"uv": [3.25, 7.875, 3, 7.375], "texture": "#0"}, + "down": {"uv": [3.5, 7.375, 3.25, 7.875], "texture": "#0"} + } + }, + { + "from": [6, 6, 0], + "to": [10, 10, 2], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 7, -2]}, + "faces": { + "north": {"uv": [3, 6.625, 3.5, 7.125], "texture": "#0"}, + "east": {"uv": [3.5, 7.375, 3.75, 7.875], "texture": "#0"}, + "south": {"uv": [3.5, 6.625, 4, 7.125], "texture": "#0"}, + "west": {"uv": [3.75, 7.375, 4, 7.875], "texture": "#0"}, + "up": {"uv": [7.875, 4.125, 7.375, 3.875], "texture": "#0"}, + "down": {"uv": [4.5, 7.375, 4, 7.625], "texture": "#0"} + } + }, + { + "from": [6, 6, 14], + "to": [10, 10, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 7, 12]}, + "faces": { + "north": {"uv": [5.75, 7, 6.25, 7.5], "texture": "#0"}, + "east": {"uv": [7.375, 4.125, 7.625, 4.625], "texture": "#0"}, + "south": {"uv": [6.25, 7, 6.75, 7.5], "texture": "#0"}, + "west": {"uv": [7.375, 4.625, 7.625, 5.125], "texture": "#0"}, + "up": {"uv": [7.875, 5.375, 7.375, 5.125], "texture": "#0"}, + "down": {"uv": [7.875, 5.375, 7.375, 5.625], "texture": "#0"} + } + }, + { + "from": [6, 13, 6], + "to": [10, 16, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 14, 5]}, + "faces": { + "north": {"uv": [7.25, 5.875, 7.75, 6.25], "texture": "#0"}, + "east": {"uv": [7.25, 6.25, 7.75, 6.625], "texture": "#0"}, + "south": {"uv": [0.5, 7.375, 1, 7.75], "texture": "#0"}, + "west": {"uv": [1, 7.375, 1.5, 7.75], "texture": "#0"}, + "up": {"uv": [7.25, 7.5, 6.75, 7], "texture": "#0"}, + "down": {"uv": [0.5, 7.125, 0, 7.625], "texture": "#0"} + } + }, + { + "from": [0, 0.02, 5], + "to": [16, 15.02, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 4]}, + "faces": { + "north": {"uv": [2, 0, 4, 1.875], "texture": "#0"}, + "east": {"uv": [5.125, 7.25, 5.25, 9.125], "texture": "#0"}, + "south": {"uv": [2, 1.875, 4, 3.75], "texture": "#0"}, + "west": {"uv": [5.25, 7.25, 5.375, 9.125], "texture": "#0"}, + "up": {"uv": [4.5, 7.375, 2.5, 7.25], "texture": "#0"}, + "down": {"uv": [9.25, 3.75, 7.25, 3.875], "texture": "#0"} + } + }, + { + "from": [0, 0.02, 10], + "to": [16, 15.02, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 9]}, + "faces": { + "north": {"uv": [0, 0, 2, 1.875], "texture": "#0"}, + "east": {"uv": [4.875, 7.25, 5, 9.125], "texture": "#0"}, + "south": {"uv": [0, 1.875, 2, 3.75], "texture": "#0"}, + "west": {"uv": [5, 7.25, 5.125, 9.125], "texture": "#0"}, + "up": {"uv": [2.5, 7.25, 0.5, 7.125], "texture": "#0"}, + "down": {"uv": [2.5, 7.25, 0.5, 7.375], "texture": "#0"} + } + }, + { + "from": [5, 0.01, 0], + "to": [6, 15.01, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 8, 10.5]}, + "faces": { + "north": {"uv": [5.375, 7.25, 5.5, 9.125], "texture": "#0"}, + "east": {"uv": [0, 3.75, 2, 5.625], "texture": "#0"}, + "south": {"uv": [5.5, 7.25, 5.625, 9.125], "texture": "#0"}, + "west": {"uv": [2, 3.75, 4, 5.625], "texture": "#0"}, + "up": {"uv": [7.375, 5.875, 7.25, 3.875], "texture": "#0"}, + "down": {"uv": [4.625, 7.25, 4.5, 9.25], "texture": "#0"} + } + }, + { + "from": [10, 0.01, 0], + "to": [11, 15.01, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [18, 8, 10.5]}, + "faces": { + "north": {"uv": [5.625, 7.25, 5.75, 9.125], "texture": "#0"}, + "east": {"uv": [4, 0, 6, 1.875], "texture": "#0"}, + "south": {"uv": [7.25, 7, 7.375, 8.875], "texture": "#0"}, + "west": {"uv": [4, 1.875, 6, 3.75], "texture": "#0"}, + "up": {"uv": [4.75, 9.25, 4.625, 7.25], "texture": "#0"}, + "down": {"uv": [4.875, 7.25, 4.75, 9.25], "texture": "#0"} + } + } + ], + "groups": [ + 0, + 1, + { + "name": "ports", + "origin": [8, 14, 5], + "color": 0, + "children": [2, 3, 4, 5, 6] + }, + { + "name": "side_bars", + "origin": [18, 8, 10.5], + "color": 0, + "children": [7, 8, 9, 10] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/models/item/machine_inventory_proxy_addon.json b/src/main/resources/assets/oritech/models/item/machine_inventory_proxy_addon.json new file mode 100644 index 000000000..6d764747d --- /dev/null +++ b/src/main/resources/assets/oritech/models/item/machine_inventory_proxy_addon.json @@ -0,0 +1,91 @@ +{ + "parent": "oritech:block/machine_inventory_proxy_addon", + "display": { + "thirdperson_righthand": { + "translation": [ + -2, + 0, + 0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "thirdperson_lefthand": { + "translation": [ + 2, + 0, + 0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "firstperson_righthand": { + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "firstperson_lefthand": { + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "ground": { + "translation": [ + -4, + 0, + 0 + ], + "scale": [ + 0.3, + 0.3, + 0.3 + ] + }, + "gui": { + "rotation": [ + 30, + 140, + 0 + ], + "translation": [ + 0, + 0, + 0 + ], + "scale": [ + 0.6, + 0.6, + 0.6 + ] + }, + "head": { + "translation": [ + -8, + -6.5, + 0 + ] + }, + "fixed": { + "translation": [ + -4, + -4, + 0 + ], + "scale": [ + 0.8, + 0.8, + 0.8 + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/textures/block/machine_inventory_proxy_addon.png b/src/main/resources/assets/oritech/textures/block/machine_inventory_proxy_addon.png index 24cf0e75c82b8fb76fa2c4a01ea7c0e84bf9372c..a392bea657e5d3bb0003d5b27d12df9676a22c10 100644 GIT binary patch literal 1896 zcmV-u2bcJXP)v1 z9z|#mmI~s*&>*y^bS0$eL5!_7G$biBY1yQQEyM-K!^@j}^SSf2ncdm{55n%uyxH00 zea^g(q<;LMqya!*AqQ!Fr3yQ4Vd6Uf>(w58pO!7^?^Cs9+s~LP&!=n;bf}DcI_srZqRU+C3BT_efTfU#)xN^q+9Z zC=Gb4f1QMhgn_|aWRW;uaW3ZPD;f&Dnx(p+HZK7vyu>5`wY6_{bV#%VytEfOO=1#& z8#V%+1-=WQWJrgJ{JugiRN{%^d^6eLEA(ov4MP$#K(M=j^_8j~0db#yWp0Pw!cWzf zac8mqfauO5>wPzw#z9(J&;H}4JqO&k%k$0rI&G)z69540*|pnKxQDBcn*2@LPeTmwKVit9blC1#fX@-yS!@r2qU=tl-~!(T zFanYx9ao=v*!rC9foSkHu){F{bht!33FH&L;6n8Vh7tC<^8Bvarsd~$`6h0cZ(8Kgw>xEul()s3I}U`7=M40RZ{_JStBr`mua}9`_gT8MbF;%b~89M2YAQ zK0G=mc9!bL)yTFxzIb=m_cfC!5p4h&*|HSK_vexC&jSD|Pb!Avavuq8p8yVzj_DD+ zuQaUZ@|oGP$oVB>cvb^OZJz+t2%VWN>$zO5^W{FWO2s`p__MqHe!nvS;HAE2(6U9> zq2B6o>&PL0zW?T{L=G)(iP^z^bEvGtKY!ys05R;_JOFegpF*Km9KUd*8)tJZoGLez$N9?nM!;rIprK3a8r-rM?wQLdhZmos7R#IgEQ8fF#6;sa%dVUmR5xg*0 z6U_N_p-X_cdK0~@3!oZ4GO%4=t*r!}9UMh>Y?#Eud4AF8nBG8+AF$W<382xs0OYQ% z6M&bsf4Dx7yTAz`if-g6K103j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