Skip to content

Commit

Permalink
community: Revert to manually formatted model file (and clean them up…
Browse files Browse the repository at this point in the history
… a bit)
  • Loading branch information
obiwac committed Aug 13, 2024
1 parent 0e7335e commit 6337da3
Show file tree
Hide file tree
Showing 23 changed files with 67 additions and 26 deletions.
3 changes: 1 addition & 2 deletions community/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"button",
"snow",
"cactus",
"tinted_glass"
"tinted_glass",
]

from . import *

6 changes: 4 additions & 2 deletions community/models/button.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
translucent = False
transparent = 2
is_cube = False
glass = False
translucent = False

# fmt: off

colliders = []

Expand Down Expand Up @@ -30,4 +32,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/cactus.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
is_cube = False
glass = False

# fmt: off

colliders = [
[
(-0.4375, -0.5, -0.4375),
Expand Down Expand Up @@ -35,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/crop.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand Down Expand Up @@ -36,4 +38,4 @@
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
5 changes: 3 additions & 2 deletions community/models/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5, -0.5),
Expand All @@ -19,7 +21,6 @@
[ 0.5, 0.5, -0.5, 0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, 0.5, -0.5], # back
]

# Deprecating
tex_coords = [
[0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0],
[0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0],
Expand All @@ -36,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/door.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand Down Expand Up @@ -30,4 +32,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -24,4 +26,4 @@
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
]
]
4 changes: 3 additions & 1 deletion community/models/flat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -18,4 +20,4 @@
shading_values = [
[1.0, 1.0, 1.0, 1.0],
[0.4, 0.4, 0.4, 0.4],
]
]
4 changes: 3 additions & 1 deletion community/models/glass.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = True
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5, -0.5),
Expand Down Expand Up @@ -35,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/ladder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -24,4 +26,4 @@
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
]
]
2 changes: 2 additions & 0 deletions community/models/leaves.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5, -0.5),
Expand Down
6 changes: 4 additions & 2 deletions community/models/lever.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
transparent = True
transparent = 1
is_cube = False
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand Down Expand Up @@ -30,4 +32,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
5 changes: 3 additions & 2 deletions community/models/liquid.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# in the end, it'd be nice to have it so that liquids fill up the whole block when they have a block above them
# this would avoid the problems this solution has

translucent = True
transparent = 1
is_cube = True
glass = True
translucent = True

# fmt: off

colliders = []

Expand All @@ -26,7 +28,6 @@
[0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0],
]


shading_values = [
[0.6, 0.6, 0.6, 0.6],
[0.6, 0.6, 0.6, 0.6],
Expand Down
4 changes: 3 additions & 1 deletion community/models/plant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -24,4 +26,4 @@
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
]
]
4 changes: 3 additions & 1 deletion community/models/pressure_plate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -18,4 +20,4 @@
shading_values = [
[1.0, 1.0, 1.0, 1.0],
[0.4, 0.4, 0.4, 0.4],
]
]
4 changes: 3 additions & 1 deletion community/models/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -24,4 +26,4 @@
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
]
]
4 changes: 3 additions & 1 deletion community/models/sign_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand All @@ -24,4 +26,4 @@
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
[1.0, 1.0, 1.0, 1.0],
]
]
4 changes: 3 additions & 1 deletion community/models/slab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5, -0.5),
Expand Down Expand Up @@ -35,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/snow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5000, -0.5),
Expand All @@ -23,4 +25,4 @@
shading_values = [
[1.0, 1.0, 1.0, 1.0],
[0.4, 0.4, 0.4, 0.4],
]
]
4 changes: 3 additions & 1 deletion community/models/soil.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5000, -0.5),
Expand Down Expand Up @@ -35,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/stairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = [
[
(-0.5, -0.5, -0.5),
Expand Down Expand Up @@ -35,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
4 changes: 3 additions & 1 deletion community/models/tinted_glass.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = True
translucent = True

# fmt: off

colliders = [
[
(-0.5, -0.5, -0.5),
Expand Down Expand Up @@ -35,4 +37,4 @@
[0.4, 0.4, 0.4, 0.4],
[0.8, 0.8, 0.8, 0.8],
[0.8, 0.8, 0.8, 0.8],
]
]
2 changes: 2 additions & 0 deletions community/models/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
glass = False
translucent = False

# fmt: off

colliders = []

vertex_positions = [
Expand Down

0 comments on commit 6337da3

Please sign in to comment.