Posted July 25, 20214 yr @SubscribeEvent public static void worldLoad(WorldEvent.Load e) { World world = (World) e.getWorld(); List<Entity> entityList = world.getEntities(null, new AxisAlignedBB(0, 0, 0, 500, 250, 500)); StarWarsInMinecraft.LOGGER.log(Level.DEBUG, entityList); for (Entity entity : entityList) { if (entity instanceof EnderCrystalEntity) { DragonArcherEntity dragonarcherentity = ModEntityTypes.DRAGON_ARCHER.get().create(world); dragonarcherentity.moveTo(entity.getX() - 1, entity.getY(), entity.getZ()); world.addFreshEntity(dragonarcherentity); } } } how do i make it wait for the entitys to load in the world before running the code? Edited July 25, 20214 yr by NeonEILFYT
July 26, 20214 yr Author i want to make it spawn one of my custom mobs next to each end crystal in the end
July 26, 20214 yr don't do that in WorldEvent.Load, used the EntityJoinWorldEvent instead check if the entity in the Event is an EnderCrystalEntity
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.