diff --git a/TODO.md b/TODO.md index 77d76b2..942cc1d 100644 --- a/TODO.md +++ b/TODO.md @@ -2,10 +2,9 @@ * Add fences * Add windows * Add (with functionality) present appliance/furniture/electronics textures -* Add advancements (with datagen) * What's switch type 2? * Cigarette and handrail are BROKEN and the code is a MESS sorry, but it needs CLEANUP -* Concrete with bars should have proper hitbox, placeable upside down, and act like dripstone +* Fix concrete with bars hitbox * Fix post lamp hitboxes * Add credits in models diff --git a/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java b/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java index df01e9f..91f2bab 100644 --- a/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java +++ b/src/main/java/su/a71/new_soviet/registration/NSE_Custom.java @@ -39,6 +39,7 @@ public class NSE_Custom extends NSE_BaseRegistration { public static final RadioReceiverBlock RADIO_RECEIVER = new RadioReceiverBlock(); public static final SwitchBlock SWITCH = new SwitchBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f).mapColor(MapColor.TERRACOTTA_WHITE)); + public static final SwitchBlock DARK_SWITCH = new SwitchBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.METAL).notSolid().pistonBehavior(PistonBehavior.DESTROY).strength(1f, 2f).mapColor(MapColor.TERRACOTTA_WHITE)); public static final TableLampBlock TABLE_LAMP = new TableLampBlock(FabricBlockSettings.create().sounds(BlockSoundGroup.WOOD).strength(0.9f, 1.5f).mapColor(MapColor.WHITE)); public static final GoldenTableLampBlock GOLDEN_LAMP = new GoldenTableLampBlock(FabricBlockSettings.copy(TABLE_LAMP).sounds(BlockSoundGroup.METAL).mapColor(MapColor.GOLD)); public static final TableLampBlock VINTAGE_LAMP = new VintageLampBlock(FabricBlockSettings.copy(TABLE_LAMP).sounds(BlockSoundGroup.METAL).mapColor(MapColor.TERRACOTTA_BROWN)); @@ -115,6 +116,7 @@ public class NSE_Custom extends NSE_BaseRegistration { registerBlock("siren", () -> SIREN, NSE_CUSTOM_TAB); registerBlock("landmine", () -> LANDMINE, NSE_CUSTOM_TAB); registerBlock("switch", () -> SWITCH, NSE_CUSTOM_TAB); + registerBlock("dark_switch", () -> DARK_SWITCH, NSE_CUSTOM_TAB); registerBlock("white_checker", () -> WHITE_CHECKER, NSE_CUSTOM_TAB); registerBlock("black_checker", () -> BLACK_CHECKER, NSE_CUSTOM_TAB); registerBlock("white_pawn", () -> WHITE_PAWN, NSE_CUSTOM_TAB); diff --git a/src/main/resources/assets/new_soviet/blockstates/dark_switch.json b/src/main/resources/assets/new_soviet/blockstates/dark_switch.json new file mode 100644 index 0000000..bad216d --- /dev/null +++ b/src/main/resources/assets/new_soviet/blockstates/dark_switch.json @@ -0,0 +1,110 @@ +{ + "variants": { + "face=ceiling,facing=east,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": 90, + "y": 270 + }, + "face=ceiling,facing=east,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": 90, + "y": 270 + }, + "face=ceiling,facing=north,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": 90, + "y": 180 + }, + "face=ceiling,facing=north,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": 90, + "y": 180 + }, + "face=ceiling,facing=south,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": 90 + }, + "face=ceiling,facing=south,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": 90 + }, + "face=ceiling,facing=west,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": 90, + "y": 90 + }, + "face=ceiling,facing=west,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": 90, + "y": 90 + }, + "face=floor,facing=east,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": -90, + "y": 90 + }, + "face=floor,facing=east,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": -90, + "y": 90 + }, + "face=floor,facing=north,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": -90 + }, + "face=floor,facing=north,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": -90 + }, + "face=floor,facing=south,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": -90, + "y": 180 + }, + "face=floor,facing=south,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": -90, + "y": 180 + }, + "face=floor,facing=west,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "x": -90, + "y": 270 + }, + "face=floor,facing=west,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "x": -90, + "y": 270 + }, + "face=wall,facing=east,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "y": 90 + }, + "face=wall,facing=east,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "y": 90 + }, + "face=wall,facing=north,powered=false": { + "model": "new_soviet:block/switch_type_2_on" + }, + "face=wall,facing=north,powered=true": { + "model": "new_soviet:block/switch_type_2_off" + }, + "face=wall,facing=south,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "y": 180 + }, + "face=wall,facing=south,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "y": 180 + }, + "face=wall,facing=west,powered=false": { + "model": "new_soviet:block/switch_type_2_on", + "y": 270 + }, + "face=wall,facing=west,powered=true": { + "model": "new_soviet:block/switch_type_2_off", + "y": 270 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/lang/en_us.json b/src/main/resources/assets/new_soviet/lang/en_us.json index f5028da..82eefa5 100644 --- a/src/main/resources/assets/new_soviet/lang/en_us.json +++ b/src/main/resources/assets/new_soviet/lang/en_us.json @@ -199,6 +199,7 @@ "subtitles.new_soviet.item_rake_till": "Rake tills", "item.new_soviet.concentrate": "Nutrient Block", "block.new_soviet.switch": "Switch", + "block.new_soviet.dark_switch": "Dark Switch", "block.new_soviet.nii_wall_1": "Diorite RI Wall", "block.new_soviet.cracked_nii_wall_1": "Cracked Diorite RI Wall", "block.new_soviet.nii_wall_2": "RI Wall", diff --git a/src/main/resources/assets/new_soviet/models/block/switch_type_1_off.json b/src/main/resources/assets/new_soviet/models/block/switch_type_1_off.json index 857b776..c4532e0 100644 --- a/src/main/resources/assets/new_soviet/models/block/switch_type_1_off.json +++ b/src/main/resources/assets/new_soviet/models/block/switch_type_1_off.json @@ -79,7 +79,6 @@ "name": "group", "origin": [0, 0, 0], "color": 0, - "nbt": "{}", "children": [0, 1, 2] } ] diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_2_off.json b/src/main/resources/assets/new_soviet/models/block/switch_type_2_off.json similarity index 66% rename from src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_2_off.json rename to src/main/resources/assets/new_soviet/models/block/switch_type_2_off.json index 60bdf6f..29cc1cf 100644 --- a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_2_off.json +++ b/src/main/resources/assets/new_soviet/models/block/switch_type_2_off.json @@ -1,8 +1,8 @@ { "credit": "Made with Blockbench", "textures": { - "0": "switch_type_2", - "particle": "switch_type_2" + "0": "new_soviet:block/custom/switches/switch_type_2", + "particle": "new_soviet:block/custom/switches/switch_type_2" }, "elements": [ { @@ -44,14 +44,43 @@ } } ], + "display": { + "thirdperson_righthand": { + "rotation": [90, 0, 0], + "translation": [0, 8, 0] + }, + "thirdperson_lefthand": { + "rotation": [90, 0, 0], + "translation": [0, 8, 0] + }, + "firstperson_righthand": { + "rotation": [-73, 180, 0], + "translation": [0, 9.25, 1.5] + }, + "firstperson_lefthand": { + "rotation": [-70, 180, 0], + "translation": [0, 9.25, 1.5] + }, + "ground": { + "rotation": [90, 0, 0], + "translation": [0, 5, 0] + }, + "gui": { + "rotation": [-44, 180, 45], + "translation": [0, 5, 0], + "scale": [2, 2, 1] + }, + "fixed": { + "translation": [0, 0, -6.75], + "scale": [2, 2, 1] + } + }, "groups": [ 0, { "name": "group", "origin": [0, 2, 0], "color": 0, - "nbt": "{}", - "armAnimationEnabled": false, "children": [1, 2] } ] diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_2_on.json b/src/main/resources/assets/new_soviet/models/block/switch_type_2_on.json similarity index 92% rename from src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_2_on.json rename to src/main/resources/assets/new_soviet/models/block/switch_type_2_on.json index 7a479d9..5dbfcbd 100644 --- a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_2_on.json +++ b/src/main/resources/assets/new_soviet/models/block/switch_type_2_on.json @@ -1,8 +1,8 @@ { "credit": "Made with Blockbench", "textures": { - "0": "switch_type_2", - "particle": "switch_type_2" + "0": "new_soviet:block/custom/switches/switch_type_2", + "particle": "new_soviet:block/custom/switches/switch_type_2" }, "elements": [ { diff --git a/src/main/resources/assets/new_soviet/models/item/dark_switch.json b/src/main/resources/assets/new_soviet/models/item/dark_switch.json new file mode 100644 index 0000000..58a98c6 --- /dev/null +++ b/src/main/resources/assets/new_soviet/models/item/dark_switch.json @@ -0,0 +1,4 @@ +{ + "parent": "new_soviet:block/switch_type_2_off" +} + diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_1_off.json b/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_1_off.json deleted file mode 100644 index eb495ce..0000000 --- a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_1_off.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "switch_type_1", - "particle": "switch_type_1" - }, - "elements": [ - { - "from": [5.5, 5.5, 15], - "to": [10.5, 10.5, 16], - "faces": { - "north": {"uv": [0, 0, 5, 5], "texture": "#0"}, - "east": {"uv": [5, 0, 6, 5], "texture": "#0"}, - "south": {"uv": [0, 5, 5, 10], "texture": "#0"}, - "west": {"uv": [5, 5, 6, 10], "texture": "#0"}, - "up": {"uv": [11, 1, 6, 0], "texture": "#0"}, - "down": {"uv": [11, 1, 6, 2], "texture": "#0"} - } - }, - { - "from": [7.502, 7, 14.55], - "to": [8.502, 9, 15.55], - "rotation": {"angle": -22.5, "axis": "x", "origin": [7.525, 8, 14.55]}, - "faces": { - "north": {"uv": [6, 2, 7, 4], "texture": "#0"}, - "east": {"uv": [6, 4, 7, 6], "texture": "#0"}, - "south": {"uv": [6, 6, 7, 8], "texture": "#0"}, - "west": {"uv": [7, 2, 8, 4], "texture": "#0"}, - "up": {"uv": [8, 5, 7, 4], "texture": "#0"}, - "down": {"uv": [8, 5, 7, 6], "texture": "#0"} - } - }, - { - "from": [7.5, 7, 14.55], - "to": [8.5, 8, 15.55], - "rotation": {"angle": 0, "axis": "x", "origin": [7.525, 8, 14.55]}, - "faces": { - "north": {"uv": [7, 6, 8, 7], "texture": "#0"}, - "east": {"uv": [7, 7, 8, 8], "texture": "#0"}, - "south": {"uv": [8, 2, 9, 3], "texture": "#0"}, - "west": {"uv": [8, 3, 9, 4], "texture": "#0"}, - "up": {"uv": [9, 5, 8, 4], "texture": "#0"}, - "down": {"uv": [9, 5, 8, 6], "texture": "#0"} - } - } - ], - "groups": [ - 0, - { - "name": "group", - "origin": [0, 0, 0], - "color": 0, - "nbt": "{}", - "armAnimationEnabled": false, - "children": [1, 2] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_1_on.json b/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_1_on.json deleted file mode 100644 index a9dc90b..0000000 --- a/src/main/resources/assets/new_soviet/textures/block/custom/switches/switch_type_1_on.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "credit": "Made with Blockbench", - "textures": { - "0": "switch_type_1", - "particle": "switch_type_1" - }, - "elements": [ - { - "from": [5.5, 5.5, 15], - "to": [10.5, 10.5, 16], - "faces": { - "north": {"uv": [0, 0, 5, 5], "texture": "#0"}, - "east": {"uv": [5, 0, 6, 5], "texture": "#0"}, - "south": {"uv": [0, 5, 5, 10], "texture": "#0"}, - "west": {"uv": [5, 5, 6, 10], "texture": "#0"}, - "up": {"uv": [11, 1, 6, 0], "texture": "#0"}, - "down": {"uv": [11, 1, 6, 2], "texture": "#0"} - } - }, - { - "from": [7.502, 7, 14.55], - "to": [8.502, 9, 15.55], - "rotation": {"angle": 0, "axis": "x", "origin": [7.525, 8, 14.55]}, - "faces": { - "north": {"uv": [6, 2, 7, 4], "texture": "#0"}, - "east": {"uv": [6, 4, 7, 6], "texture": "#0"}, - "south": {"uv": [6, 6, 7, 8], "texture": "#0"}, - "west": {"uv": [7, 2, 8, 4], "texture": "#0"}, - "up": {"uv": [8, 5, 7, 4], "texture": "#0"}, - "down": {"uv": [8, 5, 7, 6], "texture": "#0"} - } - }, - { - "from": [7.5, 7, 14.55], - "to": [8.5, 8, 15.55], - "rotation": {"angle": 22.5, "axis": "x", "origin": [7.525, 8, 14.55]}, - "faces": { - "north": {"uv": [7, 6, 8, 7], "texture": "#0"}, - "east": {"uv": [7, 7, 8, 8], "texture": "#0"}, - "south": {"uv": [8, 2, 9, 3], "texture": "#0"}, - "west": {"uv": [8, 3, 9, 4], "texture": "#0"}, - "up": {"uv": [9, 5, 8, 4], "texture": "#0"}, - "down": {"uv": [9, 5, 8, 6], "texture": "#0"} - } - } - ], - "groups": [ - 0, - { - "name": "group", - "origin": [0, 0, 0], - "color": 0, - "nbt": "{}", - "armAnimationEnabled": false, - "children": [1, 2] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 071a2a5..59e56bb 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -27,7 +27,7 @@ ] }, "depends": { - "fabricloader": ">=0.14.21", + "fabricloader": ">=0.14.22", "minecraft": "~1.20.1", "java": ">=17", "fabric-api": "*"