Stevertus / objD

objD is a framework for developing Datapacks for Minecraft. It uses the Dart programming language.
https://objd.stevertus.com
BSD 2-Clause "Simplified" License
45 stars 13 forks source link

Data.get(...) generates command with scale value for non-numeric returns #13

Closed dthigpen closed 3 years ago

dthigpen commented 4 years ago

Data.get(...) can be used to return data of numeric, string, or JSON object types, however the resulting command from Data.get(...) appends a scale of 1 at the end, making anything but numeric get calls invalid.

Example: The following should return the object with the players inventory Dart: Data.get(Entity.Player(), path: "Inventory") mcfunction: data get entity @p Inventory 1 Minecraft error message: "Can't get Inventory; only numeric tags are allowed"

Possible resolution: Do not output scale by default since it implicitly returns the scale of 1 anyway. data get entity @p Inventory

Stevertus commented 3 years ago

This will be fixed in 0.3.5. Meanwhile you can use Git as source for your pubspec if this breaks something