Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only remove worldgen block entity on changed block #10794

Merged
merged 2 commits into from
May 28, 2024

Commits on May 27, 2024

  1. Only remove worldgen block entity on changed block

    The previous PR PaperMC#10375 removes block entities on setBlock calls to the
    WorldGen region to prevent the existence of a block entity on a block
    that does not support it as such.
    
    The logic however assumed that such calls would always follow the order
    of:
      1. set the base blockstate
      2. create the block entity
      3. finish world gen
    
    This is however not the case for all of world gen, specifically not for
    structure templates being placed under water, as these first set the
    block state, then configure its block entity (include the chests
    lootable) and finally waterlogs the chest by calling another setBlock.
    
    To prevent this logic from deleting the original block entity, this
    commit now only removes the block entity found if the blockstate to be
    set differs from the previous one, matching LevelChunk#setBlockState.
    lynxplay committed May 27, 2024
    Configuration menu
    Copy the full SHA
    0619890 View commit details
    Browse the repository at this point in the history
  2. Obfhelper

    lynxplay committed May 27, 2024
    Configuration menu
    Copy the full SHA
    089396e View commit details
    Browse the repository at this point in the history