Coder Social home page Coder Social logo

datapack-utilities's Introduction

As of MC 1.19, Datapack Util's feature set is being split into modern embedded libraries. If you are a datapack user, you don't have to worry about this. You no longer need to download a separate library- everything will be included in the primary datapack. If you are a developer, please reference the list of new libraries for features you need:

  • BlockUtils - various ways to interact with blocks, currently limited to get redstone power
  • ChunkScan - postgen utility, compatible with any dimension
  • ChunkScan.Ores - extension of chunk scan adding custom ore generation
  • LoottableAutosmelt - custom 'enchants' such as auto smelt added via loot tables
  • PlayerAction - wrapper for various scoreboard and advancement triggers, including click detection
  • DatapackEnergy - universal energy system for tech datapacks like Mechanization
  • See also: Smithed Libraries for nbt crafting, player damage, custom durability, and more.

Download Here: Releases

Datapack-Utilities

Datapack Utils aims to handle various complicated tasks and simplify them into something easy to use. These days I recommend building out these tools yourself or at least understanding how they work before using DU.

Need help or want to stay up-to-date with development? Join the discord server: https://discord.gg/6uJ4eJH

Datapack Utils currently Handles:

  • World generation: including custom ores and structures
  • NBT Crafting APIs for crafting tables, furnaces, and campfires
  • Some Math functions, including a pRNG.
  • Villager based Left/Right click detection. No Carrot on a Stick needed.
  • Custom Durability for any item
  • Timer scoreboards
  • Various player stats
  • Biome Detection
  • Extra block and entity tags

datapack-utilities's People

Contributors

2mal3 avatar crunchylnmilk avatar generrosity avatar icy105 avatar thenuclearnexus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

datapack-utilities's Issues

Wrong drops

  1. Datapack-Utilities v2.3.0

  2. reload was successful

  3. Vanilla 1.17

  4. Since 1.17 mining iron ore with a pickaxe should drop raw iron. Instead it still drops a block of iron ore. But copper ore works correct (->drops raw copper)

Typo in Wiki

In the Structure Generation wiki page, the example function has this comment:
# Returns -1 if registering ore failed. Otherwise, returns generated structure registry ID.
ore should probably be replaced by structure.

Gravel can never drop flint

Steps to reproduce:

  1. Have fortune 3 shovel, should have 100% flint droprate on gravel
  2. mine gravel

Expected outcome:
Without this utility installed, flint drops from the gravel every time

Actual outcome:
With this utility installed, gravel always only drops gravel

Fix:
Either have an alternate way of obtaining flint, or restore flint dropping from gravel.

Tested on Minecraft 1.15 release.

