Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-16075

Entities other than the player can't leave the end



    • Confirmed


      When you send mob or items back from the end they don't get to the world spawn as it would be intended. Instead they get teleported to the spawn coordinates but stay in the end which leads to them dropping in the void most of the time.
      The cause for the entities staying in the end is that the teleportation code always gets called with the end as destination (1) if an entity collides with and end portal even if it already is in the end.

      Here is a video showing the issue: http://www.youtube.com/watch?v=CPa2RWbs_Mw

      A way to reproduce it:
      1. Go to the spawn of the world and remember the coordinates.
      2. Go to the end and kill the dragon. ("/effect @p 5 1000 10" should give you the power for a one hit )
      3. Spawn a wither into the end portal in the end.
      4. Stay in the end and teleport to the spawn coordinates you figured out earlier. You should see the Wither falling slowly into the void there.
      Also you can of course look for the entities you spawned into the portal at the spawn and not find them.

      I was able to do an easy fix for this bug using MCP (I will use the names they gave the classes to describe).
      My change is in the main entity class ("Entity,java") in the method where the entity gets spawned in the dimension it travels to ("public void travelToDimension(int par1)").
      In this method the world object of the destination world gets picked depending on the parameter, which is probably supposed to be the ID of the destination dimension. All I did was adding the rule that if this parameter is 1 (end) and the dimension the entity currently is in is 1 (end) the destination world gets picked with 0 (overworld).
      I changed this line:

      WorldServer var5 = mcserver.worldServerForDimension(par1);

      Into this:

      WorldServer destinationworld;
      if (par1== 1 && this.dimension==1)
      destinationworld = mcserver.worldServerForDimension(0);
      else destinationworld = mcserver.worldServerForDimension(par1);

      This might be a lazy fix because the method is probably defined different, but doing it the nice way is your job Dinnerbone ;-P

      Note: This bug was posted before but closed as "Works as intended" because of a misunderstanding. Since the comments on there didn't seem to change anything I decided to repost it in a more detailed way.
      So in case someone want to mark it as duplicate to https://mojang.atlassian.net/browse/MC-4846 please make sure the reopen it and to add the additional information so that this issue can get fixed. Thank you!


        Issue Links



              evilseph EvilSeph (Warren Loo)
              panda4994 [Mojang] Panda
              44 Vote for this issue
              2 Start watching this issue