Open Terrain Generator (OTG)

Open Terrain Generator (OTG)

10M Downloads

[Spigot] OTG does not always send updates to client when spawning a BO3 or BO4 in v9_r7

authvin opened this issue ยท 1 comments

commented

OTG Plugin or Mod

  • OTG Mod for Forge
  • OTG Plugin for Spigot

OTG Version

[Please specify the full OTG version that you are running by placing "x" into []]

  • 1.12.2_v8_r1
  • 1.12.2-v6
  • 1.12.2-v9_r7

Description

Whenever a BO3 or BO4 generates in a world, parts of it are cut off on the client side and not updated, creating a lot of ghost blocks.

I loaded Biome Bundle on v9_r7 and got massive ghosting from practically all generating BO3's which persisted until I relogged. I also loaded up the Dungeons preset and noticed some chunks were all ghost blocks.

Fix

I managed to fix this by changing:
notifyAndUpdatePhysics(this.world.getWorld(), blockPos, chunk, oldBlockData, blockData, 2 | 16);
to:
world.getWorld().notifyAndUpdatePhysics(blockPos, chunk, oldBlockData, blockData, 2 | 16);
on line 242 of Bukkit's OTGChunkGenerator. This is what the line was in v8.3.

With that fix, the ghosting with both the BO3's in BB and the BO4's in the dungeon preset appear to be gone.

I didn't submit a PR for this bc it's a tiny fix, and it also doesn't fix whatever is wrong with the new method for updating clients.

commented

Hey @authvin , the customised notifyAndUpdatePhysics method is in there to avoid cascading chunkgen caused by block updates to neighbouring blocks in adjacent chunks when placing blocks on chunk borders. For Forge I've removed this workaround a while ago, I'll do the same for Spigot as you suggest. Not entirely sure how I fixed this anymore, in theory this could cause cascading chunkgen when placing things like torches on walls, fences, redstone etc, will need to test. Have included this for 9.0_r8.