Everything posted by Graphicscore
-
Help again!! With switching metadata based on player direction!!!
You can get the direction and save it into the metadata with this code : int metadata = par1World.getBlockMetadata(par2, par3, par4); int playerDirection = MathHelper.floor_double((double)((par5EntityLivingBase.rotationYaw * 4F) / 360F) + 0.5D) & 3; if(metadata == 0) { switch(playerDirection) { case 0: metadata += 2; break; //South Facing Block = meta 2 case 1: metadata += 3; break; //West Facing Block = meta 3 case 2: metadata += 0; break; //North Facing Block = meta 0 case 3: metadata += 1; break; //East Facing Block = meta 1 } } par1World.setBlockMetadataWithNotify(par2, par3, par4, metadata, 3); } Then you just have to
-
[SOLVED][1.6.2] Crafting recipe with dye powder = NullPointerException
Hello there I have a code for a crafting recipe with dye powder with color but I keep getting a NullPointerException Code : ItemStack greenColorStack = new ItemStack(Item.dyePowder,1,2); ItemStack coalStack = new ItemStack(Item.coal); ItemStack brownColorStack = new ItemStack(Item.dyePowder,1,3); GameRegistry.addRecipe(new ItemStack(this.camo), " g ", "bcb", " g " , 'g', greenColorStack, 'b', brownColorStack , 'c' , coalStack); Error : Thanks, Graphic
-
Get Block Tetxture of Block in ItemStack in Slot
Hello I have an other problem now. I have a custom Slot for my GuiContainer and I want to detect which Block is in the Slot and return the Texture is there a way to do that ? Slot Class : Thank Graphic
-
[1.6.2]Change BlockTexture at runtime
Hello, just another quick question, Can I change the BlockTexture dynamically with code for example if I click on a button in a giu my block should became another texture Thanks, Graphic
-
[SOLVED][1.6.2] Draw GuiTextField on GuiContainer
lol It's working now
-
[SOLVED][1.6.2] Draw GuiTextField on GuiContainer
I've moved it everywhere now and tested it with println the code is always executed but it's not drawing. any Ideas ?
-
[SOLVED][1.6.2] Draw GuiTextField on GuiContainer
Hello, It's me again I try to draw a textbox on a Gui and I had a look at the gui of the anvil but it seems like it's not working because I can't see the textField , I get no errors , nothing happens. My GuiContainer Thanks, Graphicscore
-
[SOLVED][1.6.2] GuiContainer - Can't access controlList
Hey I've written a GuiContainer and want to add a Button or better a Textfield but I can't access the controlList In the tutorial it says : But I have no controlList what to do ? My GuiContainer Thanks for help, Graphicscore
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
I'm going to die for this mod So I changed my FastTravelBlock to But I don't know what to do in createNewTileEntity.... My errorlog but it's seems like it's about the same
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
I don't know what you mean exactly but this is whole Log from the debug : And I've got 2 crash reports as files :
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
Here you go : CommonProxy ClientProxy I think it has something to do with the TileEntity
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
I changed it now so that the server returns the container and the client returns the gui know I'm running into the following error caused by a nullpointerexception but I don't know where ...:
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
Seems like I'm still stuck at my gui I just wanna show the gui now at all I've tried to change the code to a Container and looked at the tutorial in the wiki but now I have the error : " java.lang.ClassCastException: org.setcore.fasttravel.ContainerTravelMark cannot be cast to net.minecraft.client.gui.GuiScreen" My Code so far : ClientProxy CommonProxy ContainerTravelMark FastTravelBlock FastTravelMod GuiTravelMark TileEntityTravel
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
First of all Tanks for your answer and White is the difference from a container?
-
[SOLVED][1.6.2] Custom GUI with textfield and Button
Hello I try to make a custom GUI of my Block to give the block a "internal" name so each Block has a string that can be changed. But first of all I just wanted to create a gui with a textfield and a button but I'm always failing, I'm new to forge and java as well and the tutorials on the forge wiki don't help me at all so I post my code here and you tell me why it is not working and what has to be changed. Tips and explanations I would really appreciate and sorry for my english I'm not a native speaker. FastTravelMod CommonProxy ClientProxy FastTravelBlock GuiTravelMark GuiHandler And the errorlog by opening the gui : Thank you for helping me , LG Graphic
IPS spam blocked by CleanTalk.