Speed and recovery time of a Sword?

Started by NestyG on

Topic category: Help with MCreator software

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Speed and recovery time of a Sword?

Ever since the 1.9 combat update Swords changed. Now there is a bar that determines how fast you can swing your sword. If you swing before it fills up again, you wont do 100% damage.

On the wiki this thing is described as speed and recovery time.

On MCreator when you make a Sword there is still the old code. What is the new code needed to change these 2 things? And how would I implement it into MCreator's custom code?

Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'd simply suggest making it
Mon, 10/10/2016 - 23:47

I'd simply suggest making it give a haste effect for 00:00 while holding it, so it can recover faster. Or mining fatigue for slower. 

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:Do you have the code in
Wed, 10/12/2016 - 16:33

@#5.1.1 I tried moving the @Override code where you said, and it doesn't recompile. Could you be more specific? 
I'm really new to this thing.

 

Also, just in case, I'll remind you. Could you please add me on Skype? I'm the_osu on there

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:Do you have the code in
Wed, 10/12/2016 - 22:16

@#5.1.1.2 what is the recompile error exactly? and btw , on the Skype you are the Italian one? There is a bit more people with same or very similiar name , it seems.

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:Do you have the code in
Thu, 10/13/2016 - 12:21

@#5.1.1.2.1 Yes I am the Italian one

Also these are the errors:
http://puu.sh/rHv8s/6e36fc05bd.png

 

warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Pylo\MCreator170\forge\build\sources\main\java\mod\mcreator\mcreator_steelSword.java:95: error: lambda expressions are not supported in -source 1.6
          final Optional<AttributeModifier>modifierOptional = modifiers.stream().filter(attributeModifier -> attributeModifier.getID().equals(id)).findFirst();
                                                                                                          ^
  (use -source 8 or higher to enable lambda expressions)
C:\Pylo\MCreator170\forge\build\sources\main\java\mod\mcreator\mcreator_steelSword.java:102: error: not a statement
               modifier.getAmount() * multiplier;
                                    ^
2 errors
1 warning

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:Do you have the code in
Sun, 10/16/2016 - 10:06

@#5.1.1.2.1 Did you add me to skype?

Joined Jul 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah, I have that same
Sun, 10/16/2016 - 14:19

Yeah, I have that same problem too, but I don't really mind.  However, I noticed that you can't change the damage dealt with hoes yet that affects the speed of the hoe (like stone swings faster than wood).  To fix this, just set the hoe to another tool and switch it back to a hoe.  Also, I have to add more damage onto axes so they are more powerful than other tools just like in vanilla Minecraft.  Here is a good example on what to set your damage values to:

0 damage = Wood / Gold

1 damage = Stone

2 damage = Iron

3 damage = Diamond

For axes, add +5 to these values, and they should work like in vanilla.

And that's all!  I assume the new stuff is on the wiki because they will change it shortly.