-
Posts
17 -
Joined
-
Last visited
madmagic's Achievements
Tree Puncher (2/8)
0
Reputation
-
madmagic changed their profile photo
-
@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
-
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.
-
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?
-
[1.12.2] sound plays multiple times when right click is held down
madmagic replied to madmagic's topic in Modder Support
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? -
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); }
-
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?
-
1.12.2 how to add multiple recipes for 1 item?
madmagic replied to madmagic's topic in Modder Support
ah i see i'm dumb, thanks -
1.12.2 how to add multiple recipes for 1 item?
madmagic replied to madmagic's topic in Modder Support
but you cant have duplicate files, how would i do that then? -
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?
-
how to play a sound when right clicking in 1.12
madmagic replied to madmagic's topic in Modder Support
i tried around a bit and i got it to work myself, all is fine now -
how to play a sound when right clicking in 1.12
madmagic replied to madmagic's topic in Modder Support
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