BiomeTweaker

BiomeTweaker

13M Downloads

Block Replacement Stages Incorrect

superckl opened this issue ยท 7 comments

commented

It appears that block replacement stages are not ordering correctly. Any stage after "BIOME_BLOCKS" will allow ores and other features to generate. Only stages after "PRE_ORES" should allow ores.

First reported by @davqvist in #114.

The following script should replace all terrain blocks with glass before any ores are placed. This should not allow ores to be placed, since they require stone to replace.

allB = forAllBiomes()
Tweaker.setPlacementStage("PRE_ORES")
allB.registerGenBlockRep("minecraft:stone", "minecraft:glass")

This is not what happens. The replacement does indeed occur after top and filler block placement, but ores still generate:
2017-08-11_01 22 31

commented

Thanks a lot. I used "all" and seems to work, I will remove modded ore gen later, btw what does CUSTOM do and how can it be configured?

But, not sure if the same issue, I will open a new one if yes. Basically only around half the chunks get touched for replacements now while the other stay the same untouched (with vanilla stone and so on, see screenshot in spectator mode http://i.imgur.com/ZztRyCZ.png).

latest log: https://gist.github.com/davqvist/7bad7535c73abffec75d334b66bdebf8
(still haven't figured out why I don't get fml-client)

commented

Open a new issue with your log, images, and scripts please.

commented

Sure, I will, sorry.

commented

@davqvist
The cause of this issue is "bleed-over" from other chunks. If you look very carefully, you'll see the out-of-place ores are located near the edges of chunks. This is because when a chunk generates ores and features, they tend to bleed over slightly into neighboring chunks. Here is (my guess at) the process that leads to the strange behavior observed:

  1. The first chunk generates, and all stone is replaced by glass before ores generate.
  2. No ores generates in this chunk since there is no stone to replace.
  3. Bleed-over occurs, and ores attempt to generate near the edges of neighboring chunks that have not yet been generated.
  4. These chunks then partially generate through the "BIOME_BLOCKS" stage and stop. Any replacement scheduled for a later stage waits until the first chunk is finished generating. This is why replacing during the "BIOME_BLOCKS" stage does prevent all ores and features from generating, but any stage later does not.
  5. The first chunk finishes generating, and the next chunk continues generating.
  6. Rinse and repeat.

The only way to completely prevent this "bleed-over" is to remove any ore or feature that is bleeding over. With the recent addition of the removeOre command, you can now remove any decoration, feature, or ore. It is nearly identical to the already existing 'removeFeature' and 'removeDecoration' commands. The valid options are COAL, DIAMOND, DIRT, GOLD, GRAVEL, IRON, LAPIS, REDSTONE, QUARTZ, DIORITE, GRANITE, ANDESITE, EMERALD, SILVERFISH, CUSTOM, all

Let me know if this resolves your issue.

commented

Could you please still clarify this?

btw what does CUSTOM do and how can it be configured?

commented

CUSTOM is what other mods can fire when they do decoration, it not something you can configure. It's not really used that much, I wouldn't worry about it.

commented

Thanks for clarification.