Sword swinging sound

Started by GenoFromEarthbound on

Topic category: Help with modding (Java Edition)

Last seen on 16:05, 30. Jun 2021
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sword swinging sound

As title says, how can I do this? I am pretty new to Mcreator and java in general so  I'd like to know.

Last seen on 16:05, 30. Jun 2021
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
   if (MOUSE_PRESSED = 1) { …
Wed, 12/12/2018 - 20:15

   if (MOUSE_PRESSED = 1) {
        world.playSound((EntityPlayer)null, x, y, z,
        (net.minecraft.util.SoundEvent)net.minecraft.util.SoundEvent.REGISTRY.getObject(
                new ResourceLocation("testenvironmentmod:BeamSword")),
        SoundCategory.NEUTRAL,(float)1,(float)1);
            }

IT doesn't seem to recognize Mouse pressed....?

Last seen on 20:59, 1. Feb 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make the sword a item…
Mon, 12/17/2018 - 20:06

make the sword a item instead of a tool and then use the prosedure trigger "when mob hit with item" and then use the play sound block in the prosedures.

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also it should be == not =
Thu, 01/03/2019 - 21:55

Also it should be == not =