Simple block mod can't run on a server

Started by Truemirror on Tue, 08/07/2018 - 06:52

Topic category: General discussion

Last seen on 16:48, 9. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Simple block mod can't run on a server
Tue, 08/07/2018 - 06:52

Yesterday I played on my server and we have ProjectE there. I setup a sugar cane farm for infinite EMC, but the energy condenser overflowed with canes, and so I thought to myself why not make a mod which allows me to craft sugar cane blocks. Problem is, mod runs fine in singleplayer, but the server crashes when I run it.

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
You have to import…
Wed, 08/08/2018 - 13:33

You have to import EntityLivingBase class, you can do it manually (import net.minecraft.entity.EntityLivingBase;), or you can use the fix imports button. (Actually that is not its name, but it is close enough. Most likely something like "fix imports & format code".)

Last seen on 16:48, 9. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Thank you so much, it worked…
Wed, 08/08/2018 - 13:56

Thank you so much, it worked! 

One question, do I have to do this everytime I want to add a mod to a server?

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
I have not modded for 1.7.10…
Wed, 08/08/2018 - 14:05

I have not modded for 1.7.10 for quite a while, but it seems that MCreator for this version most likely generates this part of the code for every new block. So you have to do this change for every new block, I guess. Alternatively, you could also just remove the part of the code. What the code actually does is that it sets the metadata f the block based on placer facing on its placement, so if you do not want to have the block this functionality, you should be fine without it.
 

Last seen on 16:48, 9. Aug 2018
Joined Apr 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Thanks for the help.
Wed, 08/08/2018 - 14:46

Thanks for the help.