Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by pmardle

  1. Thanks, was wondering why the "Function_xxxxx_a wasn't working lol" I still don't understand why if they figured out that was .setBlock in the last version and it hasn't changed then why not just rename the thing for this version Also is the renaming a Forge or MCP thing ? (Sorry only started modding for 1.4.7 so this is my first version update )
  2. But why if it was .setBlock in 1.4.7 would they not include it in the 1.5 version.. Seems backward to me, to make your software WORSE on a new release..
  3. Hmmm If you change the &3 to &7 what happens ?
  4. int var24 = MathHelper.floor_double((double)(p.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; Isn't the 4.0F what is giving you 4 output numbers.. So in theory if you changed it to 36.0F it would give you 36 possible outputs, each one representing a 10 degree facing.. Therefore 8.0F would give you your diagonals I think.. 0 = North 1 = North East 2 = East 3 = South East 4 = South 5 = South West 6 = West 7 = North West (Or whatever direction starts at 0 )
  5. I had considered this, but then I have to change literally thousands of lines of code.. was hoping I was just missing something (Happens ALL the time )
  6. I have been using... world.setBlock(blockX, blockY, blockZ + 3,Block.dirt.blockID); Successfully as part of a worldgen.class for a structure build in Forge, however now with it is throwing an error, and the ability to set a block has disappeared?? Any Advice? Thanks,
  7. Hi, I have a mod that adds Barbarians, and uses a chest item as a mob spawner as well. At the moment I can only get the spawner component to spawn mobs within the barbarians hut where it is dark enough. Is there a way to get the mob spawner to ignore if the spawn location is dark or not? Thanks in advance. Peter
  8. Another issue related.. I am trying to spawn a number of barbarians with the placement of a hut in the WorldGen.. my code is.. //Create a barbarian entity in the current world EntityBarbarian barbarian = new EntityBarbarian(world); //Set entity(barbarian) properties (LocationAndAngles is required) barbarian.setLocationAndAngles(blockX + 8, blockY+2 , blockZ + 8, world.rand.nextFloat() * 360.0F, 0.0F); //Spawn entity in world world.spawnEntityInWorld(barbarian); But this doesn't spawn any mobs.. My Mob is a monster, but is overridden so it can spawn during the day...
  9. Update I can get it to spawn correctly, but I need to alter other settings of the Spawner (min Delay, max Delay etc..) But for the life of me I can find no info on how to do this.. I tried creating my own TileEntityBarbarianMobSpawner.class and TileEntityBarbarianMobSpawnerSpawnData.class as I can alter all the settings in there, but am unsuccessful.. I always get the error.. net.minecraft.tileentity.TileEntityMobSpawner cannot be cast to cm.barbarians.src.TileEntityBarbarianMobSpawner I assume this is because we are applying this to the MobSpawner block, and in there is the line... public TileEntity createNewTileEntity(World par1World) { return new TileEntityMobSpawner(); } Are there any Forge Hooks for altering other Mob Spawner settings other than MobID?? (and if not why the hell not ) !!
  10. 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...
  11. Ok, I am trying to get my custom mob to spawn from a mob spawner. My Mod File has 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, BarbariansMain.VillageBiome); So it spawns naturally too.. My Mob Spawner code is.. TileEntityMobSpawner TEMS = (TileEntityMobSpawner)world.getBlockTileEntity(blockX+2, blockY, blockZ+2); if (TEMS != null) { TEMS.setMobID("Barbarian"); } Yet of course.. It always shows a Pig... Any Help pls ? Also is there a way of getting a custom mob into a mob spawner that will spawn during the day and night ? Thanks in advance, Peter
  12. 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..
  13. Ok, I have coded a custom village (by copying all the vanilla files and tweaking them as I want) What I can't figure out or find a tutorial on is the method to make them spawn in the world (and ideally only in my custom biome) I just can't figure out what/where calls for the village. Any help/Direction/pointing to a relevant tutorial would be awesome thank you..
  14. That might work, but surely the standard way should function properly ? All the tutorials do it the way I have, so why do they (apparently) work and I do not ?? Grrr
  15. This is still not resolved.. When I first spawn into a world, there are usually 1-2 groups of my mobs nearby (within chunk loading range of the spawn point) - however as I move around the world, no other mobs of this type are spawned at all in any biome... Any ideas ? Thanks,
  16. Holy Cow !! Told you it was probably a silly error !!! Thanks a bunch !!
  17. Hi All, As usual all the tutorials I have found for this issue are either out of date, or don't exist !! I am trying to get a custom structure to spawn (similar to villages) - and am having the following issue. public class WorldGenBarbarianVillage implements IWorldGenerator { public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { } private void generateSurface(World world, Random random, int blockX, int blockZ) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(60); int Zcoord = blockZ + random.nextInt(16); (new WorldGenBarbarianVillage()).generate(world, random, Xcoord, Ycoord, Zcoord); } } } This is in my Mod.java file, and the error is at the bit I underlines. Error Message.. The method generate(Random, int, int, World, IChunkProvider, IChunkProvider) in the type ColoniesMain.WorldGenBarbarianVillage is not applicable for the arguments (World, Random, int, int, int) I appreciate that it is probabaly caused by the variables not being the same in the two generate thingies (sorry not up on my terminology) - but I'll be damned if I can get this working.. Can anyone assist?? (I'm sure it's a noob mistake/Easy fix !!) If you need it the code of my WorldGenBarbarianVillage is.. public class WorldGenBarbarianVillage extends WorldGenerator { public boolean generate(World var1, Random var2, int var3, int var4, int var5) { while (var1.isAirBlock(var3, var4, var5)&& var4 > 2) { --var4; } var1.setBlock(var3, var4 + 1, var5, Block.blockDiamond.blockID); return true; }} Thanks in Advance !!
  18. Ok, they actually DO spawn, but only in the immediate area of an initial spawn in a new map.. as soon as I move outside of the normal chunks visible at map creation, I can't find any spawns anywhere.. (pigs etc spawn as normal) (NOTE: these are classes as creatures, not mobs)
  19. I have added all of the biomes, and it still won't spawn.... EntityRegistry.addSpawn(EntityBarbarian.class, 10, 1, 2, EnumCreatureType.creature, BiomeGenBase.taigaHills, BiomeGenBase.jungle, BiomeGenBase.jungleHills, BiomeGenBase.plains, BiomeGenBase.taiga, BiomeGenBase.forest, BiomeGenBase.forestHills, BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.beach, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge);
  20. Currently Using Forge for Minecraft 1.4.5 BTW.. Having a hard time getting my custom mobs to spawn. THey spawn, display and act fine via the spawn egg, but I cant get them to spawn naturally. My code is.. @Init public void init(FMLInitializationEvent evt) { proxy.registerRenderInformation(); EntityRegistry.registerGlobalEntityID(EntityBarbarian.class, "Barbarian", EntityRegistry.findGlobalUniqueEntityId(), 32324, 2243); EntityRegistry.registerModEntity(EntityBarbarian.class, "Barbarian", EntityRegistry.findGlobalUniqueEntityId(), this, 60, 3, true); LanguageRegistry.instance().addStringLocalization("entity.Barbarian.name", "en_US", "Barbarian"); EntityRegistry.addSpawn(EntityBarbarian.class, 10, 1, 2, EnumCreatureType.creature); } Is it an issue with the Entity ID's ?? Thanks in advance, Peter
  21. Thanks, Used the line you suggested and tweaked a few other bits and bobs, and it all works squiffily well now thanks
  22. Ok, I have part of a mod that uses a tweaked furnace for something.. The section of code throwing my only error at this time is below <iframe src="http://paste.minecraftforge.net/view/embed/312d2972" style="border:none;width:100%"></iframe> <Edit> - Pfft so much for the embed working /** * Called upon block activation (right click on the block.) */ public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if (par1World.isRemote) { return true; } else { TileEntityResearchBlock var10 = (TileEntityResearchBlock)par1World.getBlockTileEntity(par2, par3, par4); if (var10 != null) { par5EntityPlayer.displayGUIResearchBlock(var10); } return true; } } The Error is:- The method displayGUIResearchBlock(TileEntityResearchBlock) is undefined for the type EntityPlayer Now, I understand that this is saying the GUIResearchBlock is not defined in the EntityPlayer file, but I don't want to directly change this base file. Can anyone explain, or point me to something that will tell me how to get this working please.. I've searched many GUI tutorials with no luck. Thanks in advance, pmardle
  • Create New...

Important Information

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