
HydroBane
Members-
Posts
69 -
Joined
-
Last visited
Everything posted by HydroBane
-
I am indeed using 1 block ID for each texture, and how would I go about dynamically overriding the method, without creating another class, or changing from using the Block constructor?
-
If I extend BlockGlass, I get the glass textuer. I've already tried it.
-
I was given a challenge to use the least amount of classes as I possibly could. At the moment I have two, and I was trying to stick to that. My textures also don't work in new classes, but I believe that's a bug in the version of forge I have, as I'm not using latest.
-
Okay, that relies on me making a class. Is it possible for me to do it without making a new class, or is this the only way?
-
Hey everyone, So, as a side project to my regular mod, I've been making a "Simple Blocks" mod, which just adds bock to creative that have block textures. Have a free example! You'll notice my floating signs, telling me which block is which. The reason I have floaty signs is because of an "Invisible Block" I added, which works (to some description). You'll see what I mean by that here: My blocks are simply registered under the net.minecraft.block.Block.class. with this: invisibleBlock = new Block(invisibleBlockID, Material.iron) .setUnlocalizedName("invisibleblock").func_111022_d("invisibleblock") .setCreativeTab(CreativeTabs.tabBlock).setBlockUnbreakable(); My question is; is there a way to have my block completely invisible (except for the wireframe), without it making everything connected to it invisible too? That is all Thanks HydroBane
-
I guess hydroflame was more straightforward. And I've noticed a lot of kids on here, that just want to mod in an extra creeper and don't actually have any knowledge of Java; relying on us to code their mod for them.
-
Yeah, I've got my getIcon method, which does indeed return a default texture (my side texture). I'm still, after extending BlockRotatedPillar, having the same rotation problem though. Unless I need to copy the onBlockPlaced method into my class and I'm just being plain stupid, I'm stumped (excuse the tree pun). Texture methods; if you need them again. @Override public void registerIcons(IconRegister reg) { this.blockIcon = reg.registerIcon(MTRef.ModID + ":" + textureName + "_side"); this.topTexture = reg.registerIcon(MTRef.ModID + ":" + textureName + "_bottom"); } @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta){ if(side == 0 || side == 1){ return this.topTexture; } return this.blockIcon; }
-
Thank you for repeating what 2 other people explained.
-
I think Mr Knows-Java wants to load his class and/or make an object of it, but doesn't think he can do it because it's in a different class. If the above is correct, then: 1) Import the package. 2) You can create an object of a class anywhere in you main class, not just your EventHandler load method. If the above helped, then you clearly do not have a good enough knowledge of Java to be modding; so please take Mazetar and luacs' advice and go learn Java.
-
Bump. Anyone?
-
Or even change: public int idDropped(int par1, Random rand, int par2){ if(par2 > 3){ par2 = 3; } if((40 - par2 * 3) == 0){ return Item.diamond.itemID; } if((40 - par2 * 3) == 10){ return Item.ingotGold.itemID; } if((40 - par2 * 3) == 20){ return Item.ingotIron.itemID; } else return this.blockID; } to: public int idDropped(intpar1, Random rand, int par2) { if(par2 > 3){ par2 = 3; } if((40 - par2 * 3) == 0{ return Item.diamond.itemID; } if((40 - par2 * 3) == 10 { return Item.ingotGold.itemID; } else return random.nextint(40 - par2 * 3) == 30 ? Item.ingotIron.itemID : Item.stick.itemID; }
-
Okay, then change this.blockID to Item.stick.itemID
-
Okay. Try changing else return this.blockID to else return rand.nextint(40 - par2 * 3) == 30 ? this.blockID;
-
Now, this probably won't work, because I'm tired and to be perfectly honest don't want to sit and test it all evening, but try this: public int idDropped(int par1, Random rand, int par2){ if(par2 > 3){ par2 = 3; } if((40 - par2 * 3) == 0){ return Item.diamond.itemID; } if((40 - par2 * 3) == 10){ return Item.ingotGold.itemID; } if((40 - par2 * 3) == 20){ return Item.ingotIron.itemID; } else return this.blockID; } Obviously, changing the items being dropped. If anyone with a more inclination and knowledge has any better (or working, accordingly) ideas, please correct me.
-
So, on breaking, it randomly drops one of four items?
-
So, you want one block that drops 4 different items every time?
-
Okay done, but I'm unsure of what to do with the method: @Override @SideOnly(Side.CLIENT) protected Icon func_111048_c(int i) { // TODO Auto-generated method stub return null; } It's not exactly descriptive.
-
I've got my Wood Log all correct, extending BlockLog, but I've got a slight problem... That, and there's four of the said log in the Creative Inventory. My Log class if needed: package assets.motools.common.blocks.hornblende; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import assets.motools.common.MoTools; import assets.motools.common.MTMain.MTRef; 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 LogHornblende extends BlockLog { public static String textureName; @SideOnly(Side.CLIENT) private Icon topTexture; public LogHornblende(int par1, String textureName) { super(par1); setCreativeTab(MoTools.tabMTBlock); this.textureName = textureName; } public int idDropped(int par1, Random rand, int par2){ return this.blockID; } public int quantityDropped(Random rand) { return 1; } @Override public void registerIcons(IconRegister reg) { this.blockIcon = reg.registerIcon(MTRef.ModID + ":" + textureName + "_side"); this.topTexture = reg.registerIcon(MTRef.ModID + ":" + textureName + "_bottom"); } @SideOnly(Side.CLIENT) public Icon getIcon(int side, int meta){ if(side == 0 || side == 1){ return this.topTexture; } return this.blockIcon; } } Thanks Hydro
-
[SOLVED] Textures not working, although configured.
HydroBane replied to HydroBane's topic in Modder Support
How did I miss that? *facepalm* -
So, I've got this really annoying error where my textures aren't showing up, although they're configured correctly. Check it out, and see if you can spot the error, because I sure as heck can't. Thanks Hydro EDIT PS: My ModID in MTRef is "motools" & this is happening with ALL my textures.
-
Thanks
-
Is it possible to have a separate Config.class and put all my configs in a separate method in there, and just call the class in my Pre-Init event with something like this: Config config = new Config(); config.configure();
-
Minecraft Launcher (i.e. Mojangs launcher) and Forge with 1.5.2
HydroBane replied to NosajDraw's topic in General Discussion
Yes, the json file does need to be edited. So without confusion, the 3 things that need to be edited are 1) The folder name 2) The jar file 3) The name inside the json file (All the names *must* be the same) -
Never mind. I see what I've done. I've used the wrong block This MoToolsRegistry reg = new MoToolsRegistry(); reg.registerBlocks(blockAzurite, "Azurite Ore", oreAzurite.getUnlocalizedName2()) Should be this MoToolsRegistry reg = new MoToolsRegistry(); reg.registerBlocks(oreAzurite, "Azurite Ore", oreAzurite.getUnlocalizedName2()) Silly me
-
Lines 229-233 say: catch (Exception e) { FMLLog.log(Level.SEVERE, e, "Caught an exception during block registration"); throw new LoaderException(e); }