Paper/CraftBukkit-Patches/0042-Allow-Disabling-of-1.6.3-Structure-Saving.patch

51 Zeilen
2.1 KiB
Diff

From b61bd159a881d8e31de9c8d640815e720420a77c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 21 Sep 2013 12:33:09 +1000
Subject: [PATCH] Allow Disabling of 1.6.3 Structure Saving
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
2015-02-28 12:36:22 +01:00
index 0bced98..bb1a11e 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
2015-02-28 12:36:22 +01:00
@@ -195,7 +195,15 @@ public abstract class StructureGenerator extends WorldGenBase {
private void a(World world) {
2014-11-28 02:17:45 +01:00
if (this.d == null) {
+ // Spigot Start
+ if ( world.spigotConfig.saveStructureInfo )
+ {
2014-11-28 02:17:45 +01:00
this.d = (PersistentStructure) world.a(PersistentStructure.class, this.a());
+ } else
+ {
2014-11-28 02:17:45 +01:00
+ this.d = new PersistentStructure( this.a() );
+ }
+ // Spigot End
2014-11-28 02:17:45 +01:00
if (this.d == null) {
this.d = new PersistentStructure(this.a());
world.a(this.a(), (PersistentBase) this.d);
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 2b98acb..15cb6b4 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -188,4 +188,16 @@ public class SpigotWorldConfig
randomLightUpdates = getBoolean( "random-light-updates", false );
log( "Random Lighting Updates: " + randomLightUpdates );
}
+
+ public boolean saveStructureInfo;
+ private void structureInfo()
+ {
+ saveStructureInfo = getBoolean( "save-structure-info", true );
+ log( "Structure Info Saving: " + saveStructureInfo );
+ if ( !saveStructureInfo )
+ {
+ log( "*** WARNING *** You have selected to NOT save structure info. This may cause structures such as fortresses to not spawn mobs!" );
+ log( "*** WARNING *** Please use this option with caution, SpigotMC is not responsible for any issues this option may cause in the future!" );
+ }
+ }
}
--
2015-05-09 22:23:26 +02:00
2.1.4