- check_circle Functions
- 8,118 views, 2 today
- 784 downloads, 1 today
790
A framework that allows you to create your very own lucky blocks!
This data pack provides you with everything needed to create a lucky block data pack. Have a look at the video to see what's already provided. Note that the video is slightly outdated, you now get a skull instead of spawn egg and the crafting now requires a gold block instead of ingot. All you have to do is add options for when someone destroys the lucky block.
First Time Setup
Start by unzipping the download and putting the folder inside in the datapacks folder of any world. Then rename the "steve" folder inside to your own namespace. Navigate to data/bertiecrafter/tags/functions/pmclb and in each file, replace "steve" with your own namespace.
Creating a new option
You can create as many options as you want. Open up data/<your-namespace>/functions/pmclb/register_options.mcfunction and copy the template line to a new line. Fill the placeholders in that line and create a new function file based on the specified /function command. This command serves as entry point to your option and might be fired when a lucky block is activated.
Useful commands
/function bertiecrafter:pmclb/give/lucky_block: Give the nearest player a lucky block.
/execute as <players> run function bertiecrafter:pmclb/give/lucky_block: Give all selected players a lucky block.
/function bertiecrafter:pmclb/spawn/setblock: Place a lucky block in the current location.
/execute positioned <coordinates> run function bertiecrafter:pmclb/spawn/setblock: Place a lucky block at specified position.
/execute at <players> run function bertiecrafter:pmclb/spawn/setblock: Place a lucky block at the feet of selected players.
/function bertiecrafter:pmclb/break/activate: Simulate a lucky block being broken at the current location.
/execute positioned ~ ~1 ~ run function bertiecrafter:pmclb/break/activate: Simulate a lucky block being broken 1 block above the current location. Can be placed in a command block for quick testing.
For more in depth instructions or questions about setting up, visit the official event thread.
That's all there's to it! Have fun creating your own lucky blocks =)
Event
This data pack was used as a framework for this event. Most comments have been placed in this thread, new comments should go in the comments section of this submission instead, since the event is finished.
I encountered a bug! What do I do now?
I test all my creations, but bugs happen no matter how long you test something. Whenever someone experiences a bug, I do my best to fix the issue. You can help me by providing any useful information. You can never give me enough information, but please send it in a DM instead of placing it in the comments. You can still place a one-liner in the comments stating the issue to make the community aware, but that alone isn't enough to help me fix the issue.
- Checklist: Are you using the right version? Did you do /reload after dropping the datapack in? After /reload, does the datapack show up green in /datapack list?
- What is the issue? Does the datapack not seem to be working at all or is there a specific feature you are having issues with?
- What happened? Please give me all the steps needed to reproduce the issue. The faster I can experience it, the faster I can solve it.
- What did you expect to happen instead? This helps me understand your point of view and determine if the issue described is actually the issue I need to fix. The bug you are experiencing could just be a side effect of something else that doesn't behave as expected.
Compatibility | Minecraft 1.16 |
Tags |
7 Update Logs
Lucky blocks do not activate if not broken by player : by Bertiecrafter 07/13/2020 8:54:01 amJul 13th, 2020
- If lucky blocks get broken by water or mobs, they will not activate anymore
- Sneaking is now detected using predicates instead of a scoreboard objective, might improve performance a bit.
- Sneaking is now detected using predicates instead of a scoreboard objective, might improve performance a bit.
LOAD MORE LOGS
4587558
119
Create an account or sign in to comment.
So what exactly doesn't work? What did you try? Are you in 1.16? Did you unzip the data pack?
Also note that this is just a base data pack without actual lucky block options. It's used in the mentioned event for other players to build lucky block datapacks upon. So I guess it doesn't really "work" anyways.
One more and you'll have a hundred.
For future readers, please keep the discussion in one place (the thread) for as long as the event takes place.