
HydroBane
Members-
Posts
69 -
Joined
-
Last visited
Everything posted by HydroBane
-
Yes. Yes it is
-
Hi, So I created this (below) method to register my blocks is MoToolsRegistry.class public static void registerBlocks(Block block, String name, String unlocalizedName){ GameRegistry.registerBlock(block, MoTools.modID + unlocalizedName); LanguageRegistry.addName(block, name); } And called it in MoTools.class MoToolsRegistry reg = new MoToolsRegistry(); reg.registerBlocks(blockAzurite, "Azurite Ore", oreAzurite.getUnlocalizedName2()); But forge is throwing me this error: And frankly, I have no idea why. Any help?
-
An explanation is in the spoiler above it
-
This is wrong. You want Juli.oreJuli.blockID That'll be why.. My mistake, apologies.
-
Eh. My C* is a bit rusty. I can't write applications from the ground up, much less one with a GUI or any rendering. Most of what I do is either in Unity3D, Flash, or web-based. As far as I'm concerned the only difference between Java and Flash is how variables are declared. ("int a;" vs. "var a:int;") Oh, and having to deal with Floats and Doubles not being the same thing and can't convert between them implicitly. The largest change for me (python to java) was getting used to all the type restriction, and not just float/double. (function args, returns, variable types, casting) I don't like the way Java restricts everything. I've wanted, many times, to change something that was private/protected/package or final in a Minecraft class, but I couldn't. Making a getter and setter for one variable when you could just refer directly seems like a waste of space. I hold the belief that if you don't want something changed, it is a simple matter to *not change it*. Or, if you're writing an API or the like, make sure to write in the docs that you don't want it changed. I wrote a rant a while back to this effect. Actually, the largest change was probably the eternal stupidity of Java arrays (here's another rant for you). Python's list syntax alone makes it a better language. Probably the only advantage Java has over Python that I can think of is the ternary operator. And even then you can instead use (c,a) instead of a ? b : c. Or maybe the largest change would be the non-descriptive-ness of NPE's. If Python can use a NameError to say that something isn't defined, or an AttributeError to say that there's no such function or method, I don't see why Java can't. Just put a "static" modifier on the block. How do i do that? More so i guess where do i put that? In the class where you declared your block ID, add static to the beginning. ie: public static myFirstBlockID (public isn't necessary, but I do use it sometimes)
-
[UNSOLVED] Adding a new method to a base class, without changing it?
HydroBane replied to HydroBane's topic in Modder Support
I've solved it! I didn't need to add it to Block.class afterall, I was just using the wrong type of method... *facepalm* Thanks for your replies anyway! EDIT: I haven't fixed it. My method, in case you need it: public static void setTextureType(Block block, String name) { setTextureType(block, name); } And I've called it in my main class: TextureTypes type = new TextureTypes(); type.setTextureType(BlockAzurite, "azurite"); -
Okay, so I've found a solution to the problem. By changing this: this.blockIcon = reg.registerIcon(TestMod.modID + ":" + this.textureType + "/" + this.getUnlocalizedName2()); To this: this.blockIcon = reg.registerIcon(TestMod.modID + ":" + "TestFolder1" + "/" + this.getUnlocalizedName2()); I can change it, but I'd still prefer to use the top, as I would like to use the textureType method in more than one scenario. For now though, unless anyone can help me, I'm okay
-
It won't though. The mod is looking for them in the blocks/items texture folder. I'd need to specify the folder in my class for it to recognise them
-
That's my point, I don't know how to create a method that can do that.
-
Hi So I'm creating a test mod to try a few things out to make my real mod easier to add things to. Basically, I use the method below to get my textures. @Override public void registerIcons(IconRegister reg) { this.blockIcon = reg.registerIcon(TestMod.modID +":" + this.getUnlocalizedName2()); } What I want, is to organize my textures into folders within the textures/blocks folder. Correct me if I'm wrong, or if there's a better method, but to do this I could use this: @Override public void registerIcons(IconRegister reg) { this.blockIcon = reg.registerIcon(TestMod.modID +":" + this.texureFolder + "/" + this.getUnlocalizedName2()); } This is my dilemma. Is there a method I could create to assign a different textureFolder to each individual block/item? Thanks in advance ~ Hydro
-
My mistake too. Apologies The spoiler is now corrected Thanks dude22072, for pointing that out
-
Try this: Everything should be compatible, and changeable to suit your mod and it's needs
-
I believe he wants multiple mcmod.info files in a single zip, not seperate files.
-
What MC version are you using?
-
Never mind, solved it myself EDIT: No I haven't
-
I got an error when I had the @Override on it
-
How would I go around making a multi-textured log? Here's my log class package mods.hydro.motools.common.blocks.tree; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import mods.hydro.motools.common.motools; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.util.Icon; public class BlockHornblendeLog extends Block { private Icon bottomIcon; private Icon sideIcon; public BlockHornblendeLog(int par1, Material mat) { super(par1, mat); this.setCreativeTab(motools.tabMoTools1); } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister reg) { this.blockIcon = reg.registerIcon("hydro:hornblendeLog_block"); this.bottomIcon = reg.registerIcon("hydro:hornblendeLog_bottom"); this.sideIcon = reg.registerIcon("hydro:hornblendeLog_side"); } @SideOnly(Side.CLIENT) public Icon getBlockTextureFromSideAndMetadata(int side, int meta){ if(side == 0){return bottomIcon; }else if (side == 1){return bottomIcon; }else if (side == 2){return sideIcon; }else if (side == 3){return sideIcon; } else if (side == 4){return sideIcon; } else if (side == 5){return sideIcon; } else{ return blockIcon;} } } But when I run my game, it doesn't have a texture? Thanks ~ Hydro
-
My title might not be the clearest. What I mean is; I have a tonne of - public static Block myBlock; static int myBlockID - declarations, and I wondered if I could instead put them in a separate class? ~ Hydro
-
Hi, So I'm getting this really weird crash* when I run my minecraft, which says that there's something wrong with the registering of my item "woodenSlicer". I have no idea why. Everything is configured correctly in my motools.class** file so I don't know what's up? Anybody with a better understanding know a fix? ~ Hydro *Weird crash -> http://pastebin.com/gLb7LyTX ** motools.class -> http://pastebin.com/hP9aZAN6
-
Hi, So I'm getting this really weird crash* when I run my minecraft, which says that there's something wrong with the registering of my item "woodenSlicer". I have no idea why. Everything is configured correctly in my motools.class** file so I don't know what's up? Anybody with a better understanding know a fix? ~ Hydro *Weird crash -> http://pastebin.com/gLb7LyTX ** motools.class -> http://pastebin.com/hP9aZAN6
-
[SOLVED]Armor, Dye, and Tools Crafting Recipes?
HydroBane replied to FloatingGrapefruit's topic in Modder Support
I don't know if it has any effect, but I would drop the amount. At least that's what I use in my mod for single items. Also try adding your basemod class in front of your item. So: GameRegistry.addRecipe(new ItemStack(baconiteChestplate), new Object[] { "T T", "TTT", "TTT", 'T', Crystalia.baconiteIngot, )}; And also, I see you baconiteIngot registered correctly. You do need your braces too - {}. -
[SOLVED]Armor, Dye, and Tools Crafting Recipes?
HydroBane replied to FloatingGrapefruit's topic in Modder Support
I don't know if it has any effect, but I would drop the amount. At least that's what I use in my mod for single items. Also try adding your basemod class in front of your item. So: GameRegistry.addRecipe(new ItemStack(baconiteChestplate), new Object[] { "T T", "TTT", "TTT", 'T', Crystalia.baconiteIngot, )}; And also, I see you baconiteIngot registered correctly. You do need your braces too - {}. -
Multiple crafting products (4 planks for 1 wood)
HydroBane replied to HydroBane's topic in Modder Support
Thanks! -
Multiple crafting products (4 planks for 1 wood)
HydroBane replied to HydroBane's topic in Modder Support
Thanks!