Jump to content

1.10.2 - Crashing on Server Test, Not on Client Test [SOLVED]


HalestormXV

Recommended Posts

Alright so I have a custom generator to generate ores. When testing the client, the ore generation works perfectly with no issue. All my ores spawn wonderfully right where they should.

 

When I go to test on the Server the server crashes on startup with this message:

http://pastebin.com/6aQq0kFL

 

Now it is telling me the issue is in my E_AngWorldGen.class and my Main.class

 

So chances are I am probably registering my generator on the client which is why it works no problem if the client launches with the mod. However, I am probably not registering on the server side, which is why it crashes when trying to launch a server.

 

Or maybe I am totally wrong. I do know one thing for certain, it is a noob mistake because I have made world generators/ore generators before and have had no issue with them. Odds are the mistake popped up because I am trying this "new style" of coding which seems to be the way most people are doing things now.

 

Here are the two classes:

MainClass: http://pastebin.com/rL8rAxTv

WorldGen/OreGen Class: http://pastebin.com/2xtg1Hj6

 

Perhaps it is even simpler and I just have them in the wrong order. Like I said, I know it is a noob/rookie mistake but I just can't see it.

 

Link to comment
Share on other sites

Yeah it is initialized in my main blocks class:

http://pastebin.com/DPMEuKtn

 

It also has its own class:

 

 

public class AngelicOre extends Block 
{

public AngelicOre() 
{
	super(Material.IRON);
	this.setRegistryName("angelicOre");
	this.setResistance(3F);
	this.setHardness(3F);
	this.setHarvestLevel("pickaxe", 2);
	this.setUnlocalizedName("angelicOre");
	this.setCreativeTab(Reference.eaCreativeTab);
	GameRegistry.register(this);
	GameRegistry.register(new ItemBlock(this), getRegistryName());
}

}

 

 

 

And it works without crash when you launch the client. Can be spawned in, shows in my creative tab with its model/texture, and is placeable and mine-able.

Link to comment
Share on other sites

You never do anything in your common proxy, which is the servers side.

 

I know but isn't that why the client is extending out the common so you can do it in one and then have them registered in the main? Isn't that like the "new way" or something from whatever tutorial I was watching to get started with 1.10.2 modding. Because I know originally in my 1.7.10, client side only stuff (rendering, models, keybinds, etc.) where only in the client side proxy. However now, or maybe I understood the method I posted above by extending the common proxy and using those implementation you dont need to register things in the ServerProxy/CommonProxy, that is the point of this "new style" and the only time you need to worry is when you are registering them in your main class.

 

Or did I misunderstand that?

Link to comment
Share on other sites

You definitely misunderstood, what they meant was you create three classes one Called CommonProxy where things that need to happen on both sides go, then you have ServerProxy and ClientProxy which call the super method of CommonProxy. Though I don't see why it needs to be done that way. You could also put everything in ServerProxy and have ClientProxy extend ServerProxy, and call super methods. Though I just stick to using my Main Class.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I see. Well that's why I said it was a noob/rookie mistake lol. Anyway, I moved everything exceptmy ModelBakerStuff and RegisterRenders since I know that is client-side to my "CommonProxy" (ServerProxy) and just have ClientProxy extend that and call the supers and it seems like everything is working just fine. Including starting up the actual server and testing it on the client.

Link to comment
Share on other sites

Yeah, there's really only two proxy classes needed:

The common, which does everything needed by both (SSP still uses a server!) and the client, which does things the server cannot do.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.