Jump to content

Graphicscore

Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by Graphicscore

  1. 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
  2. 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
  3. 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
  4. 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
  5. I've moved it everywhere now and tested it with println the code is always executed but it's not drawing. any Ideas ?
  6. 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
  7. 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
  8. 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
  9. 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 :
  10. Here you go : CommonProxy ClientProxy I think it has something to do with the TileEntity
  11. 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 ...:
  12. 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
  13. First of all Tanks for your answer and White is the difference from a container?
  14. 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
×
×
  • Create New...

Important Information

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