-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Changing the color of an item programmatically
Draco18s replied to Boxtop5000's topic in Modder Support
*Innocent look* So I can calculate things like the XKCD number. -
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)
-
Gee. Did you try declaring it and defining it first? Variables aren't magic.
-
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.
-
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.
-
world != World. The first is an instance the second is the class.
-
Changing the color of an item programmatically
Draco18s replied to Boxtop5000's topic in Modder Support
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
Draco18s replied to Draco18s's topic in Support & Bug Reports
Thanks, re-reported back to XCW. -
"It doesn't work" is so...unuseful.
-
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.
-
world.getBlockMetadata((int)x, (int)y, (int)z)?
-
Changing the color of an item programmatically
Draco18s replied to Boxtop5000's topic in Modder Support
I meant besides you. -
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); }
-
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
Draco18s replied to Boxtop5000's topic in Modder Support
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); -
What is the error? (Random guess: you haven't fed your computer cheese lately)
-
ALL of his items will have this issue because he's declaring his ID variables twice!
-
//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.
-
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.
-
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
Draco18s replied to Boxtop5000's topic in Modder Support
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? -
I give up. You need basic java help, which I cannot provide.
-
MC 1.4.7 Arrow texture missing in compiled mod
Draco18s replied to Terristen's topic in Modder Support
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. -
seriously? x+i y-j z+k
-
Changing the color of an item programmatically
Draco18s replied to Boxtop5000's topic in Modder Support
I'd just like to point out that I'm ninth. And a newer user than ALL THE OTHER NINE.