Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1.20.x/ropes #1952

Merged
merged 14 commits into from
Dec 19, 2023
Prev Previous commit
Next Next commit
Implemented knots
  • Loading branch information
jodlodi committed Dec 5, 2023
commit ccdfe4233ba7b71e1fd18cdc5fb4a28634f02a32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.2 2023-12-04T01:16:05.1826885 TwilightForest blockstates and block models
// 1.20.2 2023-12-05T15:03:41.1622639 TwilightForest blockstates and block models
cab88029518a1647ec691d136328ed93c18108be assets/twilightforest/blockstates/acacia_banister.json
9472090eea384d675fee73a90ed033b799c88820 assets/twilightforest/blockstates/alpha_yeti_boss_spawner.json
94ee00eebd82061338b6db439a84b3fdf98f3942 assets/twilightforest/blockstates/alpha_yeti_trophy.json
Expand Down Expand Up @@ -306,7 +306,7 @@ c3d60011dd0cdefa0cc3f0b45672794fe5a9f305 assets/twilightforest/blockstates/react
559af5d22287bc8d15ab9819c724f8451b48b20d assets/twilightforest/blockstates/red_thread.json
bb7819736d9dd523bd69ca88e344478c4c2e4a45 assets/twilightforest/blockstates/root.json
c7e8c3ec3d2c159a84327ac576f92eae60eb200e assets/twilightforest/blockstates/root_strand.json
b731767c834531a7bc1225d7eaf0095534078368 assets/twilightforest/blockstates/rope.json
c3f85a792806bebfa4aba2d1001e4c8760600b36 assets/twilightforest/blockstates/rope.json
94ee00eebd82061338b6db439a84b3fdf98f3942 assets/twilightforest/blockstates/skeleton_skull_candle.json
94ee00eebd82061338b6db439a84b3fdf98f3942 assets/twilightforest/blockstates/skeleton_wall_skull_candle.json
bb9836bc48eb6cbc52a2c7fb9b833d4085315602 assets/twilightforest/blockstates/slider.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,31 @@
"when": {
"z": "true"
}
},
{
"apply": {
"model": "twilightforest:block/rope_knot"
},
"when": {
"AND": [
{
"OR": [
{
"x": "true",
"y": "true"
},
{
"y": "true",
"z": "true"
},
{
"x": "true",
"z": "true"
}
]
}
]
}
}
]
}
7 changes: 6 additions & 1 deletion src/main/java/twilightforest/data/BlockstateGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ protected void registerStatesAndModels() {
getMultipartBuilder(TFBlocks.ROPE.value())
.part().modelFile(models().getExistingFile(prefix("block/rope_y"))).addModel().condition(RopeBlock.Y, true).end()
.part().modelFile(models().getExistingFile(prefix("block/rope_x"))).addModel().condition(RopeBlock.X, true).end()
.part().modelFile(models().getExistingFile(prefix("block/rope_z"))).addModel().condition(RopeBlock.Z, true).end();
.part().modelFile(models().getExistingFile(prefix("block/rope_z"))).addModel().condition(RopeBlock.Z, true).end()
.part().modelFile(models().getExistingFile(prefix("block/rope_knot"))).addModel().nestedGroup().useOr()
.nestedGroup().condition(RopeBlock.X, true).condition(RopeBlock.Y, true).endNestedGroup()
.nestedGroup().condition(RopeBlock.Y, true).condition(RopeBlock.Z, true).endNestedGroup()
.nestedGroup().condition(RopeBlock.Z, true).condition(RopeBlock.X, true).endNestedGroup()
.end();

towerBlocks();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parent": "block/block",
"textures": {
"particle": "twilightforest:block/rope",
"all": "twilightforest:block/rope"
},
"elements": [
{
"from": [6, 6, 6],
"to": [10, 10, 10],
"shade": false,
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [1, 12, 5, 16], "rotation": 90, "texture": "#all"},
"east": {"uv": [1, 8, 5, 12], "rotation": 90, "texture": "#all"},
"south": {"uv": [1, 4, 5, 8], "rotation": 90, "texture": "#all"},
"west": {"uv": [1, 0, 5, 4], "rotation": 90, "texture": "#all"},
"up": {"uv": [1, 2, 5, 6], "rotation": 90, "texture": "#all"},
"down": {"uv": [1, 10, 5, 14], "rotation": 90, "texture": "#all"}
}
}
]
}