Minecraft 1.17 Snapshot Incompatibility

  1. What datapack(s) do you have installed (including ones made by me- include version if possible)?
    Datapack Utilities v2.2.1d.
  2. Run /reload. Copy/paste or post a screenshot of what appears in chat (should say [Loaded ]).
    [Loaded Datapack Utils v2.2.1d]
  3. What environment are you running the datapack? (Vanilla single player, Vanilla multiplayer, Forge, fabric, spigot, bukkit, paper, optifine, realms, etc). Please specify exact Minecraft version as well.
    Vanilla single player 20w49a.
  4. What if happening vs. what you expect to happen?
    Some functions of the datapack do not work, such as the pRNG (likely due to MC-206118), some block tags (#du:non-solid for example, likely due to grass path -> dirt path), and certain functions that use /replaceitem like du:custom_crafter/check_recipes or du:player/inv/get_inv.

World generation not working with sky island type maps in the overworld

  1. What datapack(s) do you have installed (including ones made by me- include version if possible).
    https://lunus.xyz/VVICBf.png

  2. Run /reload. Copy/paste or post a screenshot of what appears in chat (should say [Loaded ]).
    https://lunus.xyz/BYp4cd.png

  3. What environment are you running the datapack? (Vanilla single player, Vanilla multiplayer, Forge, fabric, spigot, bukkit, paper, optifine, realms, etc). Please specify exact Minecraft version as well.
    Vanilla Single Player 1.15.2 (Using Buffet Sky Islands Plains World Type)

  4. What if happening vs. what you expect to happen?
    Ores aren't spawning even after searching for a reasonable amount of time and normal Minecraft ores are spawning fine.

Help

Dear ICY
I have been mining below the old bedrock level.
been found that the quarry will not mine below the old bedrock level.
I also found when trying to build a forge in survival using the nether alloy.
I found that I couldn't pick up the nether alloy block.
Please fix this,
Thank you!
Artemis Fowl

Datapack Utilities 2.2.1c creates a grid of barrier blocks at y=255 in the end

In essence, if Datapack Utilities is installed and running, it will constantly generate a grid of barrier blocks at y=255 in the end, starting at 0,0, and going out 32 blocks in each direction. Aside from its invasive nature of generating unbreakable blocks, it will break the ender dragon when she is trying to perch by making her climb up to and past the build height due to the existence of the block there. Furthermore, the blocks will constantly respawn on their own even if they are being destroyed, which, with my testing, could possibly be a result of generating or activating chunks, however I was unable to confirm this.

  1. What datapack(s) do you have installed (including ones made by me- include version if possible)?
    Bug occurs when Datapack Utilities 2.2.1c is running on its own without any other datapacks.

  2. Run /reload. Copy/paste or post a screenshot of what appears in chat (should say [Loaded ]).
    [Loaded Datapack Utils v2.2.1c]

  3. What environment are you running the datapack? (Vanilla single player, Vanilla multiplayer, Forge, fabric, spigot, bukkit, paper, optifine, realms, etc). Please specify exact Minecraft version as well.
    The bug occurs in 1.16.3 on Optifine Singleplayer as well as Vanilla Multiplayer.

  4. What if happening vs. what you expect to happen?
    Datapack Utilities will generate and constantly regenerate barrier blocks at the build limit inside the end at y=255, starting at 0,0, and working out every 32 blocks in each direction, seemingly indefinitely. As a result, the Ender Dragon will attempt to climb to this height whenever she is trying to perch on the end exit gateway, therefor making the fight impossible.

Missing blocks in "non-solid" and "fluids" tags

Using the latest release, 2.3.3.

While looking at tags, I noticed some things were missing.

#du:non-solid only has redstone_torch, and #du:emit_light only has torch and soul_torch. Neither includes any wall torches. Maybe add #du:torches, containing all 6 torch blocks, which could then be included in #du:non-solid, #du:emit_light, #mechanization:drill/empty, and any other tags that apply.

#du:non-solid doesn't contain fluids. I don't know if this is intended, but I thought I'd point it out just in case.

#du:place_block_through contains air variants plus water and lava when it could simply use #du:air and #du:fluids.

#du:fluids lacks bubble_column. I assume this is just a small oversight, as it's easy to miss.

#du:tall_flowers seems unnecessary, as it is identical to #minecraft:tall_flowers

#du:beds seems unnecessary, as it is identical to #minecraft:beds

Finally, in my opinion, the #du:water-loggable tag name seems odd, as the Minecraft blockstate is waterlogged, not water-logged. #du:waterloggable seems simpler and more intuitive.

See also: Missing blocks in drill tags (Mechanization)

Summary

  • #du:non-solid lacks torch, wall_torch, soul_torch, soul_wall_torch, and redstone_wall_torch.
  • #du:non-solid lacks fluids. Maybe add #du:fluids or #du:place_block_through.
  • #du:emit_light lacks wall_torch, soul_wall_torch, redstone_torch, and redstone_wall_torch.
  • Maybe add #du:torches (containing torch, wall_torch, soul_torch, soul_wall_torch, redstone_torch, and redstone_wall_torch).
  • #du:place_block_through could use #du:air and #du:fluids.
  • #du:fluids lacks bubble_column.
  • #du:tall_flowers is a duplicate of #minecraft:tall_flowers.
  • #du:beds is a duplicate of #minecraft:beds.
  • Rename #du:water-loggable to #du:waterloggable?

End dimension small vertical hitboxes spawned and persist

Approximately once a second, below the player (at least when near y=0), a small, about half a block tall, otherwise one-dimensional hitbox spawns. I have not been able to determine what kind of entity it is, due to /data get not cooperating, but I know that they persist continuously. This is a severe issue as our server ended up with twenty eight thousand of them near our enderman farm, and it caused severe problems with lag. The attached screenshot is of the entities, all facing south. This is a very severe issue for our server and has required us to disable datapack utilities, which is something I very much want to fix as soon as possible

2020-03-12_20 43 06

Create Falling Sand Function

I think it can be possible to make custom blocks that can fall, like other various blocks like sand. Also, can it be possible to have custom hardness values or custom breaking sounds, though it might not be possible to have custom hardness values. Does the Unbreaking enchantment affect the custom durability? Just a honest question that I have.

Important! World Border support

Datapack Utils generates new dungeons only in the player's stream zone! But when using World Border it doesn't generate them! It is very important to add World Border support to solve multiple server latencies!

Chunks aren't scanned when y=0 is void instead of bedrock

Presumably due to CaveBiomes and DatapackUtils checking for bedrock at y=0, the biomes and structures aren't loaded if that bedrock isn't present, such as with this generator. Tested on Snapshot 20w06a, in which it does work if the generator type is set to Surface.

Relevant Discord messages for bug discovery:
image

[Bug/Improvement] Last bedrock layer is removed...

Hi there,

I've installed the datapack right now and making tests, and seen the deeper bedrock layer is replaced by barriers...

Reading your description, I suppose you use this to detect the generation has been done here, but that's -for me- a very bad way, as I've seen breakable blocks (stone and redstone ore for example) viewable when in spec and under height 0.

This means players can break them and see a hole in the map (ok, they can't fall through it but anyway... this is not really clean).

Maybe you should use NBT or similar things to flag generated chunks, or only generate in new chunks (if datapacks can detect if chunk is new).

Left click detection slow

Not sure if this is fixable or not, but trying to detect left clicks is slower than I would like it to be. There is a delay of I would guess around half a second (Maybe 10 ticks?) where you can't left click after doing it already. For normal, single-click detecting this is fine, but I'm trying to create a kind of combination-based system, with a mixture of different left and right clicks. Right clicking is fine, but the same can't be said for left clicking.

click detection villagers don't get teleported

  1. What datapack(s) do you have installed (including ones made by me- include version if possible)?
    A. One of my own, it currently does nothing apart from some loading functions

  2. Run /reload. Copy/paste or post a screenshot of what appears in chat (should say [Loaded ]).
    A. [Loaded Datapack Utils v2.1.3]

  3. What environment are you running the datapack? (Vanilla single player, Vanilla multiplayer, Forge, fabric, spigot, bukkit, paper, optifine, realms, etc). Please specify exact Minecraft version as well.
    A. Optifine singleplayer, 1.15.2

  4. What if happening vs. what you expect to happen?
    A. When holding a click detect item, the villagers will be summoned in one spot, but never move after, even when the player walks away.

Custom Crafting Duplication Glitch...

So... If you take any item (Say dirt or something) and try to replace the result item in the crafting table with it you'll pick up the result but the materials wont disappear, meaning you can make a really complex, powerful item multiple times with a single recipe's materials and a lot of worthless items like dirt. One thing to note is this only works properly with items in which the result is 1. HOWEVER, you can get one extra of the item. A similar thing happens but it does actually erase the materials, and for some reason it only leaves behind one of the result, so you only get one extra. I have attached a link to a video I took (It's pretty laggy but it gets the point across).
Link to the recording

timer_20 not incrementing

There is a typo in du:base/base on line 9, instead of incrementing timer_20 it is incrementing timer_10, this means that timer_20 never increments and timer_10 increments twice per tick

Click Detection Fails in Paper

When i use Wrench or Multimeter sometimes it spawns to many invs villagers that they push and i start taking damage from them and get killed.
unknown
unknown

Residual villagers

I've been testing this amazing datapack and playing with the gadgets when turned my gamemode into spectator and then i saw that a lot of villagers were standing in the air. They're not a problem when they're not in front of a crafting table or something because we cannot interact with these.
image
I think they appears when we hold something from the datapack like the multimeter.
Thank you for your time.

Error message but datapack still works.

  1. What datapack(s) do you have installed (including ones made by me- include version if possible)?
    Datapack Utilities v2.3.0pre1
  2. Run /reload. Copy/paste or post a screenshot of what appears in chat (should say [Loaded ]).
Error: Datapack Utils v2.3.0 requires Minecraft 1.17. Click [here] to go to the DU download page for alternate releases.
  1. What environment are you running the datapack? (Vanilla single player, Vanilla multiplayer, Forge, fabric, spigot, bukkit, paper, optifine, realms, etc). Please specify exact Minecraft version as well.
    Vanilla single player 21w20a.
  2. What if happening vs. what you expect to happen?
    Datapack gives the above message, likely due to line 10 in du:load_message. The datapack still functions correctly.

The get_hotbar.mcfunction retrieves the entire player Inventory and not Slots 0-8

  1. What datapack(s) do you have installed (including ones made by me- include version if possible)?
    This one, Datapack-Utilities latest build

  2. Run /reload. Copy/paste or post a screenshot of what appears in chat (should say [Loaded ]).
    N/A

  3. What environment are you running the datapack? (Vanilla single player, Vanilla multiplayer, Forge, fabric, spigot, bukkit, paper, optifine, realms, etc). Please specify exact Minecraft version as well.
    Vanilla Single player

  4. What if happening vs. what you expect to happen?

What is happening:
After calling get_hotbar.mcfunction the entire players Inventory data is stored copied into the du block.
What I expect to happen:
After calling get_hotbar.mcfunction, it should only copy Inventory Slots 0-8 into the du block.

Steps to reproduce:
1. Load inventory hotbar and greater inventory with items. See screenshot below for Inventory data. It shows Items the hotbar slots 0,1,2 and an Item in the inventory slot 9. image
2. Run /function du:player/inv/get_hotbar
3. Run /data get block -29999999 0 1601 Items
4. Note that the returned data contains the Item with {Slot:9b}
image

Seeded pRNG is not working as intended

du:math/random_seeded only returns a handful of values for an unknown reason. If the value is small, such as 4. then it only returns one value (in this case 1), and if larger, then it repeats a small selection. Of note is that this method uses a linear congruential generator, and while Cave Biomes' seeded pRNG also does, the function there does give the expected output. Important for structure generation, as only one (or few) structure(s) of a given size type will actually be generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.