Posted February 26, 201312 yr Hi, I have a Mob that I want to spawn via a mob spawner but allow it to spawn during the day. I have the spawner working to spawn it during the night, but I cannot figure out how to get it to work during the day. I tried changing hte mod to a creature, but then the spawner doesn't work at all... I would also like to increase its activation range from the standard up to about 40-50 blocks.. I have looked for ages for tutorials, but have come up empty handed... Thanks in advance..
February 26, 201312 yr I'm assuming it would be the same thing you would do to get mobs naturally spawning in the day, putting this code in the EntityMobname: @Override protected boolean isValidLightLevel() { return true; //don't care about the light level to spawn } If it is not your own mob, I'm not sure.
February 27, 201312 yr Author Ok.. my code Mod File EntityRegistry.registerGlobalEntityID(EntityBarbarian.class, "Barbarian", EntityRegistry.findGlobalUniqueEntityId(), 32324, 2243); EntityRegistry.registerModEntity(EntityBarbarian.class, "Barbarian", EntityRegistry.findGlobalUniqueEntityId(), this, 160, 1, true); LanguageRegistry.instance().addStringLocalization("entity.Barbarian.name", "Barbarian"); EntityRegistry.addSpawn(EntityBarbarian.class, 8, 1, 3, EnumCreatureType.monster, <Biomes Omitted to save space>); Monster Spawner Code.. world.setBlockWithNotify(blockX+2, blockY-1, blockZ+2, Block.mobSpawner.blockID); TileEntityMobSpawner TEMS = (TileEntityMobSpawner)world.getBlockTileEntity(blockX+2, blockY-1, blockZ+2); if (TEMS != null) { TEMS.setMobID("Barbarian"); } Thanks in advance...
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.