-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-Client desync of cable collision shapes for recently painted cables #8314
Comments
I could reproduce that in my test setup. I've tested a simple patch, which solves the problem. But I'm not sure if that is the right place to do that or not with regards to side effects or performance implications, so I'm not posting that as a PR: diff --git a/src/main/java/appeng/block/networking/CableBusBlock.java b/src/main/java/appeng/block/networking/CableBusBlock.java
index 59dbf7fda..66fdf6ebc 100644
--- a/src/main/java/appeng/block/networking/CableBusBlock.java
+++ b/src/main/java/appeng/block/networking/CableBusBlock.java
@@ -248,7 +248,9 @@ protected InteractionResult useWithoutItem(BlockState state, Level level, BlockP
public boolean recolorBlock(BlockGetter level, BlockPos pos, Direction side,
DyeColor color, Player who) {
try {
- return this.cb(level, pos).recolourBlock(side, AEColor.fromDye(color), who);
+ boolean result = this.cb(level, pos).recolourBlock(side, AEColor.fromDye(color), who);
+ this.getBlockEntity(level, pos).partChanged();
+ return result;
} catch (Throwable ignored) {
}
return false; |
Should probably go into appeng.parts.networking.CablePart#changeColor |
Describe the bug
Cables which have been painted with the colourizer (and thusly have their collision shape changed as they dont connect to each other anymore) are desyncronized between the client and server until a block update occurs next to them. the server still thinks the cables are connected while the client recognises that they arent.
Video Example
(Here breaking the sandstone blocs causes the block updates)
How to reproduce the bug
have two sets of cables connected to each other. paint them so they disconnect from each other
Expected behavior
you should be able to walk between them
Additional details
Neighbor block updates are required for both cables's collision shapes to be changed server side, one cable's shape changing will not change the neighboring cable's
Which minecraft version are you using?
1.21
On which mod loaders does it happen?
NeoForge
Crash log
https://pastebin.com/Kz9rARSp
The text was updated successfully, but these errors were encountered: