Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About Darkprince97

  • Rank
    Tree Puncher


  • Gender
  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);
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.