PMC Lucky Blocks || Framework

  • check_circle Functions
  • 29
  • 14
  • 10
avatar Bertiecrafter
Level 52 : Grandmaster Cyborg
116

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?


CompatibilityMinecraft 1.16
Tags

6 Update Logs

Crafting Recipe Update : 07/05/2020 9:05:35 amJul 5th

Due to the great event submissions, lucky blocks are worth more. They now require a gold block instead of a gold ingot.
LOAD MORE LOGS

1
06/23/2020 7:41 pm
Level 1 : New Crafter
grale
it doset work for me:(
1
06/24/2020 1:11 amhistory
Level 52 : Grandmaster Cyborg
Bertiecrafter
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.
2
06/23/2020 3:22 pm
Level 8 : Apprentice Taco
Redfuzzyturtle
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
06/24/2020 1:15 am
Level 52 : Grandmaster Cyborg
Bertiecrafter
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!
3
06/08/2020 6:41 pm
Level 22 : Expert Creeper
MinecraftManiacL
I was the hundredth subscriber!!!
2
06/08/2020 11:41 pm
Level 44 : Master Dragonborn
Yolo4321
Congrats
2
06/08/2020 6:39 am
Level 44 : Master Dragonborn
Yolo4321
Subscribed. :)

One more and you'll have a hundred.
1
06/07/2020 4:09 am
Level 44 : Master Engineer
UltroGhast
Can't we just create a datapack by scratch in our own way?
2
06/07/2020 4:31 am
Level 52 : Grandmaster Cyborg
Bertiecrafter
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.
5
06/06/2020 1:17 pmhistory
Level 52 : Grandmaster Cyborg
Bertiecrafter
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 and Kate1902019 for the diamonds!
Planet Minecraft Logo

Website

© 2010 - 2020
www.planetminecraft.com

Welcome