1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

type -> kind

This commit is contained in:
mat 2022-06-16 20:48:01 -05:00
parent 5d5441427f
commit 4f89f70091
3 changed files with 8 additions and 3 deletions

View file

@ -272,7 +272,7 @@ make_block_states! {
Upper,
Lower,
},
"type" => PistonType {
"kind" => PistonType {
Normal,
Sticky,
},
@ -333,7 +333,7 @@ make_block_states! {
OuterLeft,
OuterRight,
},
"type" => ChestType {
"kind" => ChestType {
Single,
Left,
Right,
@ -936,7 +936,7 @@ make_block_states! {
_14,
_15,
},
"type" => Type {
"kind" => Type {
Top,
Bottom,
Double,

View file

@ -3,3 +3,4 @@ mod blocks;
pub use behavior::BlockBehavior;
pub use blocks::*;

View file

@ -103,6 +103,10 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li
ending = property_name.split('_')[-1]
if ending.isdigit():
property_name = property_name[:-(len(ending) + 1)]
# `type` is a reserved keyword, so we use kind instead ¯\_(ツ)_/¯
if property_name == 'type':
property_name = 'kind'
property_struct_names_to_names[property_struct_name] = property_name
properties.update(block_properties)