mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-15 04:41:37 +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)) {
|
||||
newState = getValidBlockForPosition(newState, pos);
|
||||
}
|
||||
NBS successState = setBlockState(chunk, pos, newState);
|
||||
boolean successful = successState != null;
|
||||
NBS lastValue = setBlockState(chunk, pos, newState);
|
||||
boolean successful = lastValue != null;
|
||||
|
||||
// Create the TileEntity
|
||||
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) {
|
||||
updateLightingForBlock(pos);
|
||||
}
|
||||
markAndNotifyBlock(pos, chunk, old, newState, sideEffects);
|
||||
markAndNotifyBlock(pos, chunk, lastValue, newState, sideEffects);
|
||||
}
|
||||
|
||||
return successful;
|
||||
@ -183,7 +183,7 @@ default void markAndNotifyBlock(NP pos, NC chunk, NBS oldState, NBS newState, Si
|
||||
}
|
||||
|
||||
// Seems used only for PoI updates
|
||||
onBlockStateChange(pos, oldState, newState);
|
||||
onBlockStateChange(pos, oldState, blockState1);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user