![]() if the size of the list we get (which is only going to contain enderdragons) is greater 1 (meaning there is a enderdragon loaded) ![]() If(endWorld.getEntities(EnderDragon.class::isInstance).size() > 1) below we look through all the LOADED entities in the world and filter everything out that isn't a enderdragon Optional endWorldopt = Sponge.getServer().getWorld("the_end") ![]() Note: This can likely be done better, but this should give you an idea //no idea how to get the end world specifically, this might not work like this You can then spawn this one at any position you give it. ![]() Unless I’m mistaken, you can mainly only check for LOADED entities in any world (also the end), which is quite simple to do, however means it can skip over the enderdragon, when for instance no one is in the end.Īs for (2), you can call a certain function to return a “default” entity, which should be the best way to create a normal functioning enderdragon.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |