Jump to content

Lycanite

Members
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Lycanite

  1. What should I do if the daemon gets corrupted?
  2. Hot Swapping in IntelliJ Idea with Forge 1.15.2 does not work, it takes forever to reload, the game freezes for several seconds and then the hot swap fails. In 1.12.2 I can hot swap with no issue and very quickly, I've also had success with hot swapping in 1.14.4 but I haven't touched 1.14.4 for a long time now. (I'm actively maintaining my mod across both 1.15.2 and 1.12.2 atm). I setup OpenJDK8 DCEVM which does work and allows for greater changes such as function changes, etc but this is still incredibly slow compared to hot swapping with or without DCEVM in 1.12.2 which makes modding in 1.15.2 very tedious. I don't use Eclipse so cannot test with that and my gradle config is mostly unchanged from 1.14.4 though I did recreate it from the 1.15.2 MDK download just to make sure with no difference. I've seen similar posts with no solution but people have mentioned running without gradle, if this is possible how would I set this up in Idea? Mod source: https://gitlab.com/Lycanite/LycanitesMobs
  3. Must have been a server side issue as I tried today and now it's working.
  4. I'm trying to update my mod from 1.51.1 to 1.15.2 but I'm getting this error: Could not find net.minecraftforge:forge:1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1. Searched in the following locations: - file:/C:/Gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.pom - file:/C:/Gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.jar - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.pom - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.jar - https://libraries.minecraft.net/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.jar - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.pom - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1/forge-1.15.2-31.0.1_mapped_snapshot_20200125-1.15.1.jar Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html I've tried several mappings including: 20190719-1.14.3 which is included in the mdk download. I've also tried a fresh project from the mdk download and I get the same error (only with the 20190719-1.14.3 mappings of course). Dropping it back to 1.15.1 (1.15.1-30.0.51) works again and I can change mappings, etc so my gradle setup is working otherwise, just not for 1.15.2 versions (the 1.14.4 version of my mod is also working fine with gradle).
  5. I figured I'd post here after our PMs for other people who find this. There is a lot of custom code and renderers involved but my source is openly available here: https://gitlab.com/Lycanite/LycanitesMobs
  6. I haven't found a solution yet, it's still in my todo list!
  7. I have a custom mob spawner that locates structures to spawn mobs around, if a world has no structures spawning or nearby (can happen in the Nether when there are no Nether Fortresses nearby), calling world.findNearestStructure just hangs infinitely. To further test this, I created a new world with structures disabled and used the /locate command for a village, this also caused the game to hang.
  8. So I've attempted to add new Stat Types in 1.14.3, this is through total guess work though as I can't seem to find anything about them or if they're even doable yet. I've created a new StatType like so: Registry<ResourceLocation> statRegistry = new SimpleRegistry<>(); StatType<ResourceLocation> statType = new StatType<>(statRegistry); statType.setRegistryName(modid, "stat_type_name"); And then registered it like so: @SubscribeEvent public void registerStats(RegistryEvent.Register<StatType<?>> event) { event.getRegistry().register(statType); } Finally I add the stat to the player like this: player.addStat(statType.get(new ResourceLocation(modid, "stat_name"), IStatFormatter.DEFAULT), 1); This seems to register fine (confirmed that the registry event is fired, etc) but i get this exception on trying to add the stat to the player: java.lang.NullPointerException: Unexpected error at net.minecraft.stats.Stat.locationToKey(SourceFile:29) ~[forge-1.14.3-27.0.22_mapped_snapshot_20190625-1.14.3.jar:?] {} at net.minecraft.stats.Stat.buildName(SourceFile:23) ~[forge-1.14.3-27.0.22_mapped_snapshot_20190625-1.14.3.jar:?] {} at net.minecraft.stats.Stat.<init>(SourceFile:16) ~[forge-1.14.3-27.0.22_mapped_snapshot_20190625-1.14.3.jar:?] {} at net.minecraft.stats.StatType.lambda$get$0(StatType.java:25) ~[forge-1.14.3-27.0.22_mapped_snapshot_20190625-1.14.3.jar:?] {} at java.util.Map.computeIfAbsent(Map.java:957) ~[?:1.8.0_162] {} at net.minecraft.stats.StatType.get(StatType.java:24) ~[forge-1.14.3-27.0.22_mapped_snapshot_20190625-1.14.3.jar:?] {} I have no idea if this is even remotely correct but it was what I figured out from look at the vanilla classes and comparing things to other registries. Looking at StatType it looks like it uses an empty SimpleRegistry in it's constructor and adds any stats dynamically to it via get() but this is just my guess.
  9. I'm having exactly the same problem now. My Mobs are showing up great but my projectiles do not show up on the client at all, anything spawned via SSpawnMobPacket is great but SSpawnObjectPacket is not showing. I use an EntityFactory object rather than the entity constructors and that also isn't being called by SSpawnObjectPacket on the client.
  10. Ahah! That was it! My stupidity using the wrong event bus! I'll look into reorganizing how registries are handled, thanks a bunch for the help!
  11. Ah I see, I've moved my event registration into the main mod class' constructor, but the same issue is happening. Before moving them I was still getting log output from my event listeners though. I've also tested with using @Mod.EventBusSubscriber directly on the class that registers entities with the same issue also.
  12. I've updated the post and Gitlab with the Runtime exceptions added and constructors stored to help performance. I've also tested without using the custom Entity Factory with the same results.
  13. Ohh I see what you mean sorry, I've added a RuntimeException to make it crash if that does happen.
  14. It's currently done via reflection because each entity is defined via a JSON file which provides the class as a string, this is just temporary though, as I later plan on changing this so that I just have one generic entity class instead that is based on the json, but it's going to take a while for me to create AI goals, control behavior, etc all from JSON definitions but it's my end goal there. I've fixed the factory, when first updating from 1.12.2 I thought the factory had to spawn and forgot to remove that, so that is corrected now. For the exception, this is just temporary and will go away once I finish the generic entity class in the future, for now I'm just trying to get entities showing up in the world, I can return a fallback entity instead of null, but getConstructor requires a try catch, what I'll do instead is pre load the constructor instance when the json is being parsed at startup, that should solve performance and eliminates the try catch. Either way, all entity classes involved always have that constructor available so that exception will never show up and shouldn't relate to the problem, but thanks for the feedback.
  15. I understand Forge for 1.14 is still beta but I've searched around a lot and can't find how far along it is for modded entities so figured I'd ask about this problem I'm having here, if anyone has modded entities going in 1.14.2 perhaps you can show me where I'm going wrong, etc. If it is just a Forge beta thing then that's all good, I know I can just chill for a bit until things are ready. So I register my Entity Types like this: Gitlab Link @SubscribeEvent public void registerEntities(RegistryEvent.Register<EntityType<?>> event) { LycanitesMobs.logDebug("Creature", "Forge registering all " + this.creatures.size() + " creatures..."); for(CreatureInfo creatureInfo : this.creatures.values()) { event.getRegistry().register(creatureInfo.getEntityType()); } } I build them like this: Gitlab Link public EntityType getEntityType() { if(this.entityType == null) { EntityType.Builder entityTypeBuilder = EntityType.Builder.create(EntityFactory.getInstance(), this.peaceful ? EntityClassification.CREATURE : EntityClassification.MONSTER); //entityTypeBuilder.setCustomClientFactory(EntityFactory.getInstance().createOnClientFunction); Client Factory never called. entityTypeBuilder.setTrackingRange(this.isBoss() ? 32 : 10); entityTypeBuilder.setUpdateInterval(3); entityTypeBuilder.setShouldReceiveVelocityUpdates(false); entityTypeBuilder.size((float)this.width, (float)this.height); entityTypeBuilder.disableSerialization(); this.entityType = entityTypeBuilder.build(this.getName()); this.entityType.setRegistryName(this.modInfo.modid, this.getName()); EntityFactory.getInstance().addEntityType(this.entityType, this.entityClass); } return this.entityType; } My factory's create function is this: Gitlab Link @Override public Entity create(EntityType entityType, World world) { LycanitesMobs.logDebug("", "Spawning entity: " + this.entityTypeConstrcutorMap.get(entityType).toString() + " Type: " + entityType.getName() + " Classification: " + entityType.getClassification()); // Name always shows pig! Class<? extends Entity> entityConstrcutor = this.entityTypeConstrcutorMap.get(entityType); try { Entity entity = entityConstrcutor.newInstance(entityType, world); world.addEntity(entity); return entity; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } return null; } The problem I'm having is that on the client they always spawn as EntityPigs and immediately trigger a crash because the entity Data Manager is casting a Byte to a Bool, I'm assuming this is because on the server side the correct entity has spawned with a different set of Data manager keys: java.lang.ClassCastException: java.lang.Byte cannot be cast to java.lang.Boolean at net.minecraft.entity.AgeableEntity.getGrowingAge(AgeableEntity.java:71) ~[forge-1.14.2-26.0.33_mapped_snapshot_20190618-1.14.2-recomp.jar:?] {} at net.minecraft.entity.passive.AnimalEntity.livingTick(AnimalEntity.java:49) ~[forge-1.14.2-26.0.33_mapped_snapshot_20190618-1.14.2-recomp.jar:?] {} at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2178) ~[forge-1.14.2-26.0.33_mapped_snapshot_20190618-1.14.2-recomp.jar:?] {} at net.minecraft.entity.MobEntity.tick(MobEntity.java:308) ~[forge-1.14.2-26.0.33_mapped_snapshot_20190618-1.14.2-recomp.jar:?] {pl:accesstransformer:B} at net.minecraft.client.world.ClientWorld.func_217418_a(ClientWorld.java:167) ~[forge-1.14.2-26.0.33_mapped_snapshot_20190618-1.14.2-recomp.jar:?] {pl:accesstransformer:B,pl:runtimedistcleaner:A} Looking further into this, on both the client and server, when logging what's being registered, if I call getName or TranslationKey on the EntityType I always get back entity.minecraft.pig. Here's an example that is logged from here (which is called from getEntityType() posed above): [13:14:06.710] [modloading-worker-9/DEBUG] [co.ly.LycanitesMobs/]: [LycanitesMobs] [Debug] [] Adding entity: class com.lycanitesmobs.core.entity.creature.EntityArisaur Type: TranslatableComponent{key='entity.minecraft.pig', args=[], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}} Classification: MONSTER Here the entity class being registered is correct and each EntityType for each entity I'm registering is definitely unique, but they call still translate as a pig. I can also confirm that my Entity Factory is working correctly server side but it is never called client side, I've also tried using the Custom Client Factory, but it is never called by the client as it seems the client is always treating the EntityType as the default vanilla PIG EntityType instance. Also here is an example of one of my DataManager entries: protected static final DataParameter<Byte> TARGET = EntityDataManager.createKey(EntityCreatureBase.class, DataSerializers.BYTE); I've made sure that I always provide the correct entity class when creating a key and I'm also assuming that this is the byte sent from the server that the client is trying to cast into a boolean as it is the first DataParameter I register for all entities in my mod. The entire mod is available on Gitlab if anyone wants to look further into things.
  16. I don't recommend using any instanceof checks as it can cause problems with various mods including my own. I have several mobs that are hostile but can be tamed/summoned by players no longer being hostile but still use the same class, therefore instanceof wont work. I've been using the vanilla method: isCreatureType(EnumCreatureType type, boolean forSpawnCount) to check for hostile mobs, where you can use it like this: isCreatureType(EnumCreatureType.monster, false), it works great for vanilla mobs and can be overridden by modders like myself to add logic to hostility checks, in my case I can check if a mob is owned by a player (not hostile) or wild (hostile). It also has the forSpawnCount boolean which is handy for other spawner mods, etc too!
  17. After running my server for nearly 2 days without a single crash, I can pretty much confirm that it was mark2 causing the crashes.
  18. All mods are definitely for 1.9, but I think I've found the issue. Could the mark2 server wrapper https://github.com/gsand/mark2 cause this? I've been running without it and so far so good!
  19. All mods are definitely for 1.9, but I think I've found the issue. Could the mark2 server wrapper https://github.com/gsand/mark2 cause this? I've been running without it and so far so good!
  20. More crashes with java.lang.error, one doesn't even mention my mod: java.lang.Error at net.minecraft.util.LongHashMap.func_76160_c(SourceFile:60) at net.minecraft.util.LongHashMap.func_76161_b(SourceFile:54) at net.minecraft.world.gen.ChunkProviderServer.func_73149_a(ChunkProviderServer.java:334) at net.minecraft.world.WorldServer.func_175680_a(WorldServer.java:343) at net.minecraft.world.World.func_175663_a(World.java:270) at net.minecraft.world.World.func_72866_a(World.java:1912) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) This one does with my extended entity (uses Capabilities but I kept the name of the class from 1.7.10): java.lang.Error at net.minecraft.world.chunk.Chunk.func_177435_g(Chunk.java:461) at net.minecraft.world.World.func_180495_p(World.java:828) at net.minecraft.entity.Entity.func_70094_T(Entity.java:1769) at lycanite.lycanitesmobs.ExtendedEntity.onUpdate(ExtendedEntity.java:117) at lycanite.lycanitesmobs.EventListener.onEntityUpdate(EventListener.java:192) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_29_EventListener_onEntityUpdate_LivingUpdateEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:469) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1879) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at net.minecraft.entity.monster.EntityMob.func_70071_h_(SourceFile:46) at net.minecraft.entity.monster.EntityCreeper.func_70071_h_(SourceFile:151) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745)
  21. More crashes with java.lang.error, one doesn't even mention my mod: java.lang.Error at net.minecraft.util.LongHashMap.func_76160_c(SourceFile:60) at net.minecraft.util.LongHashMap.func_76161_b(SourceFile:54) at net.minecraft.world.gen.ChunkProviderServer.func_73149_a(ChunkProviderServer.java:334) at net.minecraft.world.WorldServer.func_175680_a(WorldServer.java:343) at net.minecraft.world.World.func_175663_a(World.java:270) at net.minecraft.world.World.func_72866_a(World.java:1912) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) This one does with my extended entity (uses Capabilities but I kept the name of the class from 1.7.10): java.lang.Error at net.minecraft.world.chunk.Chunk.func_177435_g(Chunk.java:461) at net.minecraft.world.World.func_180495_p(World.java:828) at net.minecraft.entity.Entity.func_70094_T(Entity.java:1769) at lycanite.lycanitesmobs.ExtendedEntity.onUpdate(ExtendedEntity.java:117) at lycanite.lycanitesmobs.EventListener.onEntityUpdate(EventListener.java:192) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_29_EventListener_onEntityUpdate_LivingUpdateEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:49) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:140) at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:469) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1879) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at net.minecraft.entity.monster.EntityMob.func_70071_h_(SourceFile:46) at net.minecraft.entity.monster.EntityCreeper.func_70071_h_(SourceFile:151) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745)
  22. Ah thanks for that, I didn't notice! I'll fix that now and see if it changes anything at all, but like you said it doesn't look like the exact cause, but at this point I'll try anything. So far I'm only able to get this on my live server and it can sometimes take a while to happen, in Idea running a server I can't replicate it as of yet, also my local test server which is a clone of my live server hasn't been able to reproduce it, but I think I may need to test for longer. I've also tried eliminating a lot of mods to no avail. I'm going to look through my history on GitHub as there was a point when my server had been running for a couple of days with no issue at all, but it was still quite new then with little players. Also I've ensured that I have the same java versions (1.8_60, also tested on the latest 1.8_91) with the same launch args.
  23. Ah thanks for that, I didn't notice! I'll fix that now and see if it changes anything at all, but like you said it doesn't look like the exact cause, but at this point I'll try anything. So far I'm only able to get this on my live server and it can sometimes take a while to happen, in Idea running a server I can't replicate it as of yet, also my local test server which is a clone of my live server hasn't been able to reproduce it, but I think I may need to test for longer. I've also tried eliminating a lot of mods to no avail. I'm going to look through my history on GitHub as there was a point when my server had been running for a couple of days with no issue at all, but it was still quite new then with little players. Also I've ensured that I have the same java versions (1.8_60, also tested on the latest 1.8_91) with the same launch args.
  24. I'm having these crashes which I can't get to the bottom to at all, I've updated to 1.9.4 but my server is still waiting at 1.9 for a few other mods to update so I'm not sure if there is an issue with 1.9 or forge or if it my mod causing the problem somehow as the stack trace doesn't really tell me anything from what I can see. I've tried this using 1865, 1887 and 1907. I've just noticed 1923 so I'll give that a try to see if this stops, in the mean time I'll keep this post in case it's a problem on my end. func_70636_d seems to be onLivingUpdate java.lang.Error at net.minecraft.entity.EntityLiving.func_70626_be(EntityLiving.java:763) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2131) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:564) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70636_d(EntityCreatureBase.java:1295) at lycanite.lycanitesmobs.api.entity.EntityCreatureAgeable.func_70636_d(EntityCreatureAgeable.java:106) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1961) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70071_h_(EntityCreatureBase.java:1242) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) This one looks related to my nearest target sorter but I can't repeat this crash consistently: java.lang.Error at java.util.Collections$SetFromMap.contains(Collections.java:5459) at net.minecraft.util.ClassInheritanceMultiMap.func_181157_b(SourceFile:45) at net.minecraft.util.ClassInheritanceMultiMap$1.iterator(SourceFile:101) at net.minecraft.world.chunk.Chunk.func_177430_a(Chunk.java:915) at net.minecraft.world.World.func_175647_a(World.java:3039) at lycanite.lycanitesmobs.api.entity.ai.EntityAITarget.getPossibleTargets(EntityAITarget.java:142) at lycanite.lycanitesmobs.api.entity.ai.EntityAITarget.getNewTarget(EntityAITarget.java:124) at lycanite.lycanitesmobs.api.entity.ai.EntityAITargetAttack.func_75250_a(EntityAITargetAttack.java:194) at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:94) at net.minecraft.entity.EntityLiving.func_70626_be(EntityLiving.java:757) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2131) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:564) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70636_d(EntityCreatureBase.java:1295) at lycanite.lycanitesmobs.api.entity.EntityCreatureAgeable.func_70636_d(EntityCreatureAgeable.java:106) at lycanite.lycanitesmobs.api.entity.EntityCreatureTameable.func_70636_d(EntityCreatureTameable.java:177) at lycanite.lycanitesmobs.shadowmobs.entity.EntityGrue.func_70636_d(EntityGrue.java:114) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1961) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70071_h_(EntityCreatureBase.java:1242) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) I've had several crashes like this, MoveSwimmingWithHeading is a custom method of mine but this crash has also occured with MoveEntityWithHeading which doesn't do much in my override before calling it on EntityLivingBase. java.lang.Error at net.minecraft.world.World.func_175674_a(World.java:2982) at net.minecraft.world.World.func_72839_b(World.java:2965) at net.minecraft.world.World.func_184144_a(World.java:1250) at net.minecraft.entity.Entity.func_70091_d(Entity.java:633) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.moveSwimmingWithHeading(EntityCreatureBase.java:1665) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70612_e(EntityCreatureBase.java:1610) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2165) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:564) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70636_d(EntityCreatureBase.java:1295) at lycanite.lycanitesmobs.api.entity.EntityCreatureAgeable.func_70636_d(EntityCreatureAgeable.java:106) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1961) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70071_h_(EntityCreatureBase.java:1242) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) I've also had a similar crash related to getting a pathing node both with one of my entities and with EntityBat. Here are some relevant samples of my code: EntityCreatureBase: @Override public void onLivingUpdate() { super.onLivingUpdate(); <-- Crashes Here EntityAITarget: public EntityAITarget(EntityCreatureBase setHost) { this.host = setHost; this.targetSelector = new Predicate<Entity>() { @Override public boolean apply(Entity input) { if(!(input instanceof EntityLivingBase)) return false; return EntityAITarget.this.isSuitableTarget((EntityLivingBase)input, false); } }; this.allySelector = new Predicate<Entity>() { @Override public boolean apply(Entity input) { if(!(input instanceof EntityLivingBase)) return false; return EntityAITarget.this.isAllyTarget((EntityLivingBase) input, false); } }; this.nearestSorter = new TargetSorterNearest(setHost); } public EntityLivingBase getNewTarget(double rangeX, double rangeY, double rangeZ) { EntityLivingBase newTarget = null; try { List possibleTargets = this.getPossibleTargets(rangeX, rangeY, rangeZ); if (possibleTargets.isEmpty()) return null; Collections.sort(possibleTargets, this.nearestSorter); newTarget = (EntityLivingBase) possibleTargets.get(0); } catch (Exception e) { LycanitesMobs.printWarning("", "An exception occurred when target selecting, this has been skipped to prevent a crash."); e.printStackTrace(); } return newTarget; } public List getPossibleTargets(double rangeX, double rangeY, double rangeZ) { return this.host.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.host.getEntityBoundingBox().expand(rangeX, rangeY, rangeZ), Predicates.and(new Predicate[]{EntitySelectors.CAN_AI_TARGET, this.targetSelector})); <-- Crashes from here } My old eventually to be replaced but still useful TargetSorterNearest: public class TargetSorterNearest implements Comparator { private final Entity host; // ================================================== // Constructor // ================================================== public TargetSorterNearest(Entity setHost) { this.host = setHost; } public int compare(Object objectA, Object objectB) { if(objectA instanceof Entity && objectB instanceof Entity) return this.compareDistanceSq((Entity)objectA, (Entity)objectB); if(objectA instanceof BlockPos && objectB instanceof BlockPos) return this.compareDistanceSq((BlockPos)objectA, (BlockPos)objectB); return 0; } public int compareDistanceSq(Entity targetA, Entity targetB) { double distanceA = this.host.getDistanceSqToEntity(targetA); double distanceB = this.host.getDistanceSqToEntity(targetB); return distanceA < distanceB ? -1 : (distanceA > distanceB ? 1 : 0); } public int compareDistanceSq(BlockPos targetA, BlockPos targetB) { BlockPos hostCoords = new BlockPos((int)this.host.posX, (int)this.host.posY, (int)this.host.posZ); double distanceA = hostCoords.getDistance(targetA.getX(), targetA.getY(), targetA.getZ()); double distanceB = hostCoords.getDistance(targetB.getX(), targetB.getY(), targetB.getZ()); return distanceA < distanceB ? -1 : (distanceA > distanceB ? 1 : 0); } } I think that's all the info I can provide, I'll add similar crashes when they happen, I'm totally stumped though and it only seems to be on my live server which was copied other from my test server on my PC which has no issues, the java builds are the same but the OS changes from Windows (test) to Ubuntu (live).
  25. I'm having these crashes which I can't get to the bottom to at all, I've updated to 1.9.4 but my server is still waiting at 1.9 for a few other mods to update so I'm not sure if there is an issue with 1.9 or forge or if it my mod causing the problem somehow as the stack trace doesn't really tell me anything from what I can see. I've tried this using 1865, 1887 and 1907. I've just noticed 1923 so I'll give that a try to see if this stops, in the mean time I'll keep this post in case it's a problem on my end. func_70636_d seems to be onLivingUpdate java.lang.Error at net.minecraft.entity.EntityLiving.func_70626_be(EntityLiving.java:763) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2131) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:564) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70636_d(EntityCreatureBase.java:1295) at lycanite.lycanitesmobs.api.entity.EntityCreatureAgeable.func_70636_d(EntityCreatureAgeable.java:106) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1961) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70071_h_(EntityCreatureBase.java:1242) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) This one looks related to my nearest target sorter but I can't repeat this crash consistently: java.lang.Error at java.util.Collections$SetFromMap.contains(Collections.java:5459) at net.minecraft.util.ClassInheritanceMultiMap.func_181157_b(SourceFile:45) at net.minecraft.util.ClassInheritanceMultiMap$1.iterator(SourceFile:101) at net.minecraft.world.chunk.Chunk.func_177430_a(Chunk.java:915) at net.minecraft.world.World.func_175647_a(World.java:3039) at lycanite.lycanitesmobs.api.entity.ai.EntityAITarget.getPossibleTargets(EntityAITarget.java:142) at lycanite.lycanitesmobs.api.entity.ai.EntityAITarget.getNewTarget(EntityAITarget.java:124) at lycanite.lycanitesmobs.api.entity.ai.EntityAITargetAttack.func_75250_a(EntityAITargetAttack.java:194) at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:94) at net.minecraft.entity.EntityLiving.func_70626_be(EntityLiving.java:757) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2131) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:564) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70636_d(EntityCreatureBase.java:1295) at lycanite.lycanitesmobs.api.entity.EntityCreatureAgeable.func_70636_d(EntityCreatureAgeable.java:106) at lycanite.lycanitesmobs.api.entity.EntityCreatureTameable.func_70636_d(EntityCreatureTameable.java:177) at lycanite.lycanitesmobs.shadowmobs.entity.EntityGrue.func_70636_d(EntityGrue.java:114) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1961) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70071_h_(EntityCreatureBase.java:1242) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) I've had several crashes like this, MoveSwimmingWithHeading is a custom method of mine but this crash has also occured with MoveEntityWithHeading which doesn't do much in my override before calling it on EntityLivingBase. java.lang.Error at net.minecraft.world.World.func_175674_a(World.java:2982) at net.minecraft.world.World.func_72839_b(World.java:2965) at net.minecraft.world.World.func_184144_a(World.java:1250) at net.minecraft.entity.Entity.func_70091_d(Entity.java:633) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.moveSwimmingWithHeading(EntityCreatureBase.java:1665) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70612_e(EntityCreatureBase.java:1610) at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2165) at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:564) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70636_d(EntityCreatureBase.java:1295) at lycanite.lycanitesmobs.api.entity.EntityCreatureAgeable.func_70636_d(EntityCreatureAgeable.java:106) at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1961) at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:296) at lycanite.lycanitesmobs.api.entity.EntityCreatureBase.func_70071_h_(EntityCreatureBase.java:1242) at net.minecraft.world.World.func_72866_a(World.java:1934) at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:836) at net.minecraft.world.World.func_72870_g(World.java:1903) at net.minecraft.world.World.func_72939_s(World.java:1737) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:619) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:705) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:386) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:609) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at java.lang.Thread.run(Thread.java:745) I've also had a similar crash related to getting a pathing node both with one of my entities and with EntityBat. Here are some relevant samples of my code: EntityCreatureBase: @Override public void onLivingUpdate() { super.onLivingUpdate(); <-- Crashes Here EntityAITarget: public EntityAITarget(EntityCreatureBase setHost) { this.host = setHost; this.targetSelector = new Predicate<Entity>() { @Override public boolean apply(Entity input) { if(!(input instanceof EntityLivingBase)) return false; return EntityAITarget.this.isSuitableTarget((EntityLivingBase)input, false); } }; this.allySelector = new Predicate<Entity>() { @Override public boolean apply(Entity input) { if(!(input instanceof EntityLivingBase)) return false; return EntityAITarget.this.isAllyTarget((EntityLivingBase) input, false); } }; this.nearestSorter = new TargetSorterNearest(setHost); } public EntityLivingBase getNewTarget(double rangeX, double rangeY, double rangeZ) { EntityLivingBase newTarget = null; try { List possibleTargets = this.getPossibleTargets(rangeX, rangeY, rangeZ); if (possibleTargets.isEmpty()) return null; Collections.sort(possibleTargets, this.nearestSorter); newTarget = (EntityLivingBase) possibleTargets.get(0); } catch (Exception e) { LycanitesMobs.printWarning("", "An exception occurred when target selecting, this has been skipped to prevent a crash."); e.printStackTrace(); } return newTarget; } public List getPossibleTargets(double rangeX, double rangeY, double rangeZ) { return this.host.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, this.host.getEntityBoundingBox().expand(rangeX, rangeY, rangeZ), Predicates.and(new Predicate[]{EntitySelectors.CAN_AI_TARGET, this.targetSelector})); <-- Crashes from here } My old eventually to be replaced but still useful TargetSorterNearest: public class TargetSorterNearest implements Comparator { private final Entity host; // ================================================== // Constructor // ================================================== public TargetSorterNearest(Entity setHost) { this.host = setHost; } public int compare(Object objectA, Object objectB) { if(objectA instanceof Entity && objectB instanceof Entity) return this.compareDistanceSq((Entity)objectA, (Entity)objectB); if(objectA instanceof BlockPos && objectB instanceof BlockPos) return this.compareDistanceSq((BlockPos)objectA, (BlockPos)objectB); return 0; } public int compareDistanceSq(Entity targetA, Entity targetB) { double distanceA = this.host.getDistanceSqToEntity(targetA); double distanceB = this.host.getDistanceSqToEntity(targetB); return distanceA < distanceB ? -1 : (distanceA > distanceB ? 1 : 0); } public int compareDistanceSq(BlockPos targetA, BlockPos targetB) { BlockPos hostCoords = new BlockPos((int)this.host.posX, (int)this.host.posY, (int)this.host.posZ); double distanceA = hostCoords.getDistance(targetA.getX(), targetA.getY(), targetA.getZ()); double distanceB = hostCoords.getDistance(targetB.getX(), targetB.getY(), targetB.getZ()); return distanceA < distanceB ? -1 : (distanceA > distanceB ? 1 : 0); } } I think that's all the info I can provide, I'll add similar crashes when they happen, I'm totally stumped though and it only seems to be on my live server which was copied other from my test server on my PC which has no issues, the java builds are the same but the OS changes from Windows (test) to Ubuntu (live).
×
×
  • Create New...

Important Information

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