Fix Entity.getPersistentData function name. Closes #6131

Bump spec version for first 1.14.4 RB.
This commit is contained in:
LexManos 2019-09-12 08:52:22 -07:00
parent ffdeeb95b7
commit 3cc76a3f60
5 changed files with 12 additions and 12 deletions

View File

@ -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 <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
// 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.

View File

@ -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

View File

@ -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) {

View File

@ -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_);
}

View File

@ -74,7 +74,7 @@ public interface IForgeEntity extends ICapabilitySerializable<CompoundNBT>
* 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.