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

Overwriting a container drops its contents even with spawnDrops=false #27

Closed
avdstaaij opened this issue Mar 21, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@avdstaaij
Copy link
Contributor

Overwriting a container block (e.g. a chest) with a different block will cause its contents to be dropped, even when spawnDrops is set to the default value false. Based on the documentation of spawnDrops, this seems like unintended behavior.

Example request that produces this effect (sending two requests works too):

PUT localhost:9000/blocks

[
    {
        "x": 0,
        "y": 100,
        "z": 0,
        "id": "minecraft:chest",
        "data": "{Items: [{Slot: 13b, id: 'apple', Count: 1b}]}"
    },
    {
        "x": 0,
        "y": 100,
        "z": 0,
        "id": "minecraft:stone"
    }
]

Tested with:

  • GDMC-HTTP 1.4.4
  • Forge 48.1.0
  • Minecraft 1.20.2

This behavior was not there in GDMC-HTTP 1.1.1, but I don't know which version introduced it (and I didn't feel like doing a binary search :P). I would guess it's 1.2.3 (which touched overwriting blocks with NBT data) or 1.4.0 (which optimized everything).

@Niels-NTG
Copy link
Owner

It seems likely this bug was introduced with the 1.4.0 update. Probably due to an order of operations issue.

@Niels-NTG Niels-NTG added the bug Something isn't working label Mar 21, 2024
@Niels-NTG Niels-NTG self-assigned this Mar 22, 2024
Niels-NTG added a commit that referenced this issue Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants