mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-21 07:09:21 +08:00
52 lines
2.2 KiB
Diff
52 lines
2.2 KiB
Diff
From ba1e8251fe01a17473721f484f6f28204615b486 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 ab4dc19..cb8ff49 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) {
|
|
- this.e = (WorldGenFeature) world.a(WorldGenFeature.class, this.a());
|
|
+ // Spigot Start
|
|
+ if ( world.spigotConfig.saveStructureInfo )
|
|
+ {
|
|
+ this.e = (WorldGenFeature) world.a( WorldGenFeature.class, this.a() );
|
|
+ } else
|
|
+ {
|
|
+ this.e = new WorldGenFeature( this.a() );
|
|
+ }
|
|
+ // Spigot End
|
|
if (this.e == null) {
|
|
this.e = new WorldGenFeature(this.a());
|
|
world.a(this.a(), (WorldMapBase) this.e);
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index 2caafa2..a34670e 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -207,4 +207,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.8.1.2
|
|
|