Sword dosent compile

Started by Dr.Lego12mini on

Topic category: Help with modding (Java Edition)

Last seen on 20:32, 14. Mar 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sword dosent compile

i want to make a sword but every time i make it it wont compile, even if i copy and edit an already existing sword it wont work:

:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava NO-SOURCE
:processApiResources NO-SOURCE
:apiClasses UP-TO-DATE
:sourceMainJava UP-TO-DATE
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:36: error: incompatible types: ToolMaterial cannot be converted to ElementsTree       elements.items.add(() -> new ItemSword(EnumHelper.addToolMaterial("FSFSDFSD", 2, 70, 6f, -1f, 2)) {
                                                                       ^
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:37: error: method does not override or implement a method from a supertype          @Override
         ^
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:39: error: cannot find symbol             Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(slot);
                                                                ^
  symbol: method getItemAttributeModifiers(EntityEquipmentSlot)
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:42: error: cannot find symbol                      new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double) this.getAttackDamage(), 0));
                                           ^
  symbol: variable ATTACK_DAMAGE_MODIFIER
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:42: error: cannot find symbol                      new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double) this.getAttackDamage(), 0));
                                                                                                   ^
  symbol: method getAttackDamage()
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:44: error: cannot find symbol                      new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -3.7, 0));
                                           ^
  symbol: variable ATTACK_SPEED_MODIFIER
C:\Users\######\MCreatorWorkspaces\HELP\build\sources\main\java\net\mcreator\tree\item\ItemFsfsdfsd.java:36: error: cannot find symbol       elements.items.add(() -> new ItemSword(EnumHelper.addToolMaterial("FSFSDFSD", 2, 70, 6f, -1f, 2)) {
                               ^
  symbol: constructor (ToolMaterial)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
7 errors
:compileJava FAILED
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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
5 actionable tasks: 3 executed, 2 up-to-date
BUILD FAILED

Last seen on 20:32, 14. Mar 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and when i change it to any…
Fri, 03/05/2021 - 20:00

and when i change it to any other type of tool it works

Last seen on 20:32, 14. Mar 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2020.2
Sun, 03/07/2021 - 16:21

2020.2