Jump to content

ParkerMC

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ParkerMC's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks for the help both of y'all. Turns out I had the world object of a different dimension than the overworld and now that I changed that it is fixed.
  2. I tried World#loadedEntityList  first but it had the same issue I have now. So then I switch to what I have now (I got the code from World#getEntitiesWithinAABB and just removed the AABB code). I agree it is usually a bad idea but I basically need to update every villager. I can update all the ones not loaded by using when they load with EntityJoinWorldEvent but I need to update the ones already loaded.
  3. I am currently working on a mod in 1.12.2 where I need to loop through a list of all loaded entities in the world. The code works perfectly when running it in eclipse but as when I run it by itself in forge outside of the development environment I do not get any entities printed. I have ruled out it being an issue with sides because it works fine when running both the server and client in eclipse. Is there something I'm missing? Code: FMLLog.log.info("Looking for entities... isRemote: %b", world.isRemote); for(Chunk c : ((WorldServer)this.world).getChunkProvider().getLoadedChunks()) { for(ClassInheritanceMultiMap<Entity> list : c.getEntityLists()) { if (!list.isEmpty()){ for (Entity entity : list){ FMLLog.log.info(entity.getClass().toString()); // More code } } } } } In dev environment: [19:56:46] [Server thread/INFO] [FML]: Looking for entities... isRemote: %b [19:56:46] [Server thread/INFO] [FML]: class net.minecraft.entity.passive.EntityVillager [19:56:46] [Server thread/INFO] [FML]: class net.minecraft.entity.passive.EntitySquid [19:56:46] [Server thread/INFO] [FML]: class net.minecraft.entity.passive.EntitySquid ... Outside of dev environment: (only the one line) [19:54:39] [Server thread/INFO] [FML]: Looking for entities... isRemote: false Thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.