fix rotation not calling onDirectionChanged (#2718)
* fix rotation not calling onDirectionChanged * changelog
This commit is contained in:
@@ -12,6 +12,12 @@ public class ColoredNetworkBlock extends NetworkNodeBlock {
|
||||
@Override
|
||||
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (state.getBlock().getClass().equals(newState.getBlock().getClass())) {
|
||||
//From BaseBlock#onReplaced as this gets skipped otherwise
|
||||
if (getDirection() != BlockDirection.NONE &&
|
||||
state.getBlock() == newState.getBlock() &&
|
||||
state.get(getDirection().getProperty()) != newState.get(getDirection().getProperty())) {
|
||||
onDirectionChanged(world, pos, newState.get(getDirection().getProperty()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user