Everything posted by Draco18s
-
Changing the color of an item programmatically
*Innocent look* So I can calculate things like the XKCD number.
-
How to change Toolbar Icon?
Because the item in the hotbar doesn't call getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) It calls getBlockTexture(int side, int metadata)
-
directional problem
Gee. Did you try declaring it and defining it first? Variables aren't magic.
-
Rendering Items In-world
How... is your TE getting set to null? It is not being set to null. I had a debug statement for that as well (it never ran). May have snipped it just before I posted the code, as I knew that was not the problem.
-
[Solved] Textures not loading in Minecraft after recompiling and reobstr
I downloaded the zip that you posted earlier and you have "mods" and "generic" inside a folder called "tutorial" which is at the root of the zip. You need to move the mods folder up so that it's next to "tutorial". If you're not using 1.4.7 code, then what's this? public class ClientProxy extends CommonProxy { public void registerRenderers() { MinecraftForgeClient.preloadTexture(ITEMS_PNG); MinecraftForgeClient.preloadTexture(BLOCK_PNG); } } That's 1.4.7 code.
-
directional problem
world != World. The first is an instance the second is the class.
-
Changing the color of an item programmatically
Harder to determine a short-term average. *Shrug* Math.power(a,b); Stupider [sic] than **. Probably. I'm still waiting for a computer language that allows for Knuth up-arrow notation.
-
Chunk forgets about the player if they stop moving
Thanks, re-reported back to XCW.
-
[Solved]Configuration Trouble
"It doesn't work" is so...unuseful.
-
[Solved]Configuration Trouble
GameRegistry.registerBlock(fakeBlock, "Fake Block"); And just so you know: Every time it crashes, post the god damn error. It is impossible to solve a crash error without knowing what the error is.
-
directional problem
world.getBlockMetadata((int)x, (int)y, (int)z)?
-
Changing the color of an item programmatically
I meant besides you.
-
Rendering Items In-world
I have reimplemented the datawatcher to NO EFFECT. In the render class: TileEntityTrap te = (TileEntityTrap)world.getBlockTileEntity(x, y, z); if(te != null) { System.out.println("Rendering frame " + te.getRenderFrame()); //this runs once and only prints a 0. } In the tile entity class: public TileEntityTrap() { this.dataWatcher = new DataWatcher(); this.dataWatcher.addObject(0, Byte.valueOf((byte)0)); this.dataWatcher.addObject(1, Byte.valueOf((byte)0)); } public DataWatcher getDataWatcher() { return this.dataWatcher; } public void startSwordRender(int sword) { System.out.println("Starting sword render"); //this prints on activation, as expected this.dataWatcher.updateObject(0, Byte.valueOf((byte)10)); this.dataWatcher.updateObject(1, Byte.valueOf((byte)sword)); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } public byte getSwordRender() { return this.dataWatcher.getWatchableObjectByte(1); } public void setSwordRender(int s) { this.dataWatcher.updateObject(1, Byte.valueOf((byte)s)); } public byte getRenderFrame() { return this.dataWatcher.getWatchableObjectByte(0); } In the dispenser behavior (sword) class: TileEntityTrap te = (TileEntityTrap) par1IBlockSource.getBlockTileEntity(); if(te != null) { te.startSwordRender(1); }
-
[Solved]Configuration Trouble
Here's how I do things: @PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); int fakeID = config.getBlock("FakeBlock", 2000).getInt(); config.save(); fakeBlock = new FakeBlock(fakeID); }
-
Changing the color of an item programmatically
Oh yeah? Well, I predate you! (lol, hipster) I meant that I've overtaken 95% of the forum user base in posts in the last two months. My average posts per day is 3 times what it is for the other prolific users. Not that I see this as an accomplishment, it's just staggering. Math.power(a,b);
-
[Solved]Configuration Trouble
What is the error? (Random guess: you haven't fed your computer cheese lately)
-
[Solved]Configuration Trouble
ALL of his items will have this issue because he's declaring his ID variables twice!
-
[Solved]Configuration Trouble
//class level public static int aluminumIngotID; //function level int aluminumIngotID = NerdSpeakConfig.getBlock("ItemAluminumIngot", 713).getInt(); //a different function mod_NerdSpeak.aluminumIngot= (new aluminumIngotID(aluminumIngotID, Material.iron)); Which aluminumIngotID is being used? The class level one. Which is undefined.
-
Mod won't zip & mcmod.info problems
I've almost done it half a dozen times myself. As for copyrights: You have an intrinsic copyright on everything you create. It's automatic.
-
How do I do This...
That assumes two things: 1) Gravity. Minecraft doesn't really have....gravity. Any object which needs to fall handles its own falling motion, there's no global gravity effect, so a no-clip entity can still say "nope, not fallin'!" 2) That no-clip ignores the ground. It is not unreasonable to have only horizontally based collision ignoring.
-
Changing the color of an item programmatically
Why am I not surprised? Oh right. Leather armor does it. Who here thought to open up Leather Armor's java files and take a peek?
-
issue with detecting blocks
I give up. You need basic java help, which I cannot provide.
-
MC 1.4.7 Arrow texture missing in compiled mod
Check the error log (there's always a forge_log0) for any "texture not found" lines. Post that and your code, along with a screenshot of the folder structure inside your zip.
-
issue with detecting blocks
seriously? x+i y-j z+k
-
Changing the color of an item programmatically
I'd just like to point out that I'm ninth. And a newer user than ALL THE OTHER NINE.
IPS spam blocked by CleanTalk.