mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-21 04:49:51 +08:00
Few minor tweaks to WNA that don't modify behaviour but bring it more inline with how MC works
This commit is contained in:
parent
42eddd2d4e
commit
4123eddff1
@ -59,8 +59,8 @@ default <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position,
|
|||||||
if (sideEffects.shouldApply(SideEffect.VALIDATION)) {
|
if (sideEffects.shouldApply(SideEffect.VALIDATION)) {
|
||||||
newState = getValidBlockForPosition(newState, pos);
|
newState = getValidBlockForPosition(newState, pos);
|
||||||
}
|
}
|
||||||
NBS successState = setBlockState(chunk, pos, newState);
|
NBS lastValue = setBlockState(chunk, pos, newState);
|
||||||
boolean successful = successState != null;
|
boolean successful = lastValue != null;
|
||||||
|
|
||||||
// Create the TileEntity
|
// Create the TileEntity
|
||||||
if (successful || old == newState) {
|
if (successful || old == newState) {
|
||||||
@ -84,7 +84,7 @@ default <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position,
|
|||||||
if (sideEffects.getState(SideEffect.LIGHTING) == SideEffect.State.ON) {
|
if (sideEffects.getState(SideEffect.LIGHTING) == SideEffect.State.ON) {
|
||||||
updateLightingForBlock(pos);
|
updateLightingForBlock(pos);
|
||||||
}
|
}
|
||||||
markAndNotifyBlock(pos, chunk, old, newState, sideEffects);
|
markAndNotifyBlock(pos, chunk, lastValue, newState, sideEffects);
|
||||||
}
|
}
|
||||||
|
|
||||||
return successful;
|
return successful;
|
||||||
@ -183,7 +183,7 @@ default void markAndNotifyBlock(NP pos, NC chunk, NBS oldState, NBS newState, Si
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Seems used only for PoI updates
|
// Seems used only for PoI updates
|
||||||
onBlockStateChange(pos, oldState, newState);
|
onBlockStateChange(pos, oldState, blockState1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user