Skip to content

Commit dbb5004

Browse files
committed
Change iota renderer fields from camelCase to snake_case
1 parent cadf7ba commit dbb5004

File tree

23 files changed

+56
-55
lines changed

23 files changed

+56
-55
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
2222
### Changed
2323

2424
- ⚠️ Breaking: The `hexdebug:list` renderer type now has a required field `renderer` to render the iota; the list renderer now only provides the tooltip.
25+
- ⚠️ Breaking: Changed all Splicing Table iota renderer JSON fields from camelCase to snake_case.
2526
- List iotas now render their first iota (if any) in the Splicing Table.
2627
- MoreIotas' item type iotas now render brackets around the item to distinguish them from item stack iotas.
2728
- A single Focal Frame item can now be used like a bundle to insert/remove items in your inventory.

Common/src/main/kotlin/gay/object/hexdebug/gui/splicing/renderers/Item.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ class ItemRendererProvider(
6868
companion object {
6969
val PARSER = SplicingTableIotaRendererParser<ItemRendererProvider> { _, json, parent ->
7070
ItemRendererProvider(
71-
itemPath = json.getAsNbtPath("itemPath", parent?.itemPath),
72-
blockPath = json.getAsNbtPathOrNull("blockPath", parent?.blockPath),
73-
countPath = json.getAsNbtPathOrNull("countPath", parent?.countPath),
74-
tagPath = json.getAsNbtPathOrNull("tagPath", parent?.tagPath),
75-
xOffset = GsonHelper.getAsFloat(json, "xOffset", 0f),
76-
yOffset = GsonHelper.getAsFloat(json, "yOffset", 0f),
71+
itemPath = json.getAsNbtPath("item_path", parent?.itemPath),
72+
blockPath = json.getAsNbtPathOrNull("block_path", parent?.blockPath),
73+
countPath = json.getAsNbtPathOrNull("count_path", parent?.countPath),
74+
tagPath = json.getAsNbtPathOrNull("tag_path", parent?.tagPath),
75+
xOffset = GsonHelper.getAsFloat(json, "x_offset", 0f),
76+
yOffset = GsonHelper.getAsFloat(json, "y_offset", 0f),
7777
scale = GsonHelper.getAsFloat(json, "scale", 0.75f),
7878
)
7979
}

Common/src/main/kotlin/gay/object/hexdebug/gui/splicing/renderers/Layers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class LayersRendererProvider(
6666
RendererLayer(
6767
renderer = layerObject.getAsIotaRendererProvider("renderer"),
6868
scale = GsonHelper.getAsFloat(layerObject, "scale", 1f),
69-
useTooltip = GsonHelper.getAsBoolean(layerObject, "useTooltip", true),
69+
useTooltip = GsonHelper.getAsBoolean(layerObject, "use_tooltip", true),
7070
)
7171
},
7272
)

Common/src/main/kotlin/gay/object/hexdebug/gui/splicing/renderers/Texture.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ data class TextureRendererProvider(
5050
val PARSER = SplicingTableIotaRendererParser<TextureRendererProvider> { _, json, parent ->
5151
TextureRendererProvider(
5252
texture = json.getAsResourceLocation("texture", parent?.texture),
53-
xOffset = GsonHelper.getAsInt(json, "xOffset", parent?.xOffset ?: 0),
54-
yOffset = GsonHelper.getAsInt(json, "yOffset", parent?.yOffset ?: 0),
55-
uOffset = GsonHelper.getAsInt(json, "uOffset", parent?.uOffset ?: 0),
56-
vOffset = GsonHelper.getAsInt(json, "vOffset", parent?.vOffset ?: 0),
53+
xOffset = GsonHelper.getAsInt(json, "x_offset", parent?.xOffset ?: 0),
54+
yOffset = GsonHelper.getAsInt(json, "y_offset", parent?.yOffset ?: 0),
55+
uOffset = GsonHelper.getAsInt(json, "u_offset", parent?.uOffset ?: 0),
56+
vOffset = GsonHelper.getAsInt(json, "v_offset", parent?.vOffset ?: 0),
5757
width = GsonHelper.getAsInt(json, "width", parent?.width ?: 18),
5858
height = GsonHelper.getAsInt(json, "height", parent?.height ?: 21),
59-
textureWidth = GsonHelper.getAsInt(json, "textureWidth", parent?.textureWidth ?: 18),
60-
textureHeight = GsonHelper.getAsInt(json, "textureHeight", parent?.textureHeight ?: 21),
61-
useIotaColor = GsonHelper.getAsBoolean(json, "useIotaColor", true),
59+
textureWidth = GsonHelper.getAsInt(json, "texture_width", parent?.textureWidth ?: 18),
60+
textureHeight = GsonHelper.getAsInt(json, "texture_height", parent?.textureHeight ?: 21),
61+
useIotaColor = GsonHelper.getAsBoolean(json, "use_iota_color", true),
6262
)
6363
}
6464
}

Common/src/main/kotlin/gay/object/hexdebug/gui/splicing/renderers/conditional/IfPathExists.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class IfPathExistsRendererProvider(
3434
path = jsonObject.getAsNbtPath("path", parent?.path),
3535
providerIf = jsonObject.getAsIotaRendererProvider("if", parent?.providerIf),
3636
providerElse = jsonObject.getAsIotaRendererProvider("else", parent?.providerElse),
37-
allowInSubIota = GsonHelper.getAsBoolean(jsonObject, "allowInSubIota", parent?.allowInSubIota ?: false)
37+
allowInSubIota = GsonHelper.getAsBoolean(jsonObject, "allow_in_sub_iota", parent?.allowInSubIota ?: false)
3838
)
3939
}
4040
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"type": "hexdebug:texture",
33
"texture": "hexdebug:textures/gui/splicing_table.png",
4-
"xOffset": 2,
5-
"yOffset": 3,
4+
"x_offset": 2,
5+
"y_offset": 3,
66
"width": 14,
77
"height": 14,
8-
"textureWidth": 512,
9-
"textureHeight": 512
8+
"texture_width": 512,
9+
"texture_height": 512
1010
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"parent": "hexdebug:builtin/base",
3-
"uOffset": 353,
4-
"vOffset": 73
3+
"u_offset": 353,
4+
"v_offset": 73
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"parent": "hexdebug:builtin/base",
3-
"uOffset": 369,
4-
"vOffset": 89
3+
"u_offset": 369,
4+
"v_offset": 89
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"parent": "hexdebug:builtin/base",
3-
"uOffset": 337,
4-
"vOffset": 57
3+
"u_offset": 337,
4+
"v_offset": 57
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"parent": "hexdebug:builtin/base",
3-
"uOffset": 369,
4-
"vOffset": 57
3+
"u_offset": 369,
4+
"v_offset": 57
55
}

0 commit comments

Comments
 (0)