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

Started by k6u on

Topic category: User side tutorials

Active 3 years ago
Joined Sep 2017
Points:
724

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
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.

Active 5 years ago
Joined Nov 2014
Points:
752

User statistics:

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

Very nice! Will use thank you very much.

Active 4 years ago
Joined Jun 2016
Points:
3744

User statistics:

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

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

Active 5 years ago
Joined Mar 2018
Points:
748

User statistics:

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

Thank you! This is so helpful!

Active 5 years ago
Joined Sep 2017
Points:
936

User statistics:

  • Modifications: 7
  • Forum topics: 11
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 202
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?

Active 2 years ago
Joined May 2016
Points:
929

User statistics:

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

AMAZING, THANKS I used snipets RIGHT away!

Active 2 years ago
Joined May 2016
Points:
929

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 138
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;
    }