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!
Linked issues
is duplicated by 5
Comments 4
I have a suggestion how this fix could be adjusted to be even more useful:
With the new lead the game is able to know which player is interacting with a certain mob. So why not let the portal check if the mob is attached to a player via a lead and then teleport it to the players spawn instead of the world spawn? Maybe the lead could be destroyed in that process as a "cost" for that feature.
This would allow people to get mooshrooms or wolfes a bit easier for example.
Hopefully this isn't too complicated to implement, if so please fix the main issue anyway.
Cheers !
(@ dinnerbone: Don't make a wrong answer. You're supposed to say "hell yes!"
😃 )
Confirmed.