Make a SWORD from Item Mod ?

Started by Kane on

Topic category: Help with modding (Java Edition)

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a SWORD from Item Mod ?
Fri, 08/19/2016 - 20:19 (edited)

I was trying to add a potion effect to my sword when I hit an entity, but I coudn't find a way when I create my sword from a tool mod.

So I tried creating an item, since there's the possibility to make a sword from there (or it seems to be), just as mcreator says, putting 1.5 in type of tool box.

So, now I got my poisonous sword, but the problem is that it's NOT a sword...

It's just an item (1 of damage, no attack cooldown and all the things a sword has) that give poison status to enetity that hits :/

So I'd like to know if there's a way to get a real sword from an item mod adding some codes (I tried mixing up with a "tool sword", but if I do not get errors, I get again the normal tool sword with no poison effect).

If not, I'd like to know if there's the possibility to get an enchanted item "by default" (without the needing of a recipe)

Edited by Klemen on Fri, 08/19/2016 - 20:19
Last seen on 00:42, 12. Apr 2017
Joined Jul 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm, tricky.
Tue, 08/23/2016 - 09:21

Hmm, tricky.

There're two ways of copying another item that I can think of. The first, using Forge you can find the item in the file directory(it's in MrCrayFishes tutorial), the other, is a shady method(I don't recommend it), using a Java decompiler, you could browse through mods, meaning you could see how other people have done it. I don't actually have much experience with Java. So I can't really help you there :(

Thanks,

~Coolq.

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Hmm, tricky.
Tue, 08/23/2016 - 14:14

@#1 Yeah it's tricky but it's the only way I found to get a "sword" without cooldown without having haste, since all the code about attribute modifier doesn't work (surely I don't know how to make them work) and yeah, I've alredy took a look to sword class etc. and other mods, but mods uses outdated method or not compatible methods.

At least I can make an item with sharpness 19 to get an item with 10 of attack damage x)

Last seen on 00:42, 12. Apr 2017
Joined Jul 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:Hmm, tricky.
Wed, 08/24/2016 - 02:34

Okay, good luck!

You could definitely do it with Java, though. I hope that you can get it working :)

Last seen on 00:42, 12. Apr 2017
Joined Jul 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
UPDATE:
Wed, 08/24/2016 - 03:16

UPDATE:

try this:

goto: global events -> when player hits entity -> in spesifics cases (item in hand = your sword) -> add potion efect and sellect potion effect

Taken from: https://mcreator.pylo.co/forum/30006/sword-effects

Credit goes to: mc_Dandy

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:UPDATE:
Wed, 08/24/2016 - 09:01

@#3 That would give the potion effect to me unfortunatly.

But I "solved" this with a little trick using axe instead ;)

Last seen on 00:42, 12. Apr 2017
Joined Jul 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:UPDATE:
Wed, 08/24/2016 - 22:07

@#3.1 Ah ok, If you need any help! Just ask :)