mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 06:40:05 +03:00
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java
|
|
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStructure.java
|
|
@@ -175,12 +175,17 @@
|
|
{
|
|
if (this.structureData == null && worldIn != null)
|
|
{
|
|
- this.structureData = (MapGenStructureData)worldIn.loadData(MapGenStructureData.class, this.getStructureName());
|
|
-
|
|
+ // Spigot Start
|
|
+ if (worldIn.spigotConfig.saveStructureInfo) {
|
|
+ this.structureData = (MapGenStructureData)worldIn.getPerWorldStorage().getOrLoadData(MapGenStructureData.class, this.getStructureName());
|
|
+ } else {
|
|
+ this.structureData = new MapGenStructureData(this.getStructureName());
|
|
+ }
|
|
+ // Spigot End
|
|
if (this.structureData == null)
|
|
{
|
|
this.structureData = new MapGenStructureData(this.getStructureName());
|
|
- worldIn.setData(this.getStructureName(), this.structureData);
|
|
+ worldIn.getPerWorldStorage().setData(this.getStructureName(), this.structureData);
|
|
}
|
|
else
|
|
{
|