From 1f58bd71c09fb90165de4161832d14a0698f731a Mon Sep 17 00:00:00 2001 From: TheCyberBrick Date: Thu, 16 Aug 2018 21:55:11 +0200 Subject: [PATCH] Fixed overworld spawn point reset when respawning in another dimension (#4982) --- .../net/minecraft/entity/player/EntityPlayerMP.java.patch | 7 ++++++- src/main/resources/forge_at.cfg | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch index e374ae6906..51170d5b8a 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch @@ -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. diff --git a/src/main/resources/forge_at.cfg b/src/main/resources/forge_at.cfg index 6152e46c4c..676d7a5f22 100644 --- a/src/main/resources/forge_at.cfg +++ b/src/main/resources/forge_at.cfg @@ -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