Jump to content

Thor597

Forge Modder
  • Posts

    268
  • Joined

  • Last visited

Everything posted by Thor597

  1. Oh, ok. Yes, I think it would work kinda the same way as making an achievement with the whole icon thing
  2. I was looking around in code and i noticed this in BiomeGenEnd this.biomeDecorator = new BiomeEndDecorator(this); And I started wondering, is it possible to do the same but with ChunkProviders? That would open for a whole new way of thinking about biomes, imagine the possibilities in making a biome with a chunkprovider, you could create all sorts off stuff instead of a boring biome that just stretches a bit with the same old terrain you've seen a 1000 times you could for example have a skylands biome where you get the ends chunkprovider and edit it to be grass and dirt and stone. The possibilites would be endless! So as I said, is this possible? Thanks for reading!
  3. Oh yeah, the camelCase frostedDirt thing didnt make a difference: public static Block frostedDirt; public mod_ArcticCraft() { { try { config.load(); } catch (Exception g) { } this.frostedDirt = (new AC_BlockFrostDirt(initIntProp(config, "frostDirt", config.CATEGORY_BLOCK, 223), 3)).setHardness(0.5F).setBlockName("frostedDirt").setStepSound(Block.soundGravelFootstep).setCreativeTab(CreativeTabs.tabBlock); LanguageRegistry.instance().addStringLocalization("frostedDirt" + ".name", "en_US", "Frosted Dirt"); } } AC_BlockFrostDirt: package net.minecraft.src; import java.util.ArrayList; import java.util.List; import java.util.Random; public class AC_BlockFrostDirt extends Block { protected AC_BlockFrostDirt(int i, int j) { super(i, j, Material.ground); } // You declare the block materials in here and what it drops because where using forge public int idDropped(int i, Random rand, int j) { return mod_ArcticCraft.frostedDirt.blockID; } public String getVersion() { return "v1.0"; } public String getTextureFile() { return "/ArcticCraft/ACBlocks.png"; } } I still get the weird texture bug when its in my hand and I still dont see a name when hovering over it
  4. I'll get to working out my messy code then now! I've searched my workspace for the usePortal (Client and Server) and its no longer there, has it been replaced with another one? or is it a completely new thing?
  5. 1. Nothing Changed, My code: LanguageRegistry.instance().addStringLocalization("FrostedDirt" + ".name", "en_US", "Frosted Dirt"); 2. Yes I do 3. Hmm, Lex? 4. I crashed: This is weird for 1. this: "FrostedDirt" + ".name" has to be this: "frostedDirt" + ".name" for 3. I dunno how it works on Blocks, I used that only for my items so far and that works. for 4. then I dunno. How can it be a lowercase f when the Block is called FrostedDirt?
  6. 1. Nothing Changed, My code: LanguageRegistry.instance().addStringLocalization("FrostedDirt" + ".name", "en_US", "Frosted Dirt"); 2. Yes I do 3. Hmm, Lex? 4. I crashed: This is weird
  7. Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out! Also, I have a couple other problems: 1. My Blocks and Items names does not display when I hover over them 2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture) 3. Where did usePortal go? 4. My Mobs look completely fucked up, the texture is messed up and they all use the player model
  8. How do I access Minecraft.java then? I want to add an effectrenderer like this: AC_EntityBlueSparkle entitybluesparkle = new AC_EntityBlueSparkle(world, d, d1, d2, d3, d4, d5); ModLoader.getMinecraftInstance().addEffect(entitybluesparkle); but it doesnt work anymore
  9. How the hell do I tell my BlockFurnace class where my Gui file is?
  10. READ MY NEW PROBLEM BELOW I've noticed in the 1.3.1 update there a lot of new server things in the src (of course since it now merges client and server) And after trying to find the Entity files and biome and worldgen files i found them in the common.net.minecraft.src package and since the render and model files and particle FX files etc are in the client(because client handles rendering and texture) and all the other files are in the server i wondered if i was to do the same things with my files too, so my Render and Model files in the client and my mod_ files and all that in the common, or is it like one package where i place everything. Sorry if this sounds n00bish.
  11. agreed
  12. Wouldnt it just be a like a method that checks the worldtype when creating worlds and if its the ID specified by the modder, initiate the ModLoader.addBiome in that dimension? Im sorry if im just rambling on about impossible stuff, it is nearly 4AM and im a bit tired
  13. ' Yeah but it would be a bit annoying to have to rely on two API's and it would be better if forge had this
  14. I think there should be a method to add multiple biomes to your dimension without making a whole new worldchunkmanager and all that. How I would imagine this being like is this: MinecraftForge.addBiomeToDimension(biomeName, dimensionId); So in my case that would be: MinecraftForge.addBiomeToDimension(AC_BiomeGenBase.FrostForest, 23); I hope this seems like a good idea as it is very easy to then add a new biome to your custom dimension.
  15. I've been trying to make a WorldChunkManager for a long time now but every time I enter the dimension I get this error java.lang.NullPointerException at net.minecraft.src.AC_ChunkProvider.generateTerrain(AC_ChunkProvider.java:92) at net.minecraft.src.AC_ChunkProvider.provideChunk(AC_ChunkProvider.java:277) at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:102) at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:128) at net.minecraft.src.World.getChunkFromChunkCoords(World.java:648) at net.minecraft.src.World.getBlockId(World.java:563) at net.minecraft.client.Minecraft.preloadWorld(Minecraft.java:2199) at net.minecraft.client.Minecraft.changeWorld(Minecraft.java:2085) at net.minecraft.client.Minecraft.usePortal(Minecraft.java:1996) at net.minecraft.src.AC_Fruit.onItemRightClick(AC_Fruit.java:56) at net.minecraft.src.ItemStack.useItemRightClick(ItemStack.java:139) at net.minecraft.src.PlayerController.sendUseItem(PlayerController.java:77) at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1383) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1800) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:822) at net.minecraft.client.Minecraft.run(Minecraft.java:750) at java.lang.Thread.run(Unknown Source) 2012-07-31 12:44:47 [sEVERE] A critical error has occurred. java.lang.NullPointerException at net.minecraft.src.AC_ChunkProvider.generateTerrain(AC_ChunkProvider.java:92) at net.minecraft.src.AC_ChunkProvider.provideChunk(AC_ChunkProvider.java:277) at net.minecraft.src.ChunkProvider.loadChunk(ChunkProvider.java:102) at net.minecraft.src.ChunkProvider.provideChunk(ChunkProvider.java:128) at net.minecraft.src.World.getChunkFromChunkCoords(World.java:648) at net.minecraft.src.World.getBlockId(World.java:563) at net.minecraft.client.Minecraft.preloadWorld(Minecraft.java:2199) at net.minecraft.client.Minecraft.changeWorld(Minecraft.java:2085) at net.minecraft.client.Minecraft.usePortal(Minecraft.java:1996) at net.minecraft.src.AC_Fruit.onItemRightClick(AC_Fruit.java:56) at net.minecraft.src.ItemStack.useItemRightClick(ItemStack.java:139) at net.minecraft.src.PlayerController.sendUseItem(PlayerController.java:77) at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1383) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1800) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:822) at net.minecraft.client.Minecraft.run(Minecraft.java:750) at java.lang.Thread.run(Unknown Source) AC_WorldChunkManager AC_ChunkProvider AC_WorldProvider AC_BiomeGenBase AC_BiomeCache AC_BiomeCacheBlock AC_BiomeDecorator The Dimension itself worked fine when we were using WorldChunkManagerHell, its just that we wanted more biomes and ore gen and to do that we needed our own WorldChunkManager. PLEASE HELP!
  16. You cant have an Uppercase G in generateSurface. its got to be lowercase.
  17. Thank you SOOOOO much! This is my finished code that works: public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World world, int x, int y, int z, int par7) { int i = world.getBlockId(x, y, z); if (y != 0 && i == Block.planks.blockID) { int metaDataOfTargetBlock = world.getBlockMetadata(x, y, z); if(metaDataOfTargetBlock == 1){ Block block = Block.cloth; world.playSoundEffect((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F, block.stepSound.getStepSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); world.setBlockAndMetadataWithNotify(x, y, z, Block.cloth.blockID, 3); return true; } } return false; } The only wrong thing in your code there was the world.setBlockAndMetadata, it shouldve been world.setBlockAndMetadataWithNotify but i've fixed that up now!
  18. Yes, this seems nice for that purpose, but -not to be ungrateful or anything- you see, the reason I was using an onItemUse method is because of these reasons: 1: If i were to use an onBlockActivated method I would have to edit base code which you know, no one would like to do 2: I want the tool im using onItemUse in to be the only tool able to do this. 3: I want to make the tool take damage when doing it I think maybe 2 and 3 could be solved in a way with onBlockActivated, but I really really do not want to edit base code. Thanks anyway!
  19. world.setBlockAndMetadata(x, y, z,blockID, metaData); say planks blockID is 50, and the metaData for the birch is 3 and you want to change the block at (0,0,0) world.setBlockAndMetadata(0, 0, 0, 50, 3) if you dont understand that method, then i think you should go back over metadata and relearn it. Read the first post and my first code. I cant 'set' it because its not the block that it sets its the block that is already there; thats why I have GETBlockId there at the first block however on the second one(the one that i set when right clicked) logically enough has SET because it sets the block there. The birch planks, taking my example are not the block that gets set when the first one gets clicked but its actually the block getting clicked. What I have problems with is to make it so that birch planks in this case and not any of the other planks gets turned into magenta wool;and as said before, I already have the damage value for the block It TURNS INTO. So before you start being a dick, get your facts straight. EDIT: If i am just misunderstanding what you've said, I deeply apologize and I can only ask of you to maybe tell me where to put the setBlockAndMetadata method and in what context, also; can you then make your code example like how we discussed it, with the birch plank/magenta wool thing? Its easier to understand that way. Thanks!
  20. Taking my previous example, how would i then specify that the planks im right clicking are birch planks and not any of the other planks?
  21. No, my problem wasnt changing 1 damage value up, it was to change 1 metadata block into one completely other one, EG from birch wood planks to magenta wool.
  22. I suggest you check enderdragon class out, probably in a onDeath() method or something like that if (this.health <= 0) { var1 = (this.rand.nextFloat() - 0.5F) * 8.0F; var26 = (this.rand.nextFloat() - 0.5F) * 4.0F; var3 = (this.rand.nextFloat() - 0.5F) * 8.0F; this.worldObj.spawnParticle("largeexplode", this.posX + (double)var1, this.posY + 2.0D + (double)var26, this.posZ + (double)var3, 0.0D, 0.0D, 0.0D); } thats what I found in EntityDragon
  23. Im trying to make a metadata block into another metadata block by right clicking said block with an item. I already got the block that it turns into working with metadata but not the one you click. I dont know how to add in a damage value to the block that you right click to make into the second block. SetBlockMetadataWithNotify only works on the block that it turns into not the actual block you click. Thank you! BTW there should've been a getBlockIdAndMetadata...
  24. Im trying to make a metadata block into another metadata block by right clicking said block with an item. I already got the block that it turns into working with metadata but not the one you click. I dont know how to add in a damage value to the block that you right click to make into the second block. SetBlockMetadataWithNotify only works on the block that it turns into not the actual block you click. Thank you!
×
×
  • Create New...

Important Information

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