Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. *Innocent look* So I can calculate things like the XKCD number.
  2. 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)
  3. Gee. Did you try declaring it and defining it first? Variables aren't magic.
  4. 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.
  5. 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.
  6. world != World. The first is an instance the second is the class.
  7. 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.
  8. Thanks, re-reported back to XCW.
  9. "It doesn't work" is so...unuseful.
  10. 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.
  11. world.getBlockMetadata((int)x, (int)y, (int)z)?
  12. 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); }
  13. 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); }
  14. 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);
  15. What is the error? (Random guess: you haven't fed your computer cheese lately)
  16. ALL of his items will have this issue because he's declaring his ID variables twice!
  17. //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.
  18. 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.
  19. 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.
  20. 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?
  21. I give up. You need basic java help, which I cannot provide.
  22. 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.
  23. seriously? x+i y-j z+k
  24. I'd just like to point out that I'm ninth. And a newer user than ALL THE OTHER NINE.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.