mojira.dev

Steve W

Assigned

No issues.

Reported

MC-98751 Chunk/world loading problems: Infinite re-generating (corrupted?) chunks Duplicate

Comments

Possible cause: In the TNT entity's explode() function, the Y-coordinate of the explosion is calculated as 0.0625 x the entity's height. Since the TNT entity is 0.98 blocks tall, this puts the Y-coordinate at 0.06125, inside the gap in these blocks and outside of the water. I assume that the slightly smaller hitbox was done to allow TNT to fit down 1 block wide dropshafts easily.

Possible fix: Increase the Y-coordinate multiplier enough to push the result to be more than 0.0625. This will need testing to determine how the change will affect TNT explosions.

This bug affects 1.18.1 as well.

When a Minecart is moving on a Powered Rail, one of the final checks it does is to see if it will bounce off of a wall. The function it uses for this check will let the Minecart bounce off if the block in question is considered a "solid block." For most blocks, there are two requirements to be a solid block:

  • The block's material must block light

  • The block must be a full cube

However, a block can be explicitly set not to be considered solid even if it otherwise meets the above requirements. Blocks set this way include:

  • Glass of all types

  • Beacon

  • Redstone Block

  • Observer

  • Piston (even retracted Pistons will stop a Minecart)

Glass and Beacons already fail the first check of blocking light. I assume that the rest were made non-solid for use in redstone contraptions. There are also a couple of odd blocks out:

  • TNT stops Minecarts (its material doesn't block light)

  • Soul Sand is explicitly set as a solid block, so Minecarts will bounce off

Possible fix: Modify the Minecart bounce-off check to work with full cube blocks. Replacing the check outright might make Soul Sand no longer work as it is hardcoded as solid and is not a full cube.

After confirming that this bug still exists in 1.18.1, I investigated and discovered what was happening:

TL;DR For Fishing Rods specifically, it is possible for the enchanting table to be in a state where it has a required XP level but no enchantments.

When generating enchantments, first a required XP level is randomly generated based on bookshelf count and player enchantment seed, then a modified level is generated from that XP level for gathering possible enchantments. See this page for info on what modified levels can get you what enchantment levels (the page says that the data is from 1.14.4, but the relevant Fishing Rod enchantments are still correct for 1.18.1).

The bug occurs when the required XP level is more than 0 but the modified level is not enough to reach the above mentioned enchantment levels, leaving the enchanting table without any enchantments. This bug affects Fishing Rods specifically because they have no enchantments that can apply below a modified level of 5 (the cutoff for Unbreaking I), whereas all other enchantable items have at least one enchantment with a minimum level of 1.

To test this, I made a Fabric mod to show enchanting table info in the GUI. As can be seen in three of the four attached pictures, the required XP level is more than 0, but no enchantments are generated (shown as "-1 -1"). Even with 15 bookshelves, bad enough RNG rolls can give you a required XP level as low as 2 or 3 (both of which have this issue every time). A required XP level of 4 will usually generate an enchantment (always Unbreaking I), but it can also have this issue depending on the exact RNG rolls.

The GUI mostly doesn't check for this inconsistency between having a required XP level yet no enchantment. The only place it does check is when rendering tooltips for the enchantment hint.

Possible fixes (either or both can be implemented):
1. Lower the minimum modified enchantment level for either Fishing Rod enchantment to 1 (Lure would be the more likely candidate for this as Luck of the Sea uses the same Java class as Fortune).
2. Reset the required XP level to 0 for that slot if no enchantments are generated.

[media]

[media]

[media]

[media]

Bren Rado: I have looked at it when searching, but that seems to affect only new chunks. This effects both previously-created and newly-created chunks. This has also only happened since the release of 1.9, so I think this is a new bug.