MartinTheDragon / Nuclear-Tech-Mod-Remake

A port to Minecraft 1.18 for the Nuclear Tech Mod originally made by HbmMods, migrating to https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake
GNU General Public License v3.0
79 stars 32 forks source link

Quick removal of an multiblock creates "ghost" multiblock tiles. #21

Closed KauaiMoho closed 1 year ago

KauaiMoho commented 1 year ago

Issue description

2022-09-30_21 39 59

The issue seems to be that, whenever a multiblock is placed at the tick that an block obstructing it is broken, the model disappears, along with all of the blocks encompassing the multiblock turning into "Multiblock Structure Parts". The resulting blocks function like air, and disappear when right or left clicked. They still have collision with just the player, not other entities. I have a feeling that this bug may be a client-side issue. Relogging from the server also removes the blocks.

Steps to reproduce

This is a bit of a weird way to reproduce it, but I will try my best.

  1. 2022-10-01_07 22 58

Set up an pumpjack with the head at the corner of a 5 by 4 by 2 hole. Power it.

2. 2022-10-01_07 22 38

Use mechanism to set up an amplified laser, mine has 9 lasers (2 on bottom). This should be pointed at the first block bellow the head of the pumpjack. (The bedrock is there to block the laser, don't add it). Power, but know that the right power input port doesn't work externally (another bug but i am a little to lazy atm to write another report).

3. 2022-10-01_07 23 16

Lastly, begin placing a assembly machine by clicking on the gold block. Once a pumpjack is placed, it will break due to the laser. Pick up the assembly machine item, and place again (For some reason, multiblock don't place when there is an item in the area they would take up). Eventually, the assembly machine will disappear, leaving behind the ghost blocks, and wont drop an item.

Forge version

40.1.76

Nuclear Tech version

0.0.17

Other mods

All test server mods. Version 2.0

(Crash) Log

No response

MartinTheDragon commented 1 year ago

Hi! Now this issue is quite obscure going off of the description, but I was able to reproduce it nonetheless. This isn't effectively caused by the Pumpjack nor Mekanism lasers, but rather a generic server-client conflict due to latency. Essentially the Pumpjack keeps on replacing the block right below it, and you're able to place something below because of the laser. However, when you place a multiblock right before the pumpjack would place another oil pipe, the issue will become apparent. When you place something, the whole placement code will be executed on both server and client, so you don't have to wait for the server to sync up and send you back the result of the placement. An issue can occur though when something else already happened on the server, but you haven't received the information for it yet, so you were able to place a block, but it never happened on the server. The same thing applies to how multiblocks are placed, except the server doesn't tell you that the blocks that were placed to frame the multiblock didn't get placed, so you get these ghost blocks client-side. Honestly I don't know how to fix this, it's just a general server-client conflict, and nothing game-breaking either. The second energy port on the pumpjack not working though is an actual issue, so thanks for that!

Thanks for reporting!

MartinTheDragon commented 1 year ago

Energy port not working properly (as well as some other things due to the same culprit) fixed in e1ffe2d

MartinTheDragon commented 1 year ago

This issue is not only very obscure, it's not game-breaking either. This being kind of a vanilla thing too, attempting to fix it would likely just result in bigger messes, so I won't try. Thanks for reporting anyway! The other thing totally used to be a bug though, so thanks for that as well.