Jump to content

madmagic

Members
  • Posts

    17
  • Joined

  • Last visited

madmagic's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. nvm, i should fininsh my java course first, but i found another way to basically get it to do what i want and it all works fine now
  2. im new to java, im still learning. it just auto completed when i typed onItemRightClick
  3. @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { Minecraft.getMinecraft().player.inventory.setInventorySlotContents(103, new ItemStack(ModItems.HEADSET)); return super.onItemRightClick(worldIn, playerIn, handIn); } this is what i tried, i got it to be wearable by using isValidArmor but i also have some other rightclickevents set such as playSound but by using the isValidArmor you cant rightclick the item to equip it
  4. because i have a 3D model of a headset that fits just perfecly around the players head when the item is put there using that command and i want to be able to equip it by right clicking wich then exdcutes that command, i tried by doing Minecraft.getMinecraft().player.inventory.setInventorySlotContents(103, new ItemStack(ModItems.HEADSET)) but that wouldnt work, if i changed 103 to 1 then it would work.
  5. i added lore to my item using addInformation, i made it gold and light blue using §6 and §b as shown in the 1st image, when i play the game via eclipse it work fine, it looks like the 2nd image shown, but when i build my mod and i use the jar in normal minecraft its messed up like in the 3rd image. why is this and is there a fix?
  6. when i right click an item it replaces the head slot with that item, i did this with Minecraft.getMinecraft().player.sendChatMessage("/replaceitem entity @p slot.armor.head mm:headset") but that posts the result in the chat. is there a way i can make it not do that?
  7. i have tried using onPlayerStoppedUsing before but for some reason i cant get that to work, do i need to have something that requires a use of the item first in order for it to work?
  8. i have an item and when i right click it plays a gun shot sound, but if the right click button is held down the sound plays multiple times untill i let go of my mouse button but i want it to play only once, how can i do this? code used for playing the sound: @Override public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { playerIn.playSound(Sounds.gun_shot, 1.0F, 1.0F); return super.onItemRightClick(worldIn, playerIn, handIn); }
  9. i already have my multi tool made, but i made it so its actually a pickaxe but i set effective on to a whole bunch of blocks, but theni have tu manually add all the wood types of stairs, doors fences etc. is there a way around this to make it just work as a pickaxe, axe and shovel?
  10. but you cant have duplicate files, how would i do that then?
  11. so i have a block and i made a shapeless recipe for it by combing a gold block with a nether star: { "type": "minecraft:crafting_shapeless", "ingredients": [ { "item": "minecraft:gold_block" }, { "item": "minecraft:nether_star" } ], "result": { "item": "output", "count": 1 } } } but i want to make it so that the the block can be made by puting 9 of the ingots the block is made of in a crafting table. after some searching around i found this code: "type": "minecraft:crafting_shapeless", "ingredients": [ { [ "item": "minecraft:somewhat0", "data": 0 ], [ "item": "minecraft:somewhat1", "data": 0 ] }, { [ "item": "minecraft:somewhat2", "data": 0 ], [ "item": "minecraft:somewhat3", "data": 0 ] } but this doesnt work for me, it says a few times it got ] but expected something else. so what is the correct way of adding multiple recipes for one item?
  12. i tried around a bit and i got it to work myself, all is fine now
  13. i want the sound to be played at the player, how would i do so? all examples i found online with Word.playsound(), need some pos in it, but it always says pos cannot be defined to a variable
×
×
  • Create New...

Important Information

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