
himan54
Members-
Posts
24 -
Joined
-
Last visited
Everything posted by himan54
-
Hmm. You could try this = null or itemStack = null. I had heard somewhere that worked. Maybe not. Id try it anyway
-
What exactly do you mean? Are you talking about a texture, or an animated texture for a item/block to use? Being a little less vague can help a lot.
-
[SOLVED][1.7.10] My first attempt with ore generation...
himan54 replied to DeadEnd78's topic in Modder Support
Hey, I've been in much the same place! I'm not sure if it matters but in the Withium ore class have a super of Material.Stone? I remembered that goofed up mine, but I'm no expert so.. If you need it I can provide my code. -
Yeah, I guess I wasn't really paying attention. Thanks though!
-
Sure! I ask lots of questions and am always glad to help someone else. Glad it worked.
-
So. I spotted my stoopid. should've had 'return "ryansmod:texturs/models/armor/..." where I had 'return "ryansmod:/models/armor/...". Thanks though to anyone who spotted it and was going to tell me.
-
Hey, I remember being in the same place you are! except I didn't have my own dimension. I'm sure you can figure out how to convert this to work in your own dimension though. This is the code I used: package ryansmod; import java.util.Random; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.World; import cpw.mods.fml.common.IWorldGenerator; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import ryansmod.common.block.AleniumOre; import ryansmod.RyansMod; public class Generator implements IWorldGenerator { public static Block AleniumOreGen = new ryansmod.common.block.AleniumOre(); @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId){ case -1: generateNether(world, random, chunkX * 16, chunkZ * 16); break; case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); break; case 1: generateEnd(world, random, chunkX * 16, chunkZ * 16); break; } } private void generateEnd(World world, Random random, int i, int j) {} private void generateSurface(World world, Random random, int i, int j) { // Just copy the stuff below to spawn multiple kinds of ores. I hope its not to hard for you to read! //Number of clusters of the ore in question spawned for(int k = 0; k < 10; k++) { int AleniumOreXCoord = i + random.nextInt(16); //remember +i int AleniumOreYCoord = random.nextInt(14); int AleniumOreZCoord = j + random.nextInt(16); //remember +j //WordlGenMinable([block], [Number of block per cluster(?)]) (new WorldGenMinable(RyansMod.aleniumOre, 5)).generate(world, random, AleniumOreXCoord, AleniumOreYCoord, AleniumOreZCoord); } } private void generateNether(World world, Random random, int i, int j) {} } And then in my main file I had it registered with: @EventHandler public void load(FMLInitializationEvent event) { GameRegistry.registerWorldGenerator(new Generator(), 0); proxy.registerRenderers(); } Hope this helps! Good luck on your mod!
-
Hello all! Its me again, but this time, I have something new. In picking up making my mod again, I had decided that I would like to make armor. I got it done (mostly, and that's why I'm here), but I cant get the texture to load. I was following a wuppy29 tutorial and came up with this main armor file. package ryansmod.common.armor; import ryansmod.RyansMod; import net.minecraft.item.ItemArmor; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; public class RefinedDiamondArmor extends ItemArmor { public RefinedDiamondArmor(ArmorMaterial material, int armortype, String name, String textureName) { super(material, 0, armortype); setUnlocalizedName(name); setCreativeTab(RyansMod.RyansTab); setTextureName("ryansmod:"+textureName); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(stack.getItem() == RyansMod.RefinedDiamondHelmet || stack.getItem() == RyansMod.RefinedDiamondChest || stack.getItem() == RyansMod.RefinedDiamondBoots) { return "ryansmod:models/armor/refined_diamond1.png"; } else if(stack.getItem() == RyansMod.RefinedDiamondLeggings) { return "ryansmod:models/armor/refined_diamond2.png"; } else { System.out.println("GG fool, you screwed it up!"); return null; } } } The problem though, is upon looking at myself in F5 the console screams about not being able to find "ryansmod:models/armor/refined_diamond1.png" and I get the purple and black squares of death. I am baffled, but perhapes someone can help me. Thanks!
-
Oh, my mistake. I just tried this and I can confirm it works! Thanks a lot for all the help!
-
Sorry, I'm starting school again and I've been busy. Its just been updated.
-
I take that back. I can only hit a 3x3 area twice. I even set max damage to 4000000 when it was 2000 and still it behaves strangely.
-
That did it! Thanks for the help I really appreciated it!
-
Thanks for the response ! I played around with your code and it doesn't break the 'unbreakables' now, but it still wont die when the time is up. I figured that was what the item = null was about but it just didn't work. Anymore ideas?
-
Hello all! I started working on my mod again, and whilst doing that I decided Id make a hammer (Note: I called it disassembler because at the time I thought it'd be less like a hammer. I was wrong so I will be changing that regardless). I've got it working mostly they way I like it except for these two problems: 1. Once the tool is used it takes 27 damage (Because it can break that many blocks at a time) and as far as I know , it does that, but it causes the durability bar to go crazy. After a couple uses the bar goes past the point where a normal tool would've broken, then goes bright red, then resets. (I can get screenshots if they are necessary) 2. I recently noticed that it is capable of breaking bedrock and other blocks that should be unbreakable so long as the block you originally struck was one of the blocks it is allowed to break. I'm really not sure why. Here is my github repo(https://github.com/rbuxton1/ryansmod), the class in question is under ryansmod/common/tool/DiamondDisassembler. Thanks! (Note: I really cant get
-
It worked! Thanks a lot for all the help!
-
Thanks for the help, I know I'm not the best at this and probably am making tons of mistakes. And I had been told that capital letter for a field name was the way to go. Guess not. And when you say I need something like mymod.whateverBlock, do you mean the variable that I use to register the block? I just tried importing ryansmod.RyansMod, and using that variable (RyansMod.aleniumOre) and it appears to have worked.
-
When I don't do that though and instead put "ryansmod.common.block.AleniumOre()", Eclipse always tells me that "ryansmod.common.block cannot be resolved to a type", and I haven't the slightest idea on how to fix this one. I think Eclipse could be thinking that ryansmod.common.block is a java file, but I'm not sure.
-
Yeah, sorry about that, I couldn't figure Github out so I figured a zip of the source would be good enough. I finally set up the Github repo though (took me a while), and now have the code here (https://github.com/rbuxton1/ryansmod). Thanks!
-
I forgot to note that I am using the recommended 1.7.10 build and Ubuntu 12.04 with Eclipse. (If that makes any difference)
-
Hello all! So, here's what happened. I made a mod and got it working how I liked it and then after taking a break and learning some more java, I came back and saw how much my mod looked liked it was coded by a 3rd grader. So I made it more appealing for me to read, and the ore generator that gave me trouble before is acting up again, but this time the ores aren't generated, but empty pockets of air are being made. (Its probably something really stupid but I've been having so much trouble with it. It could also just be the way I moved stuff around. Either case, I need help!) I have no idea what is causing this and it is because of that I came back here. So, if you find whats causing it or, have some ideas for me to test please let me know! Here's a download link from my Dropbox of the source. (https://www.dropbox.com/s/43gfgqweik4zvxl/tada.zip) Thanks!
-
It mystically fixed itself. Sorry for bothering!
-
Hello all! I recently picked up this whole modding thing a day or two ago and already have a mod which, I think, is good for that amount of time. My only problem is ore generation. I've read most of the available tutorials on it, and have built a generator. But here's the problem: when I run the mod in Eclipse, I can go down to the level I set spawning at and find some of my ore relatively quickly, but once I've packaged it up and put it in the mods folder for Minecraft, I get a load of nothing. I originally though it must have been because I set the ore to spawn at an absurdly low rate, but 20 minutes later still proved nothing. Maybe its just my own incompetence but I think somethings up here. I included the snippet of my main file where I set the generator, and I included the generator itself. Any help would be greatly appreciated! The generator: package ryan.ryansmod; import java.util.Random; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.World; import cpw.mods.fml.common.IWorldGenerator; public class RyansGenerator implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId){ case -1: generateNether(world, random, chunkX * 16, chunkZ * 16); break; case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); break; case 1: generateEnd(world, random, chunkX * 16, chunkZ * 16); break; } } private void generateEnd(World world, Random random, int i, int j) {} private void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 10; k++) { int AleniumOreXCoord = i + random.nextInt(16); //remember +i int AleniumOreYCoord = random.nextInt(14); int AleniumOreZCoord = j + random.nextInt(16); //remember +j new WorldGenMinable(Ryansmod.AleniumOreBlock, 10).generate(world, random, AleniumOreXCoord, AleniumOreYCoord, AleniumOreZCoord); } } private void generateNether(World world, Random random, int i, int j) {} } And the snippet of where I call the generator into action (Inside the base mod class of course): @EventHandler public void load(FMLInitializationEvent event) { GameRegistry.registerWorldGenerator(new RyansGenerator(), 0); proxy.registerRenderers(); }
-
Thanks I got it working. But can you do it without gradle or do I absolutly need it? Like can I use the .965?
-
Hello! I am just coming from Ubuntu 12.04, where I was trying to start modding. The problem is though when I clicked 'install.sh' it would start then complain about a exception. I thought this was weird so I deleted ~/Desktop/forge/ and extracted is again but this time I ran 'chmod +x ...' on about everything in the folder. Still no luck! Oh and here is the output just after it finished downloading the 42 files. Backing up client Downloaded 1.6.4.jar Backing up server Download of minecraft_server.1.6.4.jar failed hash check, deleting abcf286a14f7aee82e8bf89270433509 ba3145656b1480122bd8759cecd7b7a1 Something failed verifying minecraft files, see log for details. Decompile Exception: 1 It should be noted that I am using Eclipse Indigo, and that my forge version is the recommended build for 1.6.4.Any clues? Thanks. (I don't know how to do a code tab/if that's a thing here sorry. I also cannot find the log it talks about.)