0.3.5
There is a new package objd_gen
: https://pub.dev/packages/objd_gen
This gives you the possibility to use dart code generation with objD through annotations. This could improve the experience of writing Datapacks drastically and reduces boilerplate
@Wdg
Widget hello(String name) => Log('Hello $name!');
It basically boils down the concept of Widgets to Functions. If you are interested, read more here: https://objd.stevertus.com/cli/#objd-gen
As always I am open to suggestions and ideas to improve this idea.
Second big thing is the version argument for Projects.
Project(
name: '...',
version: 17,
)
Not only does this change the pack.mcmeta accordingly, but it also passes it to the Widgets as part of the Context. ReplaceItem already takes advantage of this by dynamically generating it with /replaceitem
or /item
depending on the version
All changes:
- added Annotation classes to be used with objd_gen, which drastically lowers code complexity
- added ReplaceItem.copy, ReplaceItem.clear and ReplaceItem.modify implementing 1.17 item command
- added a version parameter to context to allow widget to generate version specific code
- added Particle.dust and Particle.copyWith alongside with major rework of the Particle command and simplification of code
- added Recipe Widget with ability to generate Minecraft Recipe Files of any type
- added the possibility to use a String as an Argument for Dimensions to support custom dimensions
- added missing toPath property to Storage.modify
- updated ReplaceItem to adapt automatically to the projects version
- updated blocks, items, particles and entities to include content from 21w03a
- fixed Effect nbt Generator not using the Byte Generator correctly
- fixed issues with having two Packs at the top level of the tree
- removed default scale value from Data.get