MLG-Fortress / PopulationDensity

The now-official repository of the PopulationDensity Bukkit plugin
https://dev.bukkit.org/projects/population-density
10 stars 10 forks source link

Possible Bug: Bottom Block of Post is incorrect #101

Closed Spoonerj1 closed 3 years ago

Spoonerj1 commented 3 years ago

2021-06-26_01 25 23 When I loaded this in 1.17 paper build #47 from their website, I noticed that the bottom block of the region post is not the block configured. My config is: PostDesign: TopBlock: NETHERITE_BLOCK MidTopBlock: NETHERITE_BLOCK MidBottomBlock: NETHERITE_BLOCK BottomBlock: GLOWSTONE PlatformOuterRing: SMOOTH_STONE PlatformInnerRing: SMOOTH_STONE but the BottomBlock of the post is the same as the PlatformInnerRing block. I end up with no glowstone block as expected. (yes I know the glowstone would be blocked anyway, I'm just trying to see why that lowest block isn't matching config)

Edit: add screenshot

RoboMWM commented 3 years ago

Does this work in 1.16?

Spoonerj1 commented 3 years ago

It appears to be the same issue in 1.16. the config is:

    TopBlock: POLISHED_BASALT
    MidTopBlock: POLISHED_BASALT
    MidBottomBlock: POLISHED_BASALT
    BottomBlock: POLISHED_BASALT
    PlatformOuterRing: SMOOTH_STONE
    PlatformInnerRing: SMOOTH_STONE

And this was the post: 2021-06-27_18 47 23

Paper(345) 1.16.4-R0.1-SNAPSHOT PopulationDensity 5.13

RoboMWM commented 3 years ago

This was added in #48, can you take a look @FrankHeijden?

FrankHeijden commented 3 years ago

Interesting, thats a very old PR haha. From a quick glance at the code, I think its a matter of the order in which the blocks are placed.

https://github.com/MLG-Fortress/PopulationDensity/blob/209633cba1d1dd9c86c4bf1b227ee8d3418e3770/src/me/ryanhamshire/PopulationDensity/DataStore.java#L588-L610

First, the post is build, after which the bottom block is overwritten by the placement of the outer (and inner) platform. Changing the order of these two operations would fix the problem :)

Spoonerj1 commented 3 years ago

Thanks!