Sword swinging sound

Started by GenoFromEarthbound on Wed, 12/12/2018 - 19:35

Topic category: Help with modding (Java Edition)

Last seen on 23:36, 7. Jan 2019
Joined Dec 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sword swinging sound
Wed, 12/12/2018 - 19:35

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 23:36, 7. Jan 2019
Joined Dec 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 16:46, 8. Sep 2020
Joined Sep 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 19:12, 21. Oct 2020
Joined Nov 2018
User points:

User statistics:

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

Also it should be == not =