pmardle Posted February 26, 2013 Posted February 26, 2013 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.. Quote
Mazetar Posted February 26, 2013 Posted February 26, 2013 no code, no help Quote If you guys dont get it.. then well ya.. try harder...
bltpyro Posted February 26, 2013 Posted February 26, 2013 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. Quote
pmardle Posted February 27, 2013 Author Posted February 27, 2013 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... Quote
Recommended Posts
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.