Jump to content

Adding an new SkyProvider


micdoodle8

Recommended Posts

Hey,

 

I've tried creating a new instance of my SkyProvider by adding:

 

this.setSkyProvider(new CustomSkyProvider());

 

into the constructor. Inside the render method in the sky provider I added a log output to see if the method was called, and nothing happens. Is this feature broken in the latest builds, or do you set the Sky Provider some other way?

 

Using build #269

 

Thanks.

 

Edit: After further investigation, the sky renderer works the first time you join the dimension, but after leaving and joining again it goes back to the old sky.

Link to comment
Share on other sites

So... SkyProvider is useless most of the time.

 

Wouldn't there be a way to fix that?

 

Edit: Found the problem,

FMLClientHandler.instance().getClient().theWorld instanceof CustomWorldProvider

returns true when you join the world for the first time, but after logging back in again, returns false.

Link to comment
Share on other sites

I thought you just had to register the provider and providertype, since the provider is set through the WorldClient on client-side, which gets the provider from DimensionManager.

 

Edit: In the for loop on line 230 of MinecraftServer.java, is DimensionManager.getIDs() supposed to have a length of zero? That's where I traced the problem back to.

 

Edit2: Nevermind, the problem was WorldProvider.setDimension(id) was setting the wrong variable, submitted a pull request.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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