Do not save multiple times
This commit is contained in:
parent
89deb3d2ac
commit
a491fdc83b
@ -103,6 +103,7 @@ public abstract class ServerWorldMixin extends WorldMixin implements ServerWorld
|
|||||||
@Shadow @Final private ServerChunkProvider field_241102_C_;
|
@Shadow @Final private ServerChunkProvider field_241102_C_;
|
||||||
@Shadow protected abstract boolean hasDuplicateEntity(Entity entityIn);
|
@Shadow protected abstract boolean hasDuplicateEntity(Entity entityIn);
|
||||||
@Shadow @Final public static BlockPos field_241108_a_;
|
@Shadow @Final public static BlockPos field_241108_a_;
|
||||||
|
@Shadow @Final public IServerWorldInfo field_241103_E_;
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
|
||||||
@SuppressWarnings({"FieldCanBeLocal", "unused"})
|
@SuppressWarnings({"FieldCanBeLocal", "unused"})
|
||||||
@ -222,6 +223,9 @@ public abstract class ServerWorldMixin extends WorldMixin implements ServerWorld
|
|||||||
|
|
||||||
@Inject(method = "save", at = @At("RETURN"))
|
@Inject(method = "save", at = @At("RETURN"))
|
||||||
private void arclight$saveLevelDat(IProgressUpdate progress, boolean flush, boolean skipSave, CallbackInfo ci) {
|
private void arclight$saveLevelDat(IProgressUpdate progress, boolean flush, boolean skipSave, CallbackInfo ci) {
|
||||||
|
if (this.field_241103_E_ instanceof DerivedWorldInfo) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$$worldDataServer.setWorldBorderSerializer(this.getWorldBorder().getSerializer());
|
this.$$worldDataServer.setWorldBorderSerializer(this.getWorldBorder().getSerializer());
|
||||||
this.$$worldDataServer.setCustomBossEventData(this.shadow$getServer().getCustomBossEvents().write());
|
this.$$worldDataServer.setCustomBossEventData(this.shadow$getServer().getCustomBossEvents().write());
|
||||||
this.convertable.saveLevel(this.shadow$getServer().field_240767_f_, this.$$worldDataServer, this.shadow$getServer().getPlayerList().getHostPlayerData());
|
this.convertable.saveLevel(this.shadow$getServer().field_240767_f_, this.$$worldDataServer, this.shadow$getServer().getPlayerList().getHostPlayerData());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user