Jump to content

Darkprince97

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by Darkprince97

  1. It gives you an error because the "getServerGuiElement" method should return the container,while the "getClientGuiElement" should return the Gui
  2. It is: Minecraft.getMinecraft().thePlayer.swingItem(); This won't do any damage though.
  3. Oh right,because thePlayer is EntityPlayerSP... Thanks for pointing it out
  4. I'm pretty sure this would crash,since you are referencing to a non instanciated object... The proper way would be: EntityPlayer player = Minecraft.getMinecraft().thePlayer; NBTTagCompound nbt = player.getEntityData(); Also,@OP: I think you misunderstood the use of NBT Data.This simply returns a list of informations stored in nbt.You have to use nbt.setInteger/setByte/etc... to save them.
  5. Oh,I didn't even see that! Glad you solved anyway
  6. So... I finally solved it. Appearently in MC forge uses the case sensitive mod id,while in eclipse doesn't. Since my mod id in the resources folder was "mods/dmod" while in my src files was "DMod" the textures didn't want to load.
  7. Are you overriding the getIcon(side,metadata) method in your block class ?
  8. Here is your mistake: @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { [b]this.mc.renderEngine.getTexture("/gui/oreMixer.png");[/b] GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); int x = (width - xSize) / 2; int y = (height - ySize) / 2; this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize); } When you are getting the texture you need to use its full path,like so: this.mc.renderEngine.getTexture("mods/YourModID/textures/gui/oreMixer.png");
  9. Ok,I will try to use getUnlocalizedName2(); EDIT: Nope,getUnlocalizedName2(); doesn't work either,as I was expecting. Anyway,you are wrong about the substring part. Here is the getUnlocalizedName(); code from block.java. public String getUnlocalizedName() { return "tile." + this.unlocalizedName; } Since I don't want the "tile." I do substring(5) to get rid of it.
  10. My code is on github... http://github.com/Darkprince97/DCraft/ Look at any block or item...
  11. Actually I am taking out the first 5 characters (getUnlocalizedName.substring(5); ).It is just like doing getUnlocalizedName2(); But I prefer not using it because I heard it crashes the server...I will try though...
  12. Aaaand that's why I posted my mod zip.I think it is correctly packaged.Could you please take a look at it and tell me what I did wrong,because it is probably something stupid that I'm just not able to spot...
  13. I already know how to register an icon and how to get a block texture.It works fine in eclipse but the textures don't show up in minecraft when i compile it.
  14. It has to do with entityPlayer.cameraYaw and entityPlayer.cameraPitch.
  15. You can use the metadata in your Block.class like so: deathstoneBrickStairs = new StairBacon(BlockIDs.deathstoneBrickStairs, BaconBlocks.deathstone, Metadata of deathStoneBricks);
  16. Exactly,that's why I didn't understand what he was meaning. The textures of my blocks & items are still not working in minecraft but they do work in eclipse...
  17. Ok,I really give up,because I don't understand.Can you show me an example ?
  18. I'm confused.I am using the getBlockTexture and getIcon functions to get the textures for my blocks and items and the registerIcons function to register them. Is that what you mean by reference ? Registering them ?
  19. Pahimar code indeed I'm pretty new to minecraft modding so I took some code from his packetHandler to see how to properly write one myself (will do it soon ) and some of his utils from the Equivalent Exchange 3 source. Anyway,I don't know what you mean by class you're referencing your textures in. With the new 1.5 implementation of forge textures now load automatically without having to preload them...
  20. dir.development=../../ dir.release=Releases release.minecraft.version=1.5.2 release.mod.version=0.35 Here is my build.properties....
  21. This is pahimar's workspace: It is very easy to use. About the build.xml file: https://github.com/pahimar/Equivalent-Exchange-3 follow these instructions on how to compile EE3 and try to understand how to modify the build.xml and build.properties to suit your workspace needs.
  22. Are you using pahimar's workspace ? You need to use ant to compile it,so you need a proper build.xml file.
  23. Here you go: http://www.mediafire.com/download/9ktuprubfqf1j8b/dmod-universal-0.35-6.zip
  24. I have the same problem,still unsolved. I have the mods folder at the root of the zip.The mod ID is the same as in my reference class.Everything works fine in eclipse,but it doesn't when I compile it. Btw,I'm on a PC....
  25. How is this even related to what you are asking in the thread title ? Anyway,NBT data is a data format that Notch implemented to save and load informations of Entities,items(ItemStacks),chunks,players,etc so you can save them when the game is closed and load them when the game is opened .
×
×
  • Create New...

Important Information

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