From 3cc76a3f604027e80cda80429b2a7ebd9dc0f0a7 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 12 Sep 2019 08:52:22 -0700 Subject: [PATCH] Fix Entity.getPersistentData function name. Closes #6131 Bump spec version for first 1.14.4 RB. --- build.gradle | 2 +- mdk/src/main/resources/META-INF/mods.toml | 2 +- .../net/minecraft/entity/Entity.java.patch | 14 +++++++------- .../entity/player/ServerPlayerEntity.java.patch | 4 ++-- .../common/extensions/IForgeEntity.java | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 8aea7c4d4..d4b7dba5b 100644 --- a/build.gradle +++ b/build.gradle @@ -180,7 +180,7 @@ project(':forge') { } ext { - SPEC_VERSION = '28.0' // This is overwritten by git tag, but here so dev time doesnt explode + SPEC_VERSION = '28.1' // This is overwritten by git tag, but here so dev time doesnt explode // The new versioning sceme is -.. // ForgeMC is a unique identifier for every MC version we have supported. // Essentially, the same as the old, except dropping the first number, and the builds are no longer unique. diff --git a/mdk/src/main/resources/META-INF/mods.toml b/mdk/src/main/resources/META-INF/mods.toml index ffc50859f..23aa1e7a2 100644 --- a/mdk/src/main/resources/META-INF/mods.toml +++ b/mdk/src/main/resources/META-INF/mods.toml @@ -6,7 +6,7 @@ # The name of the mod loader type to load - for regular FML @Mod mods it should be javafml modLoader="javafml" #mandatory # A version range to match for said mod loader - for regular FML @Mod it will be the forge version -loaderVersion="[28,)" #mandatory (26 is current forge version) +loaderVersion="[28,)" #mandatory (28 is current forge version) # A URL to refer people to when problems occur with this mod issueTrackerURL="http://my.issue.tracker/" #optional # A list of mods - how many allowed here is determined by the individual mod loader diff --git a/patches/minecraft/net/minecraft/entity/Entity.java.patch b/patches/minecraft/net/minecraft/entity/Entity.java.patch index 3a51376e3..58ad66a9c 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.java.patch +++ b/patches/minecraft/net/minecraft/entity/Entity.java.patch @@ -156,7 +156,7 @@ + CompoundNBT caps = serializeCaps(); + if (caps != null) p_189511_1_.func_218657_a("ForgeCaps", caps); -+ if (persistantData != null) p_189511_1_.func_218657_a("ForgeData", persistantData); ++ if (persistentData != null) p_189511_1_.func_218657_a("ForgeData", persistentData); + this.func_213281_b(p_189511_1_); if (this.func_184207_aI()) { @@ -165,7 +165,7 @@ this.func_174810_b(p_70020_1_.func_74767_n("Silent")); this.func_189654_d(p_70020_1_.func_74767_n("NoGravity")); this.func_184195_f(p_70020_1_.func_74767_n("Glowing")); -+ if (p_70020_1_.func_150297_b("ForgeData", 10)) persistantData = p_70020_1_.func_74775_l("ForgeData"); ++ if (p_70020_1_.func_150297_b("ForgeData", 10)) persistentData = p_70020_1_.func_74775_l("ForgeData"); + if (p_70020_1_.func_150297_b("CanUpdate", 99)) this.canUpdate(p_70020_1_.func_74767_n("CanUpdate")); + if (p_70020_1_.func_150297_b("ForgeCaps", 10)) deserializeCaps(p_70020_1_.func_74775_l("ForgeCaps")); if (p_70020_1_.func_150297_b("Tags", 9)) { @@ -315,12 +315,12 @@ + this.captureDrops = value; + return ret; + } -+ private CompoundNBT persistantData; ++ private CompoundNBT persistentData; + @Override -+ public CompoundNBT getPersistantData() { -+ if (persistantData == null) -+ persistantData = new CompoundNBT(); -+ return persistantData; ++ public CompoundNBT getPersistentData() { ++ if (persistentData == null) ++ persistentData = new CompoundNBT(); ++ return persistentData; + } + @Override + public boolean canTrample(BlockState state, BlockPos pos, float fallDistance) { diff --git a/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch b/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch index 63f0de54e..ca6922d50 100644 --- a/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/ServerPlayerEntity.java.patch @@ -116,9 +116,9 @@ + + //Copy over a section of the Entity Data from the old player. + //Allows mods to specify data that persists after players respawn. -+ CompoundNBT old = p_193104_1_.getPersistantData(); ++ CompoundNBT old = p_193104_1_.getPersistentData(); + if (old.func_74764_b(PERSISTED_NBT_TAG)) -+ getPersistantData().func_218657_a(PERSISTED_NBT_TAG, old.func_74781_a(PERSISTED_NBT_TAG)); ++ getPersistentData().func_218657_a(PERSISTED_NBT_TAG, old.func_74781_a(PERSISTED_NBT_TAG)); + net.minecraftforge.event.ForgeEventFactory.onPlayerClone(this, p_193104_1_, !p_193104_2_); } diff --git a/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java b/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java index dc41f1a8f..054e9a7e8 100644 --- a/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java +++ b/src/main/java/net/minecraftforge/common/extensions/IForgeEntity.java @@ -74,7 +74,7 @@ public interface IForgeEntity extends ICapabilitySerializable * It will be written, and read from disc, so it persists over world saves. * @return A NBTTagCompound */ - CompoundNBT getPersistantData(); + CompoundNBT getPersistentData(); /** * Used in model rendering to determine if the entity riding this entity should be in the 'sitting' position.