Fix Redstone power propagating between powered and activator rails. Fixed #10642

This commit is contained in:
LexManos committed 2025-08-20 12:20:11 -07:00
1 parent eae9b9145d
commit ce79df9716
1 file changed
+1 -1
@@ -39,7 +39,7 @@
protected boolean isSameRailWithPower(Level p_55226_, BlockPos p_55227_, boolean p_55228_, int p_55229_, RailShape p_55230_) {
BlockState blockstate = p_55226_.getBlockState(p_55227_);
- if (!blockstate.is(this)) {
+ if (!(blockstate.getBlock() instanceof PoweredRailBlock other)) {
+ if (!(blockstate.getBlock() instanceof PoweredRailBlock other) || this.isActivatorRail() != other.isActivatorRail()) {
return false;
} else {
- RailShape railshape = blockstate.getValue(SHAPE);