ForgePatch/patches_old_unknown/WorldInfo.java.patch
LexManos f13465012b World and TileEntity patch work.
TerrtainGen events are removed, 1.13's world gen re-write invalidates them all.
2018-12-13 01:15:53 -08:00

51 lines
No EOL
1.9 KiB
Diff

--- ../src-base/minecraft/net/minecraft/world/storage/WorldInfo.java
+++ ../src-work/minecraft/net/minecraft/world/storage/WorldInfo.java
@@ -63,8 +63,9 @@
private double field_176153_H = 0.2D;
private int field_176154_I = 5;
private int field_176155_J = 15;
private GameRules field_82577_x = new GameRules();
+ private java.util.Map<String, net.minecraft.nbt.NBTBase> additionalProperties;
protected WorldInfo()
{
@@ -366,6 +367,7 @@
p_76064_1_.func_74780_a("BorderSizeLerpTarget", this.field_176148_F);
p_76064_1_.func_74780_a("BorderWarningBlocks", (double)this.field_176154_I);
p_76064_1_.func_74780_a("BorderWarningTime", (double)this.field_176155_J);
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().getDataFixer().writeVersionData(p_76064_1_);
if (this.field_176158_z != null)
{
@@ -708,6 +711,7 @@
public void func_176144_a(EnumDifficulty p_176144_1_)
{
+ net.minecraftforge.common.ForgeHooks.onDifficultyChange(p_176144_1_, this.field_176158_z);
this.field_176158_z = p_176144_1_;
}
@@ -805,18 +809,49 @@
}
});
}
+ /**
+ * Allow access to additional mod specific world based properties
+ * Used by FML to store mod list associated with a world, and maybe an id map
+ * Used by Forge to store the dimensions available to a world
+ * @param additionalProperties
+ */
+ public void setAdditionalProperties(java.util.Map<String,net.minecraft.nbt.NBTBase> additionalProperties)
+ {
+ // one time set for this
+ if (this.additionalProperties == null)
+ {
+ this.additionalProperties = additionalProperties;
+ }
+ }
+ public net.minecraft.nbt.NBTBase getAdditionalProperty(String additionalProperty)
+ {
+ return this.additionalProperties!=null? this.additionalProperties.get(additionalProperty) : null;
+ }
+