mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-11-25 08:37:13 +00:00
Fix pocket computers swinging when rebooted
With the 1.21.1 update, computers IDs are stored in a NonNegativeId, so we can't compare with reference equality. There's an ErrorProne check for this, I wonder if we should enable it again, or at least roll our own which is a little more permissive.
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -177,7 +177,7 @@ public class PocketComputerItem extends Item {
|
||||
return slotChanged
|
||||
|| oldStack.getItem() != newStack.getItem()
|
||||
|| oldStack.getCount() != newStack.getCount()
|
||||
|| oldStack.get(ModRegistry.DataComponents.COMPUTER_ID.get()) != newStack.get(ModRegistry.DataComponents.COMPUTER_ID.get());
|
||||
|| !Objects.equals(oldStack.get(ModRegistry.DataComponents.COMPUTER_ID.get()), newStack.get(ModRegistry.DataComponents.COMPUTER_ID.get()));
|
||||
}
|
||||
|
||||
@FabricOverride
|
||||
|
||||
Reference in new issue
Block a user