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


  • Posts

  • Joined

  • Last visited


  • Gender
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

J-Nutz's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I figured that, I was just hoping to get it to work. Thanks for the help though, not too critical so I'm not going to pursue it, really just messing around.
  2. I have an item that on right click tries to set the player to sneaking, no matter what I try, I can't seem to get the player to sneak. Here's what I've tried public boolean sneaking = false; @Override public ItemStack onItemRightClick(ItemStack EPWandParts, World world, EntityPlayer player) { if(!sneaking) { sneaking = true; } else { sneaking = false; } return EPWandParts; } @Override public void onUpdate(ItemStack FlWand, World world, Entity entity, int value, boolean bvalue) { EntityPlayer player = (EntityPlayer) entity; if (sneaking) { player.setSneaking(true); } else { player.setSneaking(false); } }
  3. I realize that, I just do it that way so when I want to use those Items in other recipes, I have them available.
  4. This is an example from one of my crafting recipes. Declare the item/block first ItemStack purpleIngot = new ItemStack(ModItems.purpleIngot); ItemStack stick = new ItemStack(Items.stick); GameRegistry.addRecipe(new ItemStack(ModItems.purpleAxe), "xx ", "xy ", " y ", 'x', purpleIngot, 'y', stick); Update: Getting obsidian for a recipe. Should be functional for your recipe. ItemStack obsidian = new ItemStack(Blocks.obsidian); ItemStack redDiamondGem = new ItemStack(ModItems.RedDiamondGem); ItemStack redStoneDust = new ItemStack(Items.redstone); GameRegistry.addRecipe(new ItemStack((ModItems.RedDiamondGem), "ror", "rdr", "ror", 'r', redStoneDust, 'd', redDiamondGem, 'o', obsidian));
  5. Sorry, Was up too late to be attempting to code. I understand now. Thank you for your time and help! Much appreciated.
  6. Hmm, The .get() Method seems to not work
  7. Umm, No... I just said "how would I get it to set allowFlying to false if your hand is empty?" On right click it allows the user to fly, if you right click or choose another item, the flight is taken off. Where's the confusion?
  8. That works, but how would I get it to set allowFlying to false if your hand is empty? That's what crashes
  9. Could you show me an example? Everything I try seems to crash my game. I tried it with out the statement and it doesn't crash so It's not something else.
  10. I currently have an item that on right click grants the player creative flight. When either right clicked again, or the player selects another item/empty hand the flight gets taken away. How would I do that? My current code doesn't do so. ItemStack heldItem = player.getCurrentEquippedItem(); if(heldItem.getItem() != ToolInits.flightWand) { allowFlight = false; }
  11. I dont know if this would be different for buttons but I have an item that when right clicked removes all potion effects. Here is the code. for(int i = 0; i <20; i++) { player.removePotionEffect(i); } This takes away the actual effect and the display on the side of the inventory GUI. You can get rid of the for statement and just put in the number of the potion effect you want to remove. (Don't know what poison is off the top of my head)
  12. I'm creating a wand in my mod that grants the user flight when right clicked and removes the flight when right clicked again. This is all working except for if you are flying and right click in the air, you can still fly around until you touch the ground. How would I make it so when you right click the wand to take the flight off, you fall to the ground?
  • Create New...

Important Information

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