Fixed overworld spawn point reset when respawning in another dimension (#4982)

This commit is contained in:
TheCyberBrick 2018-08-16 21:55:11 +02:00 committed by LexManos
parent dd0c251b3d
commit 1f58bd71c0
2 changed files with 8 additions and 1 deletions

View file

@ -120,13 +120,18 @@
this.field_71070_bA = this.field_71069_bz;
}
@@ -1144,6 +1162,18 @@
@@ -1144,6 +1162,23 @@
this.field_193110_cw = p_193104_1_.field_193110_cw;
this.func_192029_h(p_193104_1_.func_192023_dk());
this.func_192031_i(p_193104_1_.func_192025_dl());
+
+ this.spawnChunkMap = p_193104_1_.spawnChunkMap;
+ this.spawnForcedMap = p_193104_1_.spawnForcedMap;
+ if(p_193104_1_.field_71093_bK != 0)
+ {
+ this.field_71077_c = p_193104_1_.field_71077_c;
+ this.field_82248_d = p_193104_1_.field_82248_d;
+ }
+
+ //Copy over a section of the Entity Data from the old player.
+ //Allows mods to specify data that persists after players respawn.

View file

@ -174,6 +174,8 @@ public net.minecraft.client.renderer.EntityRenderer func_175069_a(Lnet/minecraft
public net.minecraft.util.WeightedRandom$Item field_76292_a #probability
# EntityPlayer
public net.minecraft.entity.player.EntityPlayer func_184816_a(Lnet/minecraft/entity/item/EntityItem;)Lnet/minecraft/item/ItemStack; # dropItemAndGetStack
protected net.minecraft.entity.player.EntityPlayer field_71077_c # spawnPos
protected net.minecraft.entity.player.EntityPlayer field_82248_d # spawnForced
# EntityPlayerSP
public net.minecraft.client.entity.EntityPlayerSP func_184816_a(Lnet/minecraft/entity/item/EntityItem;)Lnet/minecraft/item/ItemStack; # dropItemAndGetStack
## EntityPlayerMP getNextWindowId