Datapack Utils

Datapack Utils 3.4.1

Added Built-in pre-generator with special compatibility with chunk scan. To use, run the command /function du:world/pregen.
Added Forest biomes type predicate
Updated ChunkScan, fixes entities being spammed in the End
Fixed click detection for modes 3b and 5b
Added xor-shift pRNG: useful for generating a random number based on x/z position.
Added function du:world/random_seeded, based on the new xor-shift. Uses and LCG to generate random numbers seeded from the current location
Ore generation is now seeded
The structure generator will restrict placement if it detects a vanilla structure
Fixed some issues with ore gen
Fixed some issues with structure gen
Fixed item stutter in certain cases
Fixed Coal Block not being accepted as fuel in custom smelting recipes
Finalized 2.1 API
  • Changed variable names in base, crafting, and get powered functions
  • Cleaned up some code related to Lantern Load
Updated Chunk Scan
Click Detect should no longer push you around in Spigot environments (and its derivatives)
Fixed another bug in click detection
Fixed bamboo & scaffolding not being recognized as fuel
Preparation for Mechanization 2.2.0
Fixed minor issue with click detection
Performance improvements for world gen in multiplayer
Bug Fixes
WARNING: Do not update to DU 2.1.0 until the dependents(s) you're using say they have updated to this version! The API has undergone a minor rework to clean up old code and improve usability. As a result, all datapacks that use pre 2.1 are not compatible with this update.

  1. Updated to Minecraft 1.15
  2. Completely overhauled the terrain generator:
  • Now using the library ChunkScan, created in collaboration with misode, which makes DU's generation (and it's derivatives) usable with other datapacks that also use ChunkScan (actual compatibility may vary).
  • Added a new "Tiny" structure size that generates in every chunk
  • Large structures now have guaranteed spacing instead of being a random upgrade from medium structs
  • Medium & Large structs now prevent smaller structs from generating in an area around them, preventing overwriting
  • Ore & struct generation now use storage for better performance
  • Optimized many sections of the structure generator
  1. Pretty much everything uses storage now, where applicable
  2. Added a bunch of useful predicates
  3. Cleaned up some old code, removed some unused systems
  4. Fixed get/restore equipment functions
  5. Fixed items with custom durability sometimes deleting your mainhand/other armor
  6. Fixed click detect entities sometimes being left in the world
  7. Altered the shulker box loot table to improve compatibility
  8. Fixed unpowered comparaters trigging the get redstone function
Notes to developers (if there are any out there):

  • The struct/ore register functions have changed
  • Several function tags have been renamed or moved into new directories
  • Most functions have had their scoreboard variables prefixed with $<sections>.: for example math/random.mcfunction now uses $math.in_0 du_data and $math.out_0 du_data. You can see all of the variables and what they do by looking at the function code (they are declared at the top).
Players in spectator mode will now cause custom generation in single player
Fixed gravel loot table
Fixed some issues with the custom furnace recipe API
DU now uses Lantern for version control. As a result, datapacks that use the old version control system might not like the change. Pretty sure I've fixed known issues with world/ore/struct gen.
Potential fix for world generation being ran multiple times in 1 chunk
Improved speed and accuracy of Random functions
Added get weather function
Optimized worldgen functions and fixed some bugs/inconsistencies
  • Structure generation is now (theoretically) seeded
  • Medium/Large structures now have a minimum distance from each other
  • Fixes to generating structures/ores in other dimensions