Force the player's experience to sync when changing dimensions
(Thank you, @Gebatzens) Fixes #2943 Also add misc IDEA files to .gitignore
This commit is contained in:
parent
4040a57a16
commit
4e87e281c9
2 changed files with 6 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -3,6 +3,9 @@ output
|
|||
.gradle
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
out
|
||||
|
||||
Mekanism*.jar
|
||||
MDK.zip
|
||||
|
|
|
@ -25,6 +25,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.play.server.S07PacketRespawn;
|
||||
import net.minecraft.network.play.server.S1DPacketEntityEffect;
|
||||
import net.minecraft.network.play.server.S1FPacketSetExperience;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
@ -397,6 +398,8 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo
|
|||
player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potioneffect));
|
||||
}
|
||||
|
||||
player.playerNetServerHandler.sendPacket(new S1FPacketSetExperience(player.experience, player.experienceTotal, player.experienceLevel)); // Force XP sync
|
||||
|
||||
FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, id, coord.dimensionId);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue