The dragon egg does not spawn if there already is an end gateway.
Steps to reproduce
Create a new world
Go to the End
Place an end gateway (for example using the command
/setblock ~ ~100 ~ end_gateway
to make sure that the dragon does not escape through it)Leave the world (or the server) and open it again (or rejoin)
Kill the ender dragon. Note that no egg is spawned.
The egg will spawn if you skipped step 3 or step 4.
Original report
If you are trying to Spawn a Dragon for the first time and you have an End Gateway around for some reason already, it will spawn a Dragon which does not behave like the first one. I think changing the detection for endPortals to something like this is going to be sufficient.
if (tileentity instanceof TileEntityEndPortal && !(tileentity instanceof TileEntityEndGateway)) {...}
instead of
if (tileentity instanceof TileEntityEndPortal) {...}
Comments 10
yes. It is used in determining if the egg is gonna spawn. You re gonna lose that if this happens. It can if somebody decides that they needed to place an end gateway before the Dragon was killed so people could get themselves elytras. That happened on my server.
Wait, I'm completely confused now.
Am I understanding this correctly: Because there has been a end gateway placed in the end before, the end portal does not spawn?
It would be helpful if you could provide exact steps to how to reproduce this issue.
@unknown, are you sure you're talking about the same issue?
sure, just make a new world, go to the end, place an end gateway, restart the world and kill the dragon: no egg.
What do you mean with "restart the world"?
Delete it and create it new? Then it shouldn't matter that you placed a block.
Or close and reopen it? That's not a restart.
Also: If you are able to place an end portal, you're apparently in a Creative and/or have cheats enabled. So why is it a problem if you don't get an egg? You can just give it to yourself.
well ok, my wording may not have been accurate. i filed this not because it s a big deal, but because it isnt expected behaviour. for the portals it makes sense, but not for the gateways.
sure, just make a new world, go to the end, place an end gateway, restart the world and kill the dragon: no egg.
Cannot reproduce. Forgot the restart the world step.
May I reword your report so it will be easier to comprehend? I had quite some trouble understanding what you meant.
I kind of get the point of the report, but are you able to describe the problem a bit more precisely? Is the dragon able to destroy end gateways? Or what is the detection for end portals actually for? What do you mean with "Spawn a Dragon for the first time"? A dragon which has been respawned with end crystals? The very first one which is spawned when you enter the End for the first time? Does it actually matter which dragon it is?