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


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

I'veGotNoName's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. So I want to play a sound file when the player uses and item, meaning right clicks with it. What's the event that triggers when the player uses an item? I tried "PlayerUseItemEvent.Start", which should trigger when a player starts using an item according to a list of events I found, but I assume that's outdated because when I tried to make a listener for it, I got the error "PlayerUseItemEvent cannot be resolved to a type"
  2. Thanks, that fixed it. Looking back, the docs do say SoundEvents need to be registered, not sounds
  3. I haven't found much in the Docs for it. I tried the this method @SubscribeEvent public void registerSounds(RegistryEvent.Register<Sound> event) { } , but that threw an error on the <Sound>. All I can find in the Docs about registering things is the following. @SubscribeEvent public void registerBlocks(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll(block1, block2, ...); } If I change <Block> to <Item>, it works fine for items, but it doesn't work for sounds.
  4. Oh, I know that the reason for the error is the referenced method is now deleted. I thought that I need something in my Registry handler for the client (excuse me if what I just said makes no sense, I was struggling to find words for what I meant.). So I deleted the line from my registry handler, and changed ModelLoader.setCustomModelResourceLocation(johncena, 0, (ModelResourceLocation) johncena.getRegistryName()); to ModelLoader.setCustomModelResourceLocation(johncena, 0, new ModelResourceLocation(johncena.getRegistryName(), "inventory")); I also renamed en_US.lang to en_us.lang. Worked perfectly, thanks!
  5. I changed my previous Item Initialization to this. However, I now have a problem with my registry handler. Pics are attached, the one with events in it is the new one. I'm not sure what do to from here now that the register method is gone, and to be honest, I probably completely misunderstood what you were trying to tell me in your edit. Thank you in advance. My source is attached to this post if you want it. Also, my johncena.json and en_US.lang files are also attached if you don't feel like extracting my src. src.zip en_US.lang johncena.json
  6. I've been following this tutorial on youtube and I've been having trouble with things I put into assets folders actually doing anything to my items. To clarify, I have my en_US.lang, johncena.json, and johncena.png files in my resources like the image shows, but when I launch the game, my item still shows up as item.johncena.name and has no texture. (If anyone wonders, "johncena" was my idea of a joke :S)
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.