Skip to content

Commit

Permalink
Add proper item pipe model, improve fluid pipe model
Browse files Browse the repository at this point in the history
  • Loading branch information
Rearth committed Apr 5, 2024
1 parent ac84d24 commit ca416a5
Show file tree
Hide file tree
Showing 11 changed files with 385 additions and 101 deletions.
3 changes: 0 additions & 3 deletions src/main/java/rearth/oritech/client/ui/ItemFilterScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ protected void build(FlowLayout rootComponent) {
nbtButton.horizontalSizing(Sizing.fixed(buttonWidth));
overlay.child(nbtButton.positioning(Positioning.absolute(110, 46)));

var title = Components.label(Text.of("Item Filter")).color(new Color(45 / 255f, 45 / 255f, 46 / 255f));
overlay.child(title.positioning(Positioning.absolute(60, 7)));

addTitle(overlay);

rootComponent.child(
Expand Down
64 changes: 51 additions & 13 deletions src/main/resources/assets/oritech/blockstates/item_pipe.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,100 @@
{
"multipart": [
{
"when": {
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_inner"
"model": "oritech:block/item_pipe_inner"
}
},
{
"when": {
"north": "true"
"north": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer"
"model": "oritech:block/item_pipe_outer"
}
},
{
"when": {
"south": "true"
"south": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"y": 180
}
},
{
"when": {
"east": "true"
"east": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"y": 90
}
},
{
"when": {
"west": "true"
"west": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"y": 270
}
},
{
"when": {
"up": "true"
"up": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"x": -90
}
},
{
"when": {
"down": "true"
"down": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"x": 90
}
},
{
"when": {
"down": "true",
"straight": "true"
},
"apply": {
"model": "oritech:block/item_pipe_straight",
"x": 90
}
},
{
"when": {
"east": "true",
"straight": "true"
},
"apply": {
"model": "oritech:block/item_pipe_straight",
"y": 90
}
},
{
"when": {
"north": "true",
"straight": "true"
},
"apply": {
"model": "oritech:block/item_pipe_straight"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,113 +1,157 @@
{
"multipart": [
{
"when": {
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_inner"
"model": "oritech:block/item_pipe_inner"
}
},
{
"when": {
"north": "true"
"north": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer"
"model": "oritech:block/item_pipe_outer"
}
},
{
"when": {
"south": "true"
"south": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"y": 180
}
},
{
"when": {
"east": "true"
"east": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"y": 90
}
},
{
"when": {
"west": "true"
"west": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"y": 270
}
},
{
"when": {
"up": "true"
"up": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"x": -90
}
},
{
"when": {
"down": "true"
"down": "true",
"straight": "false"
},
"apply": {
"model": "oritech:block/generic_pipe_outer",
"model": "oritech:block/item_pipe_outer",
"x": 90
}
},
{
"when": {
"con_north": "true"
"down": "true",
"straight": "true"
},
"apply": {
"model": "oritech:block/item_pipe_straight",
"x": 90
}
},
{
"when": {
"east": "true",
"straight": "true"
},
"apply": {
"model": "oritech:block/item_pipe_straight",
"y": 90
}
},
{
"when": {
"north": "true",
"straight": "true"
},
"apply": {
"model": "oritech:block/item_pipe_straight"
}
},
{
"when": {
"con_north": "true",
"extract": true
},
"apply": {
"model": "oritech:block/generic_pipe_connection_outer"
"model": "oritech:block/item_pipe_connection_outer"
}
},
{
"when": {
"con_south": "true"
"con_south": "true",
"extract": true
},
"apply": {
"model": "oritech:block/generic_pipe_connection_outer",
"model": "oritech:block/item_pipe_connection_outer",
"y": 180
}
},
{
"when": {
"con_east": "true"
"con_east": "true",
"extract": true
},
"apply": {
"model": "oritech:block/generic_pipe_connection_outer",
"model": "oritech:block/item_pipe_connection_outer",
"y": 90
}
},
{
"when": {
"con_west": "true"
"con_west": "true",
"extract": true
},
"apply": {
"model": "oritech:block/generic_pipe_connection_outer",
"model": "oritech:block/item_pipe_connection_outer",
"y": 270
}
},
{
"when": {
"con_up": "true"
"con_up": "true",
"extract": true
},
"apply": {
"model": "oritech:block/generic_pipe_connection_outer",
"model": "oritech:block/item_pipe_connection_outer",
"x": -90
}
},
{
"when": {
"con_down": "true"
"con_down": "true",
"extract": true
},
"apply": {
"model": "oritech:block/generic_pipe_connection_outer",
"model": "oritech:block/item_pipe_connection_outer",
"x": 90
}
}
Expand Down
39 changes: 0 additions & 39 deletions src/main/resources/assets/oritech/models/block/fluid_pipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,6 @@
"up": {"uv": [1.5, 7, 0, 3], "texture": "#1"},
"down": {"uv": [3, 3, 1.5, 7], "texture": "#1"}
}
},
{
"name": "core",
"from": [5, 5, 5],
"to": [11, 11, 11],
"faces": {
"north": {"uv": [5, 3.5, 6.5, 5], "texture": "#1"},
"east": {"uv": [4.5, 5, 6, 6.5], "texture": "#1"},
"south": {"uv": [6, 0, 7.5, 1.5], "texture": "#1"},
"west": {"uv": [6, 5, 7.5, 6.5], "texture": "#1"},
"up": {"uv": [8, 3, 6.5, 1.5], "texture": "#1"},
"down": {"uv": [4.5, 6.5, 3, 8], "texture": "#1"}
}
},
{
"name": "north",
"from": [5, 5, 0],
"to": [11, 11, 5],
"faces": {
"north": {"uv": [6.5, 3, 8, 4.5], "texture": "#1"},
"east": {"uv": [6, 6.5, 7.25, 8], "texture": "#1"},
"south": {"uv": [4.5, 6.5, 6, 8], "texture": "#1"},
"west": {"uv": [0, 7, 1.25, 8.5], "texture": "#1"},
"up": {"uv": [2.75, 8.25, 1.25, 7], "texture": "#1"},
"down": {"uv": [8.75, 6.5, 7.25, 7.75], "texture": "#1"}
}
},
{
"name": "machine_interface",
"from": [4, 4, -0.25],
"to": [12, 12, 1.75],
"faces": {
"north": {"uv": [3, 3, 5, 5], "texture": "#1"},
"east": {"uv": [7.5, 4.5, 8, 6.5], "texture": "#1"},
"south": {"uv": [4, 0, 6, 2], "texture": "#1"},
"west": {"uv": [7.25, 7.75, 7.75, 9.75], "texture": "#1"},
"up": {"uv": [9.5, 0.5, 7.5, 0], "texture": "#1"},
"down": {"uv": [9.5, 0.5, 7.5, 1], "texture": "#1"}
}
}
],
"display": {
Expand Down
Loading

0 comments on commit ca416a5

Please sign in to comment.