aboutsummaryrefslogtreecommitdiffhomepage
path: root/CraftBukkit-Patches/0048-Allow-Disabling-of-1.6.3-Structure-Saving.patch
blob: c89a7d674cb65deafc6f7f5d4417e2ea8ca58482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 82b8078f250d7e00e158976330b1ff21d8e3aa0f 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
index 97308d0..4d336d8 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -178,7 +178,15 @@ public abstract class StructureGenerator extends WorldGenBase {
 
     private void a(World world) {
         if (this.e == null) {
+            // Spigot Start
+            if ( world.spigotConfig.saveStructureInfo )
+            {
             this.e = (PersistentStructure) world.a(PersistentStructure.class, this.a());
+            } else
+            {
+                this.e = new PersistentStructure( this.a() );
+            }
+            // Spigot End
             if (this.e == null) {
                 this.e = new PersistentStructure(this.a());
                 world.a(this.a(), (PersistentBase) this.e);
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 8868ea3..48ae475 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -186,4 +186,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 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!" );
+        }
+    }
 }
-- 
1.9.1