PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
53 stars 21 forks source link

Trees spawned with trees_populators spawn in the ocean on note blocks #2759

Closed evilsaloon closed 1 year ago

evilsaloon commented 1 year ago

Terms

Discord tag (optional)

evilsaloon#3438

What happened?

Trees will spawn in the ocean on top of a note block, which does not have any data encoded in it. The note block spawns on water level and is minable by players.

trees_populators were working fine before 1.20.1, could be a 1.20-related bug

Steps to reproduce the issue

  1. Add trees_populators from config below
  2. /iareload
  3. Go into new chunks
  4. Middle click on note block, get free note block

Server version

Current: git-Purpur-1995 (MC: 1.20.1)* Previous: git-Purpur-1985 (MC: 1.19.4)

ItemsAdder Version

ItemsAdder version 3.5.0

ProtocolLib Version

ProtocolLib version 5.0.0-SNAPSHOT-636

LoneLibs Version

LoneLibs version 1.0.25

FULL server log

https://pastebin.com/WGzeS3eS

Error (optional)

No error in console.

Problematic items yml configuration file (optional)

info:
  namespace: testserv
trees_populators:
  floating_tree:
    worlds:
    - world
    bottom_blocks:
    - DIRT
    - GRASS_BLOCK
    - PODZOL
    - SNOW
    - SNOW_BLOCK
    chance: 40.0
    max_height: 100
    min_height: 50
    amount: 1
    iterations: 1
    tree_type: TREE
    leaves: testserv:floating_leaves
    log: testserv:floating_log

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

https://github.com/PluginBugs/Issues-ItemsAdder/assets/80675840/12477520-7210-4280-823f-0b5814c25b0f

LoneDev6 commented 1 year ago

Does this happens every time a tree is generated on the water? Also, did you change anything to make the trees generate on water? It's not usual, they should not spawn there.

evilsaloon commented 1 year ago
  1. With ItemsAdder version 3.5.0-r2, it seems that the noteblock portion of this bug has mostly gone away. The bottom block of the trees is now the same as the log block (see screenshot).

image

However, the trees still spawn in water, and the bottom block is right at the level of the water.

Sometimes, I get the following strange errors when I generate new chunks in the console (about 1% of the time):

[19:50:41] [Server thread/WARN]: [ItemsAdder] Task #77829 for ItemsAdder v3.5.0-r2 generated an exception
java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24
    at net.minecraft.world.level.chunk.ChunkAccess.getSection(ChunkAccess.java:211) ~[?:?]
    at net.minecraft.world.level.chunk.LevelChunk.setBlockState(LevelChunk.java:526) ~[?:?]
    at ia.nms.aI.impl.v1_20_R1.a(SourceFile:61) ~[ItemsAdder_3.5.0-r2.jar:?]
    at ia.nms.aI.impl.v1_20_R1.R(SourceFile:29) ~[ItemsAdder_3.5.0-r2.jar:?]
    at ia.m.cA.f(SourceFile:233) ~[ItemsAdder_3.5.0-r2.jar:?]
    at ia.m.cA.a(SourceFile:520) ~[ItemsAdder_3.5.0-r2.jar:?]
    at ia.m.cI.b(SourceFile:47) ~[ItemsAdder_3.5.0-r2.jar:?]
    at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1507) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:487) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1421) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1192) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.1.jar:git-Purpur-1996]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]

and also

[20:11:57] [Server thread/WARN]: [ItemsAdder] Error loading world 'fixed_glitched_blocks.pregion' file. Regenerated: /home/container/./world/itemsadder/region/fixed_glitched_blocks.pregion
  1. No, my trees have never spawned on water before, this is the first time it has happened. Didn't feel like it warranted a 3rd tree-related bug report, so I put it into this report. I am using the same .yml as in this bug report, which does not make the trees spawn in water.
LoneDev6 commented 1 year ago

Please post the whole log of when these two errors appeared, thanks

evilsaloon commented 1 year ago

https://pastebin.com/vx8a7M12

evilsaloon commented 1 year ago

Seems to be fixed in 3.5.0b