mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-01-18 16:35:25 +01:00
Force-enable NETWORK side effect to ensure blocks are instantly visible
This commit is contained in:
parent
960b7b2a8b
commit
49fca1c0a9
@ -62,19 +62,28 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
|||||||
private static final SideEffectSet EDGE_LIGHTING_SIDE_EFFECT_SET;
|
private static final SideEffectSet EDGE_LIGHTING_SIDE_EFFECT_SET;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
NO_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.LIGHTING, SideEffect.State.OFF).with(
|
NO_SIDE_EFFECT_SET = enableNetworkIfNeeded()
|
||||||
SideEffect.NEIGHBORS,
|
.with(SideEffect.LIGHTING, SideEffect.State.OFF)
|
||||||
SideEffect.State.OFF
|
.with(SideEffect.NEIGHBORS, SideEffect.State.OFF);
|
||||||
);
|
EDGE_SIDE_EFFECT_SET = NO_SIDE_EFFECT_SET
|
||||||
EDGE_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.UPDATE, SideEffect.State.ON).with(
|
.with(SideEffect.UPDATE, SideEffect.State.ON)
|
||||||
SideEffect.NEIGHBORS,
|
.with(SideEffect.NEIGHBORS, SideEffect.State.ON);
|
||||||
SideEffect.State.ON
|
LIGHTING_SIDE_EFFECT_SET = NO_SIDE_EFFECT_SET
|
||||||
);
|
.with(SideEffect.NEIGHBORS, SideEffect.State.OFF);
|
||||||
LIGHTING_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.NEIGHBORS, SideEffect.State.OFF);
|
EDGE_LIGHTING_SIDE_EFFECT_SET = NO_SIDE_EFFECT_SET
|
||||||
EDGE_LIGHTING_SIDE_EFFECT_SET = SideEffectSet.none().with(SideEffect.UPDATE, SideEffect.State.ON).with(
|
.with(SideEffect.UPDATE, SideEffect.State.ON)
|
||||||
SideEffect.NEIGHBORS,
|
.with(SideEffect.NEIGHBORS, SideEffect.State.ON);
|
||||||
SideEffect.State.ON
|
}
|
||||||
);
|
|
||||||
|
// make sure block changes are sent
|
||||||
|
private static SideEffectSet enableNetworkIfNeeded() {
|
||||||
|
SideEffect network;
|
||||||
|
try {
|
||||||
|
network = SideEffect.valueOf("NETWORK");
|
||||||
|
} catch (IllegalArgumentException ignored) {
|
||||||
|
return SideEffectSet.none();
|
||||||
|
}
|
||||||
|
return SideEffectSet.none().with(network, SideEffect.State.ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
private org.bukkit.World bukkitWorld;
|
private org.bukkit.World bukkitWorld;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user