That is quite interesting. I might try it after all the other major mods have already been updated because it is most likely bugs will start showing up with incompatibilities and all.
I love this mod its amazing, It would be awsome if you can make it so you can have some of the creatures follow you as a compainion, Maybe the Ender Girl or Crepper Girl
At this point I will experiment around with it except it will most likely be limited to the 3 mobs which do not spawn using a scroll (Creeper, Ender and Slime Girl). They will probably be based on wolf ai and act exactly like a wolf, buggy and all.
YES!!!!!!!!!!!!! ITS AWESOMENESS IS IN 1.5.1!!!!!!!!!!!! I love this mod and my minecraft just doesnt feel complete without it. Thank you for continuing this grand mod of amazing mob-filled goodness Oh and you should make a main menu for the mod using that ^ posted above thing. Maybe make a poll to see how many people think you should.
WOO! Finally it's out! sadly... i had to get a new hard drive cause my old one broke... and i lost all my data and stuff... and they also gave me a default-issue hard drive. so now i can't play Minecraft cause my computer is saving and loading things too slow. hopefully i can play MInecraft again by this weekend!
I hope you can.
I changed the item IDs and mob IDs around so I honestly would not recommend using it on an old save anyway.
I think I figured it out. Instead of using the MobSpawnControls mod, I used Mo Creatures CustomSpawner. I assigned all mobs to the appropriate biome, including extrabiomesxl. So far I have not gotten any crash reports since doing this and this has been the longest stretch so far today without a crash.
I never knew that you can add new mobs to Mo Creatures CustomSpawner. I guess if you do not use Mo Creatures you can use Mob Spawn Controls instead.
Either way I managed to fix it and it will be uploaded in a few days along with a few other adjustments.
I thought it was extrabiomesxl as well, but I tested it out a world without that mod, and I still got the same error/crash.
I also was not using Mob Spawn Controls when i did that test.
So maybe a temporarily fix for me for now would to be disable the daytime mobs?
I have no idea what may be causing it if not ExtraBiomesXL. The main reason why it is crashing is because the condition has a block condition. Meaning if the biome uses a custom block, it crashes.
Maybe. All daytime mobs have a default spawn rate of 2 in the config which easily distinguishes them from the rest.
Pretty sure my computer can handle both. I need to use server since I play with friends. I tested out taking Mo Creatures off and I still get the same crash report. This line sticks out to me the most when looking at the crash report. What exactly does that mean?
Caused by: java.lang.ArrayIndexOutOfBoundsException: 900
at mods.gaia.EntityDayMob.func_70601_bi(EntityDayMob.java:48)
Spawn condition. Basically it is the requirement which a chunk must meet before a mob can spawn in it. Mobs which spawn during the day use this (Dryad, Siren, Naga, etc.).
I thought Mob Spawn Controls was incompatible but when I tested it myself it worked fine. It seems ExtrabiomesXL is causing the problem. It is even affecting mobs which spawn during the night. If you set any of the mobs in this mod to one of the new biomes it will crash. I may have an idea what may be causing this and I will fix it in my next update.
I don't know if this is something on my end or not, but I keep getting this crash report. http://pastebin.com/ydKEABGw
I have Mo Creatures installed as well.
Have you tried playing/testing it offline? Mo Creatures requires a ton of system resource as a server and adding this mod certainly does not help with it.
Well, I just tested things with my mob; adding "this.worldObj.getBlockLightValue(i, j, k) > 7" to the spawning conditions, I tried my best to see if they only spawned in the daytime in a superflat world.
I may have screwed things up slightly by (a) trying in a superflat (where there are too many spawns in general), and ( testing too close to my original spawn point (as monsters should not be able to spawn within 24 blocks of the player's spawn).
However, I was able to note that I did not see any new spawns of the mob during the night, and that then flying around after sleeping I was able to see new mobs. It is entirely possible however, that the "new" spawns where out of render distance previously, so I think I'll run a couple more tests as I do other things. I would suggest not using getFullBlockLightValue if it seems to be bugged (and because I plain don't trust it for whatever reasons), and would like to hear what getBlockLightValue > 7 does for your mobs.
It works! Changing it to getBlockLightValue prevents the day mobs from spawning at night. I tested it with both superflat and vanilla by resetting it to Peaceful and changing the time. I will definitely include this fix in my next update.
Again, thank you for helping me get this far. If it was not for your assistance I would probably forced to make night mobs and limit the amount of mobs I can make for future updates.
Adding the "this.worldObj.getFullBlockLightValue(i, j, k) > 8" code to what works makes no difference? Did you try your original spawning conditions and just changing the mob type to monster?
From the code in the second post here, the only real differences from my spawning code I can see are a path weight check, and a light level check. I don't know what the weight check is for, so I removed it from my conditions, but other than that I don't see why that would not work for a monster.
A really dirty way of making it seem like a mob doesn't spawn at night could be to have it's spawn rate low enough that when night comes, everything else spawns and takes up all the spawning slots. But that's probably a last resort and definitely not ideal.
"this.worldObj.getFullBlockLightValue(i, j, k) > x" works, but somehow acts rather bugged. When setting the light value of x to 15 and below, mobs will spawn despite the light value of the block. Meaning even if set to > 8 or 14 mobs will still spawn at light values below 8 or 14. But when x is set above 15, they no longer spawn at all at any light level. Basically, the condition is not detecting any value between 0 and 15.
EDIT: Oddly enough, "this.worldObj.getFullBlockLightValue(i, j, k) < 15" makes mobs not spawn at all as well.
Not ideal, but the solution you last posted is what I went with. Hopefully a temporary solution for now.
I find it ironic that before I had problems with how the mobs hardly spawn and now I have problems that they spawn too much .
The easiest way to decide where to start is by following one of two options: One: Whatever people complain about the most frequently. Two: Whatever (sounds like it) is the easiest to fix.
A slightly harder choice would be to fix whatever you think people will come into contact with the most, complaining or not.
I will probably wait a week and gather all the reported bugs (if any). It is most likely more bugs shall appear when the big mods have finally been released.
Awesome mod..would love if you could make the config have the ability to change what biomes the mobs spawn. I am also using extrabiomesxl mod and none of your mobs will spawn in the biomes with that mod.
With making an ItemID and Spawn rate config file out of the way I will consider trying to make it ExtraBiomesXL compatible. Problem is when I did so before it ended up pretty messy, code wise.
A temporary solution to this is by using the mod "Mob Spawn Controls".
Oops! I appear to have gotten a crash. Considering you're a learning coder, I just installed your mod, and the crash has something to do with Ender something (which is relevant to mobs you just added) I'm figuring it was your mod that caused it.
---- Minecraft Crash Report ----
// Why did you do that?
Time: 4/3/13 6:40 PM
Description: Exception ticking world
java.lang.NoClassDefFoundError: net/minecraftforge/event/entity/living/EnderTeleportEvent
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getConstructor(Unknown Source)
at net.minecraft.world.SpawnerAnimals.func_77192_a(SpawnerAnimals.java:171)
at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:179)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:640)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:570)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:171)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:468)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
Caused by: java.lang.ClassNotFoundException: net.minecraftforge.event.entity.living.EnderTeleportEvent
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:113)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more
I suppose, alternatively, it could have been Millénaire; especially with the "DeclaredConstructors" part.
Noted. I checked the code I used for EnderTeleportEvent and it is exactly the same as the one the Enderman uses. Only two mobs in this mod uses this, the Ender Eye and Ender Dragon Girl (which only spawns in The End). Then again I modified the Ender Eye a bit so that it cannot pick up blocks. I will check it myself later.
That doesn't matter. Just because some other mod authors may make updating their mods a more primary objective doesn't mean you have to. Update your mods at your pace, and no other. If people want to complain that you don't drop everything and update your mods when a new version of Minecraft is released, they can shove right off and make an unofficial update themselves, the jagoffs.
Thanks. Though this time around if any bugs are detected I will try to fix them as soon as possible. I feel rather guilty for not fixing them before because I did not have time to. That and I had no idea where to even start.
Released Grimoire of Gaia 2 (1.2.0) for Minecraft 1.5.1. Apologies for not updating this mod at a regular basis.
Changes:
General:
- Added a Config file to adjust ItemID and adjust Spawn Rate
- Fixed mob spawning mobs bug
- Fixed day mob spawning bug
- Removed a ton of unnecessary code
Despite this bit of info, there is a ton of changes that have been made with the mobs themselves. Please check the Changelog in the front page for the complete list of changes.
As always, please report any bugs and post any suggestions. I really appreciate it as I myself cannot find or notice every bug.
That's very close to what I have for my own mob spawning; I am surprised it does not work. This is what I have, word for word, in one of my monster entities.
public boolean getCanSpawnHere()
{
int i = MathHelper.floor_double(posX);
int j = MathHelper.floor_double(boundingBox.minY);
int k = MathHelper.floor_double(posZ);
boolean[] spawnBlocks = new boolean[256];
spawnBlocks[Block.grass.blockID] = true;
spawnBlocks[Block.dirt.blockID] = true;
spawnBlocks[Block.stone.blockID] = true;
spawnBlocks[Block.mycelium.blockID] = true;
//spawnBlocks[Block.wood.blockID] = true;
spawnBlocks[Block.sand.blockID] = true;
spawnBlocks[Block.gravel.blockID] = true;
spawnBlocks[Block.whiteStone.blockID] = true;
spawnBlocks[Block.netherrack.blockID] = true;
spawnBlocks[43] = true; //the smooth double slabs (so I can get them in Inferno Mines)
int var1 = this.worldObj.getBlockId(i, j-1, k);
return (spawnBlocks[var1] && this.worldObj.checkIfAABBIsClear(this.boundingBox) &&
this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() &&
!this.worldObj.isAnyLiquid(this.boundingBox));
}
With this I control exactly what my monster spawns on top of, and it will spawn regardless of the light level.
The other things I can think of, regardless of how likely, are of the sort: are the entities registered correctly? Are the entities monsters or creatures? Are they registered to the correct biomes?
Now, I've tried Grimoire of Gaia 2 once and would have to say that yes, the entities are probably registered to their correct biomes (I only wonder because I had a hard time with it), but I have very little experience with creature vs monster mobs. If they're registered as creatures, for all I know it is possible that vanilla mobs are lowering your mob's chances of spawning drastically enough that it appears they never spawn. If you use creature-types so your mobs won't attack the player, it should be easy enough to remove those AI tasks or other code that targets the player from monster-typed mobs and use the same spawning system.
By changing the mobs EnumCreatureType.creature to EnumCreatureType.monster and by using the code you have provided has solved my problem! The mobs now spawn at a similar rate as monster/hostile mobs at night. My line of thinking was that the EnumCreatureType determined the time of day which a mob would spawn in.
My only problem now is how to stop them spawning at night (getFullBlockLightValue does not work).
Thank you. It may not be much, but without a doubt I feel the need to give credit to you for helping me solve this issue. You have no idea how much of a pain this was for me to deal with after 1.2.5.
Super calls the next 'highest' function in the hierarchy, which means in this case you're telling it to run your conditions AND the conditions of EntityMob. If you remove the "&& super.getCanSpawnHere()", for the top code your mobs should be able to spawn any time the light is greater than 8, and for the lower code, any time the height is above 60. Honestly, I am a bit surprised they spawn at all in the day, as the super call should conflict with what you have there. Do they only spawn under trees in Jungles and Swamps?
You may want to implement a ground block check, because I think with the way you have things at the moment, the mobs will be able to spawn in midair without the super check.
Basically I should be using:
@Override
public boolean getCanSpawnHere()
{
int i = MathHelper.floor_double(this.posX);
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
return
this.worldObj.getFullBlockLightValue(i, j, k) > 8 &&
this.getBlockPathWeight(i, j, k) >= 0.0F &&
this.worldObj.checkIfAABBIsClear(this.boundingBox) &&
this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() &&
!this.worldObj.isAnyLiquid(this.boundingBox);
}
Based from EntityCreature and EntityLiving spawn requirements.
But it still does not work. This time mobs no longer spawn at all, not even in the starting area. Unless I am still missing something which I hope I am.
Mobs would spawn without trees present. But at a very low rate. Even lower than an Enderman. Probably a chance of 1 out of 50.
the config worked
it seems the RP was adding items at 5001, items that NEI didnt detect (IDs 4790-5200 where open yet exceptions where popping up at 5011 and 5001)
i basically started at 4999 and worked my way down
im quite happy i inquired about this
Glad it worked. I only recently discovered this while tinkering around with it. tuiko did a great job making a fix for the issue although I wish he also stated that it included an ItemID config.
I want my mobs to spawn at the same rate passive mobs (Cow, Chicken, Sheep, etc.) spawn during the day or the rate hostile mobs spawn at night. Problem is they hardly spawn at all and only spawn in the initial starting area. Increasing the spawn rate does not help. The spawn rate is set to 10, similar to passive mobs. They are also set to EnumCreatureType.creature.
To overwrite the EntityMob spawning conditions I created a seperate class for my day mobs named EntityDayMob. One of the spawn conditions is based on the one EntityAnimals use (minus the block condition).
public abstract class EntityDayMob extends EntityMob
{
public EntityDayMob(World par1World)
{
super(par1World);
this.experienceValue = 5;
}
@Override
public boolean getCanSpawnHere()
{
int i = MathHelper.floor_double(this.posX);
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
return this.worldObj.getFullBlockLightValue(i, j, k) > 8 && super.getCanSpawnHere();
}
}
or
public abstract class EntityDayMob extends EntityMob
{
public EntityDayMob(World par1World)
{
super(par1World);
this.experienceValue = 5;
}
@Override
protected boolean isValidLightLevel()
{
return true;
}
@Override
public boolean getCanSpawnHere()
{
return posY > 60D && this.isValidLightLevel() && super.getCanSpawnHere();
}
}
Both classes spawn my mobs but their spawn rate is increadibly low and dense compared to passive or hostile mobs which spawn everywhere. Some hardly spawn at all especially in the jungle and swamp biomes.
I hope it is a simple problem to do with the wrong use of @Override or declaration of super. This has been a extreme pain to deal with. I am beginning to think it is no longer possible.
0
That is quite interesting. I might try it after all the other major mods have already been updated because it is most likely bugs will start showing up with incompatibilities and all.
At this point I will experiment around with it except it will most likely be limited to the 3 mobs which do not spawn using a scroll (Creeper, Ender and Slime Girl). They will probably be based on wolf ai and act exactly like a wolf, buggy and all.
And thank you for continuing to use it.
I guess 10 is the default spawn value. If you check the config it should show the actual values it is supposed to be set to. None of them even pass 6.
0
Released Grimoire of Gaia 2 (1.2.1). A small update mostly with fixing a few bugs:
Changes:
I must thank FinAndTonic for further helping me with the spawn code. Having day mobs spawn at night along with night mobs was never meant to be.
Thanks!
I see no reason why they would be incompatible.
Main menu? Like a skin? Or a spawn controller such as the one in Mo Creatures?
0
I hope you can.
I changed the item IDs and mob IDs around so I honestly would not recommend using it on an old save anyway.
I never knew that you can add new mobs to Mo Creatures CustomSpawner. I guess if you do not use Mo Creatures you can use Mob Spawn Controls instead.
Either way I managed to fix it and it will be uploaded in a few days along with a few other adjustments.
0
I have no idea what may be causing it if not ExtraBiomesXL. The main reason why it is crashing is because the condition has a block condition. Meaning if the biome uses a custom block, it crashes.
Maybe. All daytime mobs have a default spawn rate of 2 in the config which easily distinguishes them from the rest.
0
Spawn condition. Basically it is the requirement which a chunk must meet before a mob can spawn in it. Mobs which spawn during the day use this (Dryad, Siren, Naga, etc.).
I thought Mob Spawn Controls was incompatible but when I tested it myself it worked fine. It seems ExtrabiomesXL is causing the problem. It is even affecting mobs which spawn during the night. If you set any of the mobs in this mod to one of the new biomes it will crash. I may have an idea what may be causing this and I will fix it in my next update.
0
Have you tried playing/testing it offline? Mo Creatures requires a ton of system resource as a server and adding this mod certainly does not help with it.
1
It works! Changing it to getBlockLightValue prevents the day mobs from spawning at night. I tested it with both superflat and vanilla by resetting it to Peaceful and changing the time. I will definitely include this fix in my next update.
Again, thank you for helping me get this far. If it was not for your assistance I would probably forced to make night mobs and limit the amount of mobs I can make for future updates.
1
"this.worldObj.getFullBlockLightValue(i, j, k) > x" works, but somehow acts rather bugged. When setting the light value of x to 15 and below, mobs will spawn despite the light value of the block. Meaning even if set to > 8 or 14 mobs will still spawn at light values below 8 or 14. But when x is set above 15, they no longer spawn at all at any light level. Basically, the condition is not detecting any value between 0 and 15.
EDIT: Oddly enough, "this.worldObj.getFullBlockLightValue(i, j, k) < 15" makes mobs not spawn at all as well.
Not ideal, but the solution you last posted is what I went with. Hopefully a temporary solution for now.
I find it ironic that before I had problems with how the mobs hardly spawn and now I have problems that they spawn too much .
0
I will probably wait a week and gather all the reported bugs (if any). It is most likely more bugs shall appear when the big mods have finally been released.
With making an ItemID and Spawn rate config file out of the way I will consider trying to make it ExtraBiomesXL compatible. Problem is when I did so before it ended up pretty messy, code wise.
A temporary solution to this is by using the mod "Mob Spawn Controls".
Based on the "Tanuki" by Kenkou Cross. I have updated the front page to make this clearer.
Thanks for pointing it out. Updated front page.
No problem. It was about time I gathered up bugs/suggestion posted here and finally act on them .
Noted. I checked the code I used for EnderTeleportEvent and it is exactly the same as the one the Enderman uses. Only two mobs in this mod uses this, the Ender Eye and Ender Dragon Girl (which only spawns in The End). Then again I modified the Ender Eye a bit so that it cannot pick up blocks. I will check it myself later.
0
Thanks. Though this time around if any bugs are detected I will try to fix them as soon as possible. I feel rather guilty for not fixing them before because I did not have time to. That and I had no idea where to even start.
Spawn rate for each mob can now be adjusted with the config file generated in version 1.2.0 for Minecraft 1.5.1.
0
Released Grimoire of Gaia 2 (1.2.0) for Minecraft 1.5.1. Apologies for not updating this mod at a regular basis.
Changes:
Despite this bit of info, there is a ton of changes that have been made with the mobs themselves. Please check the Changelog in the front page for the complete list of changes.
As always, please report any bugs and post any suggestions. I really appreciate it as I myself cannot find or notice every bug.
1
By changing the mobs EnumCreatureType.creature to EnumCreatureType.monster and by using the code you have provided has solved my problem! The mobs now spawn at a similar rate as monster/hostile mobs at night. My line of thinking was that the EnumCreatureType determined the time of day which a mob would spawn in.
My only problem now is how to stop them spawning at night (getFullBlockLightValue does not work).
Thank you. It may not be much, but without a doubt I feel the need to give credit to you for helping me solve this issue. You have no idea how much of a pain this was for me to deal with after 1.2.5.
1
Basically I should be using:
Based from EntityCreature and EntityLiving spawn requirements.
But it still does not work. This time mobs no longer spawn at all, not even in the starting area. Unless I am still missing something which I hope I am.
Mobs would spawn without trees present. But at a very low rate. Even lower than an Enderman. Probably a chance of 1 out of 50.
0
Probably just you.
The mobs are mostly based on games I used to play. If not, images on the web. Some are not even based on anything.
I don't know why I never based it on any anime. Probably because of the lack of reference to use.
Glad it worked. I only recently discovered this while tinkering around with it. tuiko did a great job making a fix for the issue although I wish he also stated that it included an ItemID config.
1
To overwrite the EntityMob spawning conditions I created a seperate class for my day mobs named EntityDayMob. One of the spawn conditions is based on the one EntityAnimals use (minus the block condition).
or
Both classes spawn my mobs but their spawn rate is increadibly low and dense compared to passive or hostile mobs which spawn everywhere. Some hardly spawn at all especially in the jungle and swamp biomes.
I hope it is a simple problem to do with the wrong use of @Override or declaration of super. This has been a extreme pain to deal with. I am beginning to think it is no longer possible.