How to make ores spawn after beating a boss?

Started by TheGuyfromPluto on Sun, 04/12/2020 - 04:48

Topic category: User side tutorials

Last seen on 18:24, 12. Mar 2023
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make ores spawn after beating a boss?
Sun, 04/12/2020 - 06:38 (edited)

I want to make a mod where if you beat the Ender Dragon it spawns 4 different ores through out the world, I want it to be like Cobalt, Mythril, and Adamantite in Terraria.

I tried using Global Variable's to detect when the Ender Dragon is killed and that part worked, but i don't know the best way to make the ores spawn. I tried making the ores replace fake stone blocks i made and it looked like it worked but when you Right clicked or started mining it would turn back into the fake stone. 

does anyone know how to fix this?

 

Edited by TheGuyfromPluto on Sun, 04/12/2020 - 06:38
Last seen on 18:47, 13. May 2020
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I do not know. I wonder the…
Sun, 04/12/2020 - 05:55

I do not know. I wonder the same thing

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You could make a ore with a …
Sun, 04/12/2020 - 10:14

You could make a ore with a "when block added" procedure which checks if the variable is true; if it isn't, it replaces itself with stone.

This way you would have to explore new chunks to find the ore though. You could alternatively make that when started to be mined, the ore turns into stone if the variable is false

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
when blocks added trigger…
Sun, 04/12/2020 - 10:36

when blocks added trigger does not work due to lag prevention mechanics;

try the let block tick randomly option instead.

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
But last time it worked…
Sun, 04/12/2020 - 10:37

But last time it worked... Was it changed in the last update of MCreator?

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think so. It doesn't work…
Sun, 04/12/2020 - 10:39

I think so.

It doesn't work for me :(

Last seen on 18:24, 12. Mar 2023
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
the random block tick makes…
Mon, 04/13/2020 - 02:11

the random block tick makes the fake blocks i described in my first post

Last seen on 17:11, 16. Mar 2023
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is a lazy option but…
Sun, 05/10/2020 - 08:13

This is a lazy option but you could make the dragon drop a pickaxe that is strong enough to mine those ores.

Last seen on 09:14, 9. Mar 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is probably not the…
Sun, 05/10/2020 - 08:28

This is probably not the best way to implement this but this is how I would do it:

1.Make it so when a barrier is passed (The barrier being the dragon) A global bool value is set to true.

2.Now add your ores and make sure they tick at at least once per second.

3.Add a procedure to your ores when they tick checking wether any of the blocks next to it are air, if one is air then check wether the barrier is passed. If the barrier is passed nothing happens but if has not been then the ore turns to stone, netherack or end stone depending where it is.

 

The reason this method is better than others is because you don't need to generate new chunks as the ores are there, but to be able to find them you need to pass your barrier.

Last seen on 19:30, 8. Feb 2023
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
In latest update conditions…
Sat, 12/19/2020 - 22:10

In latest update conditions are now a thing. This problem is solved by them! 

Last seen on 22:09, 6. Mar 2021
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make a 'fake stone' block,…
Sat, 12/19/2020 - 22:46

Make a 'fake stone' block, completely separate, that when mined will drop cobble, or if with silk touch will drop stone (like normal stone, duh). Have it on tick, check if the global variable is true. If it is, remove the block and place your ore!

Last seen on 20:50, 16. Mar 2023
Joined Dec 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
for dimondking2016: how do i…
Fri, 02/03/2023 - 17:42

for dimondking2016:

how do i make a barrier like the one you are talking about?

Last seen on 09:14, 9. Mar 2023
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well you want to make a…
Mon, 02/06/2023 - 01:13

Well you want to make a global variable, you can do this in the variables tab (Below mod elements and resources but above Localization and remote workspaces), add a variable, name it whatever you want, make it logical and I think the global map would be the appropriate scope.

https://www.youtube.com/watch?v=S11Fg_-a5Jk&embeds_euri=https%3A%2F%2Fm…

Create a procedure, inside of the procedure set the procedure trigger to be on entity dies, check if the entity is whatever mob (this case an ender dragon) inside the IF statement set the global bool variable to true.

Now for the ore, in triggers, you can use "when neighbouring block changes" and create a new procedure that checks the variable, if false then set the block to stone/netherack/endstone. 

Boom your done!

 

That is my method but I do believe 'Sir_sassypants' method would be better.

So you would have two blocks the first generating, has all the same properties as stone, it's in the game name being stone etc, but when it randomly ticks it checks to the global variable to see if it's true and if so switches its block for the ore.

Beyond these instructions, I'm not going to provide any screenshots mainly because well... Part of learning is figuring stuff out on your own. I also can't be bothered figuring out how to put pictures in these comments again lmao, something like Imgur.