Here's a lot of custom code to improve your mod.

Started by k6u on

Topic category: User side tutorials

Last seen on 10:41, 7. Sep 2021
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here's a lot of custom code to improve your mod.

Hello all, I've been working on a mod for a while now and in that process I liked adding bits of custom code to the mod elements to improve it a bit. I have a text document on my computer containing all the simple lines of code I have put into my mod, so I decided to fix it up a bit and share it with the MCreator community to make other peoples mods a little bit better. I put it in a pastebin so it's a bit more accessible, enjoy :) 

https://pastebin.com/q0aA2kSF

 

Note, I wont be providing tutorials for each piece of code, as it's pretty simple. Put the imports that have been listed into the imports list, and then put the code in the right place.. Pretty easy.

Last seen on 02:07, 12. Mar 2020
Joined Nov 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Very nice! Will use thank…
Tue, 01/23/2018 - 02:32

Very nice! Will use thank you very much.

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Awesome! My new mod will use…
Fri, 02/09/2018 - 22:37

Awesome! My new mod will use these codes a lot! :D

Last seen on 22:54, 17. Sep 2019
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! This is so…
Sun, 05/20/2018 - 19:28

Thank you! This is so helpful!

Last seen on 00:36, 3. Mar 2020
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried the bookshelf one. I…
Mon, 05/21/2018 - 20:25

I tried the bookshelf one. I changed 1 to 80, but it did nothing. Is there a max number?

Last seen on 20:06, 5. Feb 2023
Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
AMAZING, THANKS I used…
Mon, 06/25/2018 - 00:53

AMAZING, THANKS I used snipets RIGHT away!

Last seen on 20:06, 5. Feb 2023
Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
One more question for you…
Mon, 06/25/2018 - 01:28

One more question for you.

Does it matter if you change the return one to 2, 3, 4, etc....? 
public float getEnchantPowerBonus(World world, BlockPos pos)
    {
        return 1;
    }