Slime block code doesnt work

Started by ChikZ on Wed, 03/11/2020 - 14:03

Topic category: Help with modding (Java Edition)

Last seen on 12:31, 9. Jun 2020
Joined Aug 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Slime block code doesnt work
Wed, 03/11/2020 - 14:03

I copied it from the original slime block, and it keeps giving me errors. I don't have much experience with java though.

Code:
https://pastebin.com/Z0ya9gMT

Error:
 

:sourceMainJava
C:\Users\pixel\MCreatorWorkspaces\endrevival\build\sources\main\java\net\mcreator\endrevival\MCreatorChorusblock.java:66: error: cannot find symbol
            super.onFallenUpon(worldIn, pos, entityIn, fallDistance);
                 ^
  symbol: method onFallenUpon(World,BlockPos,Entity,float)
C:\Users\pixel\MCreatorWorkspaces\endrevival\build\sources\main\java\net\mcreator\endrevival\MCreatorChorusblock.java:82: error: cannot find symbol
            super.onLanded(worldIn, entityIn);
                 ^
  symbol: method onLanded(World,Entity)
C:\Users\pixel\MCreatorWorkspaces\endrevival\build\sources\main\java\net\mcreator\endrevival\MCreatorChorusblock.java:107: error: cannot find symbol
        super.onEntityWalk(worldIn, pos, entityIn);
             ^
  symbol: method onEntityWalk(World,BlockPos,Entity)
3 errors
:compileJava FAILED

Last seen on 10:37, 8. Oct 2020
Joined Nov 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You put the code outside the…
Wed, 03/11/2020 - 14:48

You put the code outside the block "part": the block class begins at line 43 and ends at line 60, your slime block code begins at line 62. Remove the } at line 60 and add one at the end of the file

Last seen on 17:41, 1. Nov 2020
Joined May 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Did you make sure you…
Wed, 03/11/2020 - 15:00

Did you make sure you reformat and import and you used the right version of the code ? 

Last seen on 17:41, 1. Nov 2020
Joined May 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Good catch there so …
Wed, 03/11/2020 - 15:03

Good catch there so @SomeoneElse I was reading on a mobile and missed that closed bracket

Last seen on 12:31, 9. Jun 2020
Joined Aug 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks, it worked <3
Wed, 03/11/2020 - 15:18

Thanks, it worked <3

Last seen on 02:32, 1. Dec 2020
Joined Jan 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Can you give me the fixed…
Sat, 03/14/2020 - 22:44

Can you give me the fixed code? And how to actually use it? If not its fine :)