MineColonies

MineColonies

53M Downloads

Fence Connection Check not running after builder completes structure

KKomrade opened this issue ยท 20 comments

commented

Prerequisites

  • I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
  • I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.16.4
  • MineColonies Version: 0.13.557-ALPHA
  • Structurize Version: 0.13.104-ALPHA
  • Related Mods and their Versions: Forge 35.1.35

Expected behavior

When the builder finishes a building, all of the fences should be updated so they connect with appropriate solid blocks.

Actual behavior

The builder finishes a structure, and the fences are not updated leaving gaps. Saving to menu and reloading will update the blocks as well as right clicking on them manually, but that seems to not be intended.
2021-01-07_19 21 46

Steps to reproduce the issue

  1. Start a colony
  2. Build a builder's hut that uses fences (I used Medieval Oak)
  3. Observe the missing connections upon completion

Logs

I trimmed it a bit to have the relevant section.
https://gist.github.com/KKomrade/3b9430d3757d4c05d046932495d60ca1

Notes


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

if saving and reloading fixes it its probably only visual

commented

if saving and reloading fixes it its probably only visual

Only a right click on the fence is enough. However, is it possible to refresh fences when finish building?

commented

Maybe @Nightenom knows, I looked into it once and it was a bit messy. Maybe on finishing building we can update the chunk range?

commented

if saving and reloading fixes it its probably only visual

I'm aware this is a relatively small issue that doesn't really affect gameplay, but I figured it might be a pretty simple fix and make the mod more polished, so that's why I brought it up. Plus it didn't seem to happen in previous versions :P

commented

It's because mojang rewrote the block update in 1.14+ that messed this up

commented

@Raycoms try ClientWorld.markSurroundingsForRerender(x,y,z), it uses section pos instead of chunks, maybe there is different method

commented

It's not just re-rendering that is needed, the block has to be updated to connect to its neighbors

commented

You sure? Reconnecting nor right-click triggers block update afaik

commented
From my experience you need to place a block next to a fence or break and replace the fence yourself - just reloading the game doesn't fix it.

I took it from him

commented

Lol, haven't seen the last comment

commented

From my experience you need to place a block next to a fence or break and replace the fence yourself - just reloading the game doesn't fix it.

commented

Can also confirm that fences have to be broken and replaced to fix this. It also applies to iron bars too.

And maybe related to the issue of double-racks glitching when they don't join properly?

commented

Does this still happen with the latest versions?

commented

Can't reproduce in latest versions, might be a problem of having a really old schematic

commented

Okay the last version where everything works fine before it breaks is minecolonies0.13.529 Structurize-0.13.104 Minecraft 1.16.4. I have a very strong feeling that whatever changes in #6270 is what messed up the connection handlers for the builder.

commented

image
This is the specific code that I reverted to get it to work again. However, I'm not sure what effects a revert would have on the intended changes from that PR

commented

image
0.13.596 It's always the block placed AFTER the fence that doesn't properly update the connection
Edit: I remember this not always being an issue, in version 0.13.437 when I first started playing, everything updated properly(Minecraft 1.16.3). I'm gonna keep testing versions until it breaks

commented

@someaddons you can't ever place without flag 3... I see you don't want to update pathfinding, but you also don't want to check every vanilla major if all the logic around placing a block has changed
(also, mcol shouldn't touch the placing logic from structurize at all - go there and fix it there, cuz then I'm like wtf why it doesn't work when there was nothing changed during last year)

commented

Any update on the fix for this? I think it's fairly straight forward what the issue is. Literally just reverting that 1 line of code I think. Also should this issue be moved back to the Minecolonies github?

commented