How to create your own Lucky Block mod using MCreator

Started by ZombieManF on

Topic category: User side tutorials

Active 6 years ago
Joined Dec 2018
Points:
670

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
How to create your own Lucky Block mod using MCreator

IDK if there is already a tutorial on this, but this is my personal way of making a Lucky Block, so just follow along with the steps (sorry if they are hard to read).

  1. Create your Lucky Block texture. I would recommend either Importing it or Drawing it, as you cannot get the question mark in the easy-to-use interface. Unless you do not want the question mark, in which case, proceed.
  2. Create a new block and make it your Lucky Block.
  3. Check the box that says "Doesn't drop itself?" and set the item to air (the cloud).
  4. Add a procedure under "When block destroyed by player."
  5. Create a new local Number variable and name it "Lucky".
  6. Enter the following block: "Set(Lucky) to: (((Random [0,1)) x (amountOfThingsThatCanHappen)) + (1))"
  7. Add an If Then block. Click the gear in the corner and add an Else If block for every thing that you want to happen.
  8. On every If block, put an ((variable) = (thenumber)). Increase it by 1 each time.
  9. Add lines of code inside each If and Else If for every thing you want your Lucky Block to do when cracked open.

If it does not work, check to make sure you did the steps correctly (they worked for me when I tested). The steps above are for MCreator 1.8.1.

I hope this tutorial helped!

Active 1 year ago
Joined Nov 2015
Points:
919

User statistics:

  • Modifications: 7
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 179
Thanks for this easy…
Thu, 12/27/2018 - 23:29

Thanks for this easy tutorial!

Active 4 years ago
Joined Oct 2016
Points:
748

User statistics:

  • Modifications: 1
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 25
ill like this if the creator…
Tue, 01/08/2019 - 16:06

ill like this if the creator of mcreator add procedures to mcreator 1.10.2

Active 5 years ago
Joined Mar 2016
Points:
1311

User statistics:

  • Modifications: 7
  • Forum topics: 76
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 310
bad undersand 
Wed, 01/09/2019 - 11:47

bad undersand 

Active 1 day ago
Joined Aug 2016
Points:
3303

User statistics:

  • Modifications: 9
  • Forum topics: 63
  • Wiki pages: 20
  • MCreator plugins: 11
  • Comments: 2931
Do you have MCreator 1.7.9…
Sat, 01/19/2019 - 21:48

Do you have MCreator 1.7.9 or more or MCreator 1.7.8 or less ?

Active 3 years ago
Joined Jul 2016
Points:
1078

User statistics:

  • Modifications: 9
  • Forum topics: 21
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 359
I found that you can also…
Sun, 01/20/2019 - 06:00

I found that you can also use the "When block destroyed by player" event to put in various things & use the random possibility condition or use various probability conditions.

It only has new features and…
Sun, 01/20/2019 - 14:51

It only has new features and fixes a lot of bugs. We don't offer any official support for older versions.

Active 4 years ago
Joined Apr 2017
Points:
716

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
I don't think he gives…
Mon, 01/21/2019 - 13:04

I don't think he gives enough info (at least in my opinion) but maybe you can help?

I want to but can nothing with the given info about the problem.

https://mcreator.net/forum/46480/help-gui

Active 9 months ago
Joined Jun 2018
Points:
679

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
works great thanks (:
Mon, 04/08/2019 - 19:57

works great thanks (:

Active 3 years ago
Joined Aug 2019
Points:
664

User statistics:

  • Modifications: 1
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Hello! I tried doing this,…
Sat, 01/11/2020 - 01:04

Hello! I tried doing this, and when I broke the block, nothing happened. This is the code that I made for the block. I am on the Mcreator version, 2019.5.  Please tell me what is wrong.

(Set Local:Lucky to: (((Random [0,1) x 5)) + 1)

If ((Get:Local:Lucky) = 1)

do Explode at x: (x) y: (y) z: (z) with power (25)

send chat to all players: "Mwahahaha..."

_____________

else if ((Get:Local:Lucky) = 2)

do Play at x: (x) y: (y) z: (z) level: (1.5) pitch: (1) sound: entity.creeper.primed

Send chat to all players: "Haha! Gotcha!"

_____________

else if ((Get:Local:Lucky) = 3)

do Play at x: (x) y: (y) z: (z) level : (3.4) pitch: (1) sound:CUSTOM:CrabRave

Spawn at x: (x) y: (y) z: (z) entity: EntityParrot

Spawn at x: (x) y: (y) z: (z) entity: EntityParrot

Spawn at x: (x) y: (y) z: (z) entity: EntityParrot

Spawn at x: (x) y: (y) z: (z) entity: EntityWolf

Send chat to all players: "No crabs here!"

_____________

else if ((Get:Local:Lucky) = 4)

do Enable rain if (true) otherwise, disable it

Send chat to all players: "It's raining... What you thought there was gonna be something cool? NO!"

_____________

else if ((Get:Local:Lucky) = 4)

do Place at x: (x) y: (y) z: (z) schematic: EndPortalTrap

Send chat to all players: "Ooh! I think there may have been and end portal that spawned nearby... Better go check it out!"

_____________

I suggest you check our…
Sat, 01/11/2020 - 09:14

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei

Active 1 month ago
Joined Mar 2021
Points:
609

User statistics:

  • Modifications: 0
  • Forum topics: 10
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 28
On every If block, put an (…
Sun, 03/14/2021 - 00:11

On every If block, put an ((variable) = (thenumber)). Increase it by 1 each time.

i cant find this