fix rotation not calling onDirectionChanged (#2718)
* fix rotation not calling onDirectionChanged * changelog
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
### 1.9.8
|
### 1.9.8
|
||||||
- Fixed server crash when scrolling in Grid (Darkere)
|
- Fixed server crash when scrolling in Grid (Darkere)
|
||||||
- Fixed various issues with Grid interactions working without power (Darkere)
|
- Fixed various issues with Grid interactions working without power (Darkere)
|
||||||
|
- Fixed rotation not updating blocks (Darkere)
|
||||||
- Added a JEI synchronized (two-way) search box mode to the Grid (ScoreUnder)
|
- Added a JEI synchronized (two-way) search box mode to the Grid (ScoreUnder)
|
||||||
- Added a nag message when a player joins the world that asks the player to enable the experimental Forge lighting
|
- Added a nag message when a player joins the world that asks the player to enable the experimental Forge lighting
|
||||||
pipeline to ensure correct rendering (raoulvdberge)
|
pipeline to ensure correct rendering (raoulvdberge)
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ public class ColoredNetworkBlock extends NetworkNodeBlock {
|
|||||||
@Override
|
@Override
|
||||||
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||||
if (state.getBlock().getClass().equals(newState.getBlock().getClass())) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user