Custom ore generation after completed advancment

Started by hackall360 on Thu, 10/08/2020 - 12:04

Topic category: Help with modding (Java Edition)

Last seen on 08:46, 12. Oct 2020
Joined Jul 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Custom ore generation after completed advancment
Thu, 10/08/2020 - 12:04

What I am trying to do, is make it so specific custom ores will not generate in the overworld, until any player has gotten a specific advancment. For more clairity, if I create six custom ores, all one level higher than the previous, starting one level higher than diamond, I am trying to keep the fourth ore from spawning, until the first ore has been found, and given the advancment for finding the first ore, and keep the fifth ore from spawning until you find the second ore and get the advancment for the fifth ore.

I do not think that the additional generation condition under blocks is what I need to use for this. If anybody knows of a way that I could acheive this, please let me know.

I should also state that I am using the latest version of MCreator, and trying to create a forge mod targeting 1.15.2.

Last seen on 19:35, 26. Nov 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is not possible for two…
Thu, 10/08/2020 - 12:59

This is not possible for two reasons:

  1. There can be multiple players, which one to check?
  2. The way world generates, you can't "insert" ores later
Last seen on 14:59, 26. Nov 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
A bit less than ideal, but a…
Thu, 10/08/2020 - 13:19

A bit less than ideal, but a way this could be sorta achieved is by having a requirement for the ore spawning being a player has the achievement. Pretty simple, but it'll only generate that ore in spots of the world that have yet to be loaded.

 

Using procedures, you could probably have it so upon getting the achievement, it checks random coords for the ores other requirements before setting those blocks to the ore, though, this would more than likely lag the game into oblivion.

So yeah, it isn't possible to do neatly I don't think.

Last seen on 08:46, 12. Oct 2020
Joined Jul 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry for the late replys…
Mon, 10/12/2020 - 07:36

Sorry for the late replys.

Chapface, I am mainly trying to get it so it only will generate in chunks that havent been loaded yet, after the player gets a specific advandment. And I want the requirement for ore to be either a player getting a specific advandment, or the player getting an advancement that tells the server to change a bool to true for the spawning?

Klemen, would there be a way for it to work this way? Because again, I am mainly trying to just replace the ore at spawn, or have some way to add an advancement requirement or boolean requirement before spawning?

Last seen on 08:46, 12. Oct 2020
Joined Jul 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I could have found a work…
Mon, 10/12/2020 - 08:46

I could have found a work around that works, I have made a custom variable boolean as a map variable, and whenever a player mines a specific block, it makes the boolean true. Then I have another block that has an addition generation condition, that returns that value, so generation wont happen, unless the specific block is found AND mined by a player, not destroyed by an entity.

I will repost if this actually works, or if it is a fail, once I am able to test it.