Skip to content

Commit 1799b54

Browse files
committed
❗ ❓ :equals: ⁉️
1 parent c293706 commit 1799b54

17 files changed

+222
-1
lines changed

src/main/java/com/okcoder1/matrixblocks/ModBlocks.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ public static Block register(Block block, String name, boolean shouldRegisterIte
8484
true
8585
);
8686

87+
public static final Block MATRIX_FENCE = register(
88+
new FenceBlock(AbstractBlock.Settings.create().sounds(BlockSoundGroup.DEEPSLATE)),
89+
"matrix_fence",
90+
true
91+
);
92+
public static final Block MATRIX_FENCE_GATE = register(
93+
new FenceGateBlock(WoodType.ACACIA, AbstractBlock.Settings.create().sounds(BlockSoundGroup.DEEPSLATE)),
94+
"matrix_fence_gate",
95+
true
96+
);
97+
8798
public static void initialize() {
8899
Registry.register(Registries.ITEM_GROUP, CUSTOM_ITEM_GROUP_KEY, CUSTOM_ITEM_GROUP);
89100
ItemGroupEvents.modifyEntriesEvent(CUSTOM_ITEM_GROUP_KEY).register(itemGroup -> {
@@ -96,6 +107,8 @@ public static void initialize() {
96107
itemGroup.add(ModBlocks.MATRIX_BUTTON);
97108
itemGroup.add(ModBlocks.MATRIX_PRESSURE_PLATE);
98109
itemGroup.add(ModBlocks.FADING_MATRIX_PRESSURE_PLATE);
110+
itemGroup.add(ModBlocks.MATRIX_FENCE);
111+
itemGroup.add(ModBlocks.MATRIX_FENCE_GATE);
99112
});
100113
}
101114
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"multipart": [
3+
{
4+
"apply": {
5+
"model": "matrix-blocks:block/matrix_fence_post"
6+
}
7+
},
8+
{
9+
"apply": {
10+
"model": "matrix-blocks:block/matrix_fence_side",
11+
"uvlock": true
12+
},
13+
"when": {
14+
"north": "true"
15+
}
16+
},
17+
{
18+
"apply": {
19+
"model": "matrix-blocks:block/matrix_fence_side",
20+
"uvlock": true,
21+
"y": 90
22+
},
23+
"when": {
24+
"east": "true"
25+
}
26+
},
27+
{
28+
"apply": {
29+
"model": "matrix-blocks:block/matrix_fence_side",
30+
"uvlock": true,
31+
"y": 180
32+
},
33+
"when": {
34+
"south": "true"
35+
}
36+
},
37+
{
38+
"apply": {
39+
"model": "matrix-blocks:block/matrix_fence_side",
40+
"uvlock": true,
41+
"y": 270
42+
},
43+
"when": {
44+
"west": "true"
45+
}
46+
}
47+
]
48+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"variants": {
3+
"facing=east,in_wall=false,open=false": {
4+
"model": "matrix-blocks:block/matrix_fence_gate",
5+
"uvlock": true,
6+
"y": 270
7+
},
8+
"facing=east,in_wall=false,open=true": {
9+
"model": "matrix-blocks:block/matrix_fence_gate_open",
10+
"uvlock": true,
11+
"y": 270
12+
},
13+
"facing=east,in_wall=true,open=false": {
14+
"model": "matrix-blocks:block/matrix_fence_gate_wall",
15+
"uvlock": true,
16+
"y": 270
17+
},
18+
"facing=east,in_wall=true,open=true": {
19+
"model": "matrix-blocks:block/matrix_fence_gate_wall_open",
20+
"uvlock": true,
21+
"y": 270
22+
},
23+
"facing=north,in_wall=false,open=false": {
24+
"model": "matrix-blocks:block/matrix_fence_gate",
25+
"uvlock": true,
26+
"y": 180
27+
},
28+
"facing=north,in_wall=false,open=true": {
29+
"model": "matrix-blocks:block/matrix_fence_gate_open",
30+
"uvlock": true,
31+
"y": 180
32+
},
33+
"facing=north,in_wall=true,open=false": {
34+
"model": "matrix-blocks:block/matrix_fence_gate_wall",
35+
"uvlock": true,
36+
"y": 180
37+
},
38+
"facing=north,in_wall=true,open=true": {
39+
"model": "matrix-blocks:block/matrix_fence_gate_wall_open",
40+
"uvlock": true,
41+
"y": 180
42+
},
43+
"facing=south,in_wall=false,open=false": {
44+
"model": "matrix-blocks:block/matrix_fence_gate",
45+
"uvlock": true
46+
},
47+
"facing=south,in_wall=false,open=true": {
48+
"model": "matrix-blocks:block/matrix_fence_gate_open",
49+
"uvlock": true
50+
},
51+
"facing=south,in_wall=true,open=false": {
52+
"model": "matrix-blocks:block/matrix_fence_gate_wall",
53+
"uvlock": true
54+
},
55+
"facing=south,in_wall=true,open=true": {
56+
"model": "matrix-blocks:block/matrix_fence_gate_wall_open",
57+
"uvlock": true
58+
},
59+
"facing=west,in_wall=false,open=false": {
60+
"model": "matrix-blocks:block/matrix_fence_gate",
61+
"uvlock": true,
62+
"y": 90
63+
},
64+
"facing=west,in_wall=false,open=true": {
65+
"model": "matrix-blocks:block/matrix_fence_gate_open",
66+
"uvlock": true,
67+
"y": 90
68+
},
69+
"facing=west,in_wall=true,open=false": {
70+
"model": "matrix-blocks:block/matrix_fence_gate_wall",
71+
"uvlock": true,
72+
"y": 90
73+
},
74+
"facing=west,in_wall=true,open=true": {
75+
"model": "matrix-blocks:block/matrix_fence_gate_wall_open",
76+
"uvlock": true,
77+
"y": 90
78+
}
79+
}
80+
}

src/main/resources/assets/matrix-blocks/lang/en_us.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
"block.matrix-blocks.fading_matrix_stairs": "Fading Matrix Stairs",
99
"block.matrix-blocks.matrix_button": "Matrix Button",
1010
"block.matrix-blocks.matrix_pressure_plate": "Matrix Pressure Plate",
11-
"block.matrix-blocks.fading_matrix_pressure_plate": "Fading Matrix Pressure Plate"
11+
"block.matrix-blocks.fading_matrix_pressure_plate": "Fading Matrix Pressure Plate",
12+
"block.matrix-blocks.matrix_fence": "Matrix Fence",
13+
"block.matrix-blocks.matrix_fence_fate": "Matrix Fence Gate"
1214
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/template_fence_gate",
3+
"textures": {
4+
"texture": "matrix-blocks:block/matrix_block"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/template_fence_gate_open",
3+
"textures": {
4+
"texture": "matrix-blocks:block/matrix_block"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/template_fence_gate_wall",
3+
"textures": {
4+
"texture": "matrix-blocks:block/matrix_block"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/template_fence_gate_wall_open",
3+
"textures": {
4+
"texture": "matrix-blocks:block/matrix_block"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/fence_post",
3+
"textures": {
4+
"texture": "matrix-blocks:block/matrix_block"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/fence_side",
3+
"textures": {
4+
"texture": "matrix-blocks:block/matrix_block"
5+
}
6+
}

0 commit comments

Comments
 (0)