Add new switch type

This commit is contained in:
Andrew-71 2023-09-29 16:08:47 +03:00
parent c1d7208ae8
commit f29f4daf80
11 changed files with 154 additions and 126 deletions

View file

@ -2,10 +2,9 @@
* Add fences * Add fences
* Add windows * Add windows
* Add (with functionality) present appliance/furniture/electronics textures * Add (with functionality) present appliance/furniture/electronics textures
* Add advancements (with datagen)
* What's switch type 2? * What's switch type 2?
* Cigarette and handrail are BROKEN and the code is a MESS sorry, but it needs CLEANUP * 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 * Fix post lamp hitboxes
* Add credits in models * Add credits in models

View file

@ -39,6 +39,7 @@ public class NSE_Custom extends NSE_BaseRegistration {
public static final RadioReceiverBlock RADIO_RECEIVER = new RadioReceiverBlock(); 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 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 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 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)); 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("siren", () -> SIREN, NSE_CUSTOM_TAB);
registerBlock("landmine", () -> LANDMINE, NSE_CUSTOM_TAB); registerBlock("landmine", () -> LANDMINE, NSE_CUSTOM_TAB);
registerBlock("switch", () -> SWITCH, 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("white_checker", () -> WHITE_CHECKER, NSE_CUSTOM_TAB);
registerBlock("black_checker", () -> BLACK_CHECKER, NSE_CUSTOM_TAB); registerBlock("black_checker", () -> BLACK_CHECKER, NSE_CUSTOM_TAB);
registerBlock("white_pawn", () -> WHITE_PAWN, NSE_CUSTOM_TAB); registerBlock("white_pawn", () -> WHITE_PAWN, NSE_CUSTOM_TAB);

View file

@ -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
}
}
}

View file

@ -199,6 +199,7 @@
"subtitles.new_soviet.item_rake_till": "Rake tills", "subtitles.new_soviet.item_rake_till": "Rake tills",
"item.new_soviet.concentrate": "Nutrient Block", "item.new_soviet.concentrate": "Nutrient Block",
"block.new_soviet.switch": "Switch", "block.new_soviet.switch": "Switch",
"block.new_soviet.dark_switch": "Dark Switch",
"block.new_soviet.nii_wall_1": "Diorite RI Wall", "block.new_soviet.nii_wall_1": "Diorite RI Wall",
"block.new_soviet.cracked_nii_wall_1": "Cracked Diorite RI Wall", "block.new_soviet.cracked_nii_wall_1": "Cracked Diorite RI Wall",
"block.new_soviet.nii_wall_2": "RI Wall", "block.new_soviet.nii_wall_2": "RI Wall",

View file

@ -79,7 +79,6 @@
"name": "group", "name": "group",
"origin": [0, 0, 0], "origin": [0, 0, 0],
"color": 0, "color": 0,
"nbt": "{}",
"children": [0, 1, 2] "children": [0, 1, 2]
} }
] ]

View file

@ -1,8 +1,8 @@
{ {
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"textures": { "textures": {
"0": "switch_type_2", "0": "new_soviet:block/custom/switches/switch_type_2",
"particle": "switch_type_2" "particle": "new_soviet:block/custom/switches/switch_type_2"
}, },
"elements": [ "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": [ "groups": [
0, 0,
{ {
"name": "group", "name": "group",
"origin": [0, 2, 0], "origin": [0, 2, 0],
"color": 0, "color": 0,
"nbt": "{}",
"armAnimationEnabled": false,
"children": [1, 2] "children": [1, 2]
} }
] ]

View file

@ -1,8 +1,8 @@
{ {
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"textures": { "textures": {
"0": "switch_type_2", "0": "new_soviet:block/custom/switches/switch_type_2",
"particle": "switch_type_2" "particle": "new_soviet:block/custom/switches/switch_type_2"
}, },
"elements": [ "elements": [
{ {

View file

@ -0,0 +1,4 @@
{
"parent": "new_soviet:block/switch_type_2_off"
}

View file

@ -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]
}
]
}

View file

@ -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]
}
]
}

View file

@ -27,7 +27,7 @@
] ]
}, },
"depends": { "depends": {
"fabricloader": ">=0.14.21", "fabricloader": ">=0.14.22",
"minecraft": "~1.20.1", "minecraft": "~1.20.1",
"java": ">=17", "java": ">=17",
"fabric-api": "*" "fabric-api": "*"