<commit_before>--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
@@ -295,6 +295,21 @@
         return this.func_176223_P().func_177226_a(field_176387_N, p_180642_8_.func_174811_aO().func_176734_d()).func_177226_a(field_176464_a, Boolean.valueOf(false)).func_177226_a(field_176463_b, BlockRedstoneComparator.Mode.COMPARE);
     }
 
+    @Override
+    public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
+    {
+        if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World)
+        {
+            func_176204_a((World)world, pos, world.func_180495_p(neighbor), world.func_180495_p(neighbor).func_177230_c());
+        }
+    }
+
+    @Override
+    public boolean getWeakChanges(IBlockAccess world, BlockPos pos)
+    {
+        return true;
+    }
+
     public static enum Mode implements IStringSerializable<commit_msg>Fixed crash with caomparators due to wrong position. Closes #1512<commit_after>--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
@@ -295,6 +295,21 @@
         return this.func_176223_P().func_177226_a(field_176387_N, p_180642_8_.func_174811_aO().func_176734_d()).func_177226_a(field_176464_a, Boolean.valueOf(false)).func_177226_a(field_176463_b, BlockRedstoneComparator.Mode.COMPARE);
     }
 
+    @Override
+    public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
+    {
+        if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World)
+        {
+            func_176204_a((World)world, pos, world.func_180495_p(pos), world.func_180495_p(neighbor).func_177230_c());
+        }
+    }
+
+    @Override
+    public boolean getWeakChanges(IBlockAccess world, BlockPos pos)
+    {
+        return true;
+    }
+
     public static enum Mode implements IStringSerializable
{'fraction_non_alphanumeric': 0.12593703148425786, 'fraction_numerical': 0.10794602698650675, 'mean_word_length': 4.068354430379747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7251479', 'n_tokens_mistral': 824, 'n_tokens_neox': 701, 'n_words': 96}