Everything posted by HydroBane
-
Bug with my Block
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?
-
Bug with my Block
If I extend BlockGlass, I get the glass textuer. I've already tried it.
-
Bug with my Block
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.
-
Bug with my Block
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?
-
Bug with my Block
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
-
Can I load class and Package for my mod
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.
-
Custom log not rotating correctly.
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; }
-
Can I load class and Package for my mod
Thank you for repeating what 2 other people explained.
-
Can I load class and Package for my mod
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.
-
Custom log not rotating correctly.
Bump. Anyone?
-
[1.6.2]Different Drops in 1 Class!
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; }
-
[1.6.2]Different Drops in 1 Class!
Okay, then change this.blockID to Item.stick.itemID
-
[1.6.2]Different Drops in 1 Class!
Okay. Try changing else return this.blockID to else return rand.nextint(40 - par2 * 3) == 30 ? this.blockID;
-
[1.6.2]Different Drops in 1 Class!
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.
-
[1.6.2]Different Drops in 1 Class!
So, on breaking, it randomly drops one of four items?
-
[1.6.2]Different Drops in 1 Class!
So, you want one block that drops 4 different items every time?
-
Custom log not rotating correctly.
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.
-
Custom log not rotating correctly.
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.
How did I miss that? *facepalm*
-
[SOLVED] Textures not working, although configured.
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.
-
[SOLVED] Config in separate class?
Thanks
-
[SOLVED] Config in separate class?
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
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)
-
[SOLVED] GameRegistry error?
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
-
[SOLVED] GameRegistry error?
Lines 229-233 say: catch (Exception e) { FMLLog.log(Level.SEVERE, e, "Caught an exception during block registration"); throw new LoaderException(e); }
IPS spam blocked by CleanTalk.