@@ -23,7 +23,7 @@ public SDSConfig() {
2323 this (
2424 new Rules (
2525 List .of (
26- new Entry ("iron_bars" , Map . of () ),
26+ new Entry ("iron_bars" ),
2727 new Entry ("bamboo" , Map .of (
2828 "leaves" , List .of ("none" , "large" ),
2929 "age" , List .of ("all" )
@@ -32,10 +32,10 @@ public SDSConfig() {
3232 ),
3333 Map .of (),
3434 List .of (
35- new Entry ("stairs" , Map . of () ),
36- new Entry ("walls" , Map . of () ),
37- new Entry ("c:glass_panes" , Map . of () ),
38- new Entry ("fences" , Map . of () ),
35+ new Entry ("stairs" ),
36+ new Entry ("walls" ),
37+ new Entry ("c:glass_panes" ),
38+ new Entry ("fences" ),
3939 new Entry ("slabs" , Map .of (
4040 "type" , List .of ("top" , "bottom" )
4141 )
@@ -108,10 +108,14 @@ public record Entry(
108108 static Codec <Entry > CODEC = RecordCodecBuilder .create (
109109 instance -> instance .group (
110110 Codec .STRING .fieldOf ("id" ).forGetter (Entry ::id ),
111- Codec .unboundedMap (Codec .STRING , Codec .list (Codec .STRING )).fieldOf ("properties" ).forGetter (Entry ::properties )
111+ Codec .unboundedMap (Codec .STRING , Codec .list (Codec .STRING )).optionalFieldOf ("properties" , Map . of () ).forGetter (Entry ::properties )
112112 ).apply (instance , Entry ::new )
113113 );
114114
115+ public Entry (String id ) {
116+ this (id , Map .of ());
117+ }
118+
115119 public boolean isEmpty () {
116120 return properties == null || properties .isEmpty ();
117121 }
0 commit comments