Minecraft Data Packs / Mini-game

PMC Lucky Blocks || Framework

  • check_circle Functions
  • 8,118 views, 2 today
  • 784 downloads, 1 today
  • 51
  • 21
  • 10
Bertiecrafter
Retired Moderator
Level 71 : Legendary Engineer
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.

PMC Lucky Blocks || Framework Minecraft Data Pack
PMC Lucky Blocks || Framework Minecraft Data Pack
CompatibilityMinecraft 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.
LOAD MORE LOGS

Create an account or sign in to comment.

grale
06/23/2020 7:41 pm
Level 1 : New Crafter
it doset work for me:(
1
Bertiecrafter
06/24/2020 1:11 am
Level 71 : Legendary Engineer
history
If you want/need help, you'll have to provide more information haha. You can DM or join the discord if you want as well.
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.
1
Redfuzzyturtle
06/23/2020 3:22 pm
Level 30 : Artisan Taco
oof gotta redo a couple of my options now. I didn't do too much yet though, so I honestly might just start over in 1.16 just to avoid any problems. Dunno yet. Still working on it tho, so expect a submission from me!
2
Bertiecrafter
06/24/2020 1:15 am
Level 71 : Legendary Engineer
Most changes to 1.16 aren't catastrophic, mostly a matter of renaming a couple of things. Let me know if you're having trouble updating!
2
Minecraft Maniac X
06/08/2020 6:41 pm
Level 43 : Master Herobrine
I was the hundredth subscriber!!!
4
The ExiIed FeIIow
06/08/2020 11:41 pm
Level 61 : High Grandmaster Imposter
Congrats
2
The ExiIed FeIIow
06/08/2020 6:39 am
Level 61 : High Grandmaster Imposter
Subscribed. :)

One more and you'll have a hundred.
2
UltroGhast
06/07/2020 4:09 am
Level 69 : High Grandmaster Engineer
Can't we just create a datapack by scratch in our own way?
1
Bertiecrafter
06/07/2020 4:31 am
Level 71 : Legendary Engineer
I'll copy your question over to the event thread.
For future readers, please keep the discussion in one place (the thread) for as long as the event takes place.
2
Bertiecrafter
06/06/2020 1:17 pm
Level 71 : Legendary Engineer
history
Thank you Cyprezz, Hipercreative, Sword_Cat13, flashteens, DinowCookie, Luracasmus, NoBOdY-0, Redfuzzyturtle, StarLanders5772, Enders Host, legopitstop, UltroGhast, IDRERD, Beatso, Hefastest, Desbarmitar, Yolo4321, chickenpants93, stabily, SheepCommander, SuperBuildcraft, Nitrox Nova, PuffinSmoke, KaitouQueen, catking1735, Brownie1111, IamMadara, Kate1902019, ShadowSurfer17, SoulBlade, Lemilas, Nonatal99, Jecc, WulfieTundra, Brutalight, PixieMax, Stylex, ahughe3, PrismastebanZ, RubenVerg, CorporalKeith, User3134573G, Uknownymous, KNIZE_1007, joker abangsale, SuperCreeper_20 and AfaPacks for the diamonds!
5

Welcome