2014-03-26 21:34:47 +01:00
From 1477f4d77a4847abd58f0ea17465436573080305 Mon Sep 17 00:00:00 2001
2013-09-21 04:33:27 +02:00
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
2014-03-26 21:34:47 +01:00
index 97308d0..4d336d8 100644
2013-09-21 04:33:27 +02:00
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
2013-09-21 04:58:36 +02:00
@@ -178,7 +178,15 @@ public abstract class StructureGenerator extends WorldGenBase {
2013-09-21 04:33:27 +02:00
private void a(World world) {
if (this.e == null) {
+ // Spigot Start
+ if ( world.spigotConfig.saveStructureInfo )
+ {
2013-12-01 05:13:58 +01:00
this.e = (PersistentStructure) world.a(PersistentStructure.class, this.a());
2013-09-21 04:58:36 +02:00
+ } else
+ {
2013-12-01 05:13:58 +01:00
+ this.e = new PersistentStructure( this.a() );
2013-09-21 04:33:27 +02:00
+ }
+ // Spigot End
if (this.e == null) {
2013-12-01 05:13:58 +01:00
this.e = new PersistentStructure(this.a());
world.a(this.a(), (PersistentBase) this.e);
2013-09-21 04:33:27 +02:00
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2014-03-09 22:37:28 +01:00
index adebd03..9586c44 100644
2013-09-21 04:33:27 +02:00
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2014-01-14 09:16:43 +01:00
@@ -184,4 +184,16 @@ public class SpigotWorldConfig
2013-09-21 04:33:27 +02:00
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 when updating to 1.7!" );
+ log( "*** WARNING *** Please use this option with caution, SpigotMC is not responsible for any issues this option may cause in the future!" );
+ }
+ }
}
--
2014-03-26 21:34:47 +01:00
1.8.5.2.msysgit.0
2013-09-21 04:33:27 +02:00