-Instead of having the game functions <span style="color:#C792EA">`hash_map_string`</span>, <span style="color:#C792EA">`hash_map_i32`</span>, <span style="color:#C792EA">`hash_map_f32`</span>, etc., the [grug mod loader for Minecraft](https://github.com/MyNameIsTrez/grug-mod-loader-for-minecraft) offers a generic <span style="color:#C792EA">`hash_map`</span> game function that only stores <span style="color:#FFC964">`id`</span>s. The way to store an <span style="color:#FFC964">`string`</span> or <span style="color:#FFC964">`i32`</span> in it is inspired by [Java's autoboxing](https://docs.oracle.com/javase/tutorial/java/data/autoboxing.html): you use the game function <span style="color:#C792EA">`box_i32`</span> to wrap an <span style="color:#FFC964">`i32`</span> in an object, and <span style="color:#C792EA">`unbox_i32`</span> to unwrap it.
0 commit comments