
Darkprince97
Members-
Posts
28 -
Joined
-
Last visited
Everything posted by Darkprince97
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
Darkprince97 replied to Graphicscore's topic in Modder Support
It gives you an error because the "getServerGuiElement" method should return the container,while the "getClientGuiElement" should return the Gui -
It is: Minecraft.getMinecraft().thePlayer.swingItem(); This won't do any damage though.
-
Adding a skill (stat similar to experience and health)
Darkprince97 replied to big_AL97's topic in Modder Support
Oh right,because thePlayer is EntityPlayerSP... Thanks for pointing it out -
Adding a skill (stat similar to experience and health)
Darkprince97 replied to big_AL97's topic in Modder Support
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. -
Oh,I didn't even see that! Glad you solved anyway
-
[Unsolved]Custom modeled block doesn't show up in inventory
Darkprince97 replied to TwinAndy's topic in Modder Support
Are you overriding the getIcon(side,metadata) method in your block class ? -
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");
-
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.
-
It has to do with entityPlayer.cameraYaw and entityPlayer.cameraPitch.
-
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...
-
dir.development=../../ dir.release=Releases release.minecraft.version=1.5.2 release.mod.version=0.35 Here is my build.properties....
-
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.
-
Are you using pahimar's workspace ? You need to use ant to compile it,so you need a proper build.xml file.
-
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 .