Hbm's Nuclear Tech - Extended Edition

Hbm's Nuclear Tech - Extended Edition

398k Downloads

Bug: potential issue with pink tree generation

Xreturns opened this issue · 16 comments

commented

As of recently I’ve been trying to get Gerald in my survival world, which was mostly halted due to the jungle dungeon bug. Once that was fixed, I focused on the other items, specifically the pink log. I mined over six thousand oak logs without any of them being pink. The chance is supposed to be 1/1000, right? I also found nothing while searching regions using NBTexplorer and using MCedit’s filter feature. I’m going to soon build this mod from source and check out the debugging console for the pink trees, but that’s all I have for now.

commented

This is working, idk why you needed to put a debug print in though; if you see in the shot, there is a readout when debug mode is enabled in the mods config

commented

I should note that if your using mods like dynamic trees then you make this absurdly difficult if not impossible as at that point you would need to find a structure that has oak logs

commented

Looking at this again the 1/1000
Value is not the only thing that determines if there is a pink log; when a chunk does meet this requirement it also chooses a random spot within it to check if anywhere in that xz cross section is an oak log

16^2 is 256 so on top of this 1/1000 chance, there is also a 1/256 chance on top of it for the random coordinate values to a Y cross-section that contains an oak log

commented

Those are some absurd chances then, meaning that no one will reasonably ever find a pink log in survival. I’ll close the issue, but I think that means the chance is one in 256k or so. That’s ridiculous. The only solution I found is to make oak logs have a 1/1k chance to drop pink logs, so I’ll just stick with that.

commented

@Xreturns Well Gerald is a powerful weapon and needs to be difficult lel and it's not exactly those odds

the 1/256 is not a static chance; the odds actually are x/256 with x representing the number of oak logs possible within the 16x16 cross section (think a bag of 256 marbles; x of those marbles are wooden ones); meaning the more oak logs in a valid chunk the higher the chance it will land on a y cross section that contains oak logs

commented

Gerald is also required to advance in the mod. Without the pink log chances being somewhere within obtainable limits, the DFC, and anything else that uses osmiridium is impossible to get. Also, if those are the chances, why the heck does my massive 5 gigabyte world not have any? It’s still extremely difficult, not to mention the osmiridium refining.

commented

With that said; your best odds of finding one is to go spelunking in area with a high density of oak logs

If you really want to get technical, record a few samples In a dense log area with oak logs and record the largest amount of logs in an xz slice and then find the average of those and plug it In to get an rough average chance

My guess is that this was done using general statistics and the average chance for a pink log was ~1/10,000

commented

I already used the dropt mod after making the issue to make logs have a 1/1k chance of dropping pink ones, so either way, I have my log.

commented

TLDR: you may have the best chance in modded biomes with high amounts of LARGE oak trees like with Thaumcraft Magical Forest that has a lot of them; because unlike normal oak trees, large ones branch out with oak logs as branches

It's also not checking for trees; it's checking just for oak; it would be a pink log tree if trees always were a pole; but it's not checking for trees or making a custom tree; it's just a replacement

Because of this; other worldgen structures with oak logs CAN have them replaced (villages with oak logs can be replaced with a pink varient)

commented

Gerald is also required to advance in the mod. Without the pink log chances being somewhere within obtainable limits, the DFC, and anything else that uses osmiridium is impossible to get. Also, if those are the chances, why the heck does my massive 5 gigabyte world not have any? It’s still extremely difficult, not to mention the osmiridium refining.

Seems hard to say that there are no pink logs there, it's not going to be a entire tree your looking for so there's a chance you will find just a single piece or if you get lucky multiple

I might as well make a change In the line of this code to say "log has been replaced with a pink log"; I don't know Java but with me messing with Zenscript and it being a readout; I can just modify the string and nothing should break

commented

image
@Alcatergit if this is what tells it to spawn then they are not wrong, the value is missing a zero; I would change this but I am unsure if this is it let alone if its supposed to be like this despite the fact its a 1/10,000 chance

commented

it may also have something to do with the odds being 1/10k being an ESTIMATE or some calculation

because look at this and tell me its not hard to find; I had to use a preset to take advantage of this enough to generate
image

commented

Hmm. Based on what I see here, either trees are generated AFTER the normal chunks or I did something wrong. You see, as I mentioned, I put a debug print directly after the rand.int line to see if trees were supposed to be pink, and it printed multiple times with no line printed for the default “Successfully spawned pink tree” line.

commented

It is 1/10,000

commented

After some testing, I added some logging for if the chance of making a pink tree was reached. Multiple times in the log it was, but a pink tree was never successfully placed.

commented

Hi @Alcatergit , and thanks for the response. According to the code, it is in fact 1/1000 (as referenced by line 464 of HbmWorldGen). As my above post says, I built the game from source and added a log entry for if the tree was supposed to be spawned, but never successfully did, which happened multiple times. The tree is multiple times supposed to be pink, but in the entire history of my 2 year old minecraft world a single pink tree was never placed.