Jump to content

[1.7.10][Solved] Is there any way to use Optifine on Dev Environment?


Abastro

Recommended Posts

Hi, I'm a developer of Stellar Sky mod.

I want to fix an issue with Stellar Sky & Optifine, but failed to use Optifine in dev environment.

It always ended up with:

java.lang.NoClassDefFoundError: aji, even with CodeChickenCore!

 

So is there any way to use Optifine in dev environment?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

I do not know if this will help but in your forge folder there is an eclipse assuming you are using eclipse and inside that is a minecraft environment with a mods folder and you can drop mods in there, they will load when minecraft loads this should help at runtime but not in dev environment.

Link to comment
Share on other sites

@Dijkstra ofc I have put the mods in the eclipse/mods folder.

 

@diesieben07

Impossible;

It is issue related with Clock.

When minecraft is launched, the clock always points noon on first login on SMP.

It works well after disconnecting and re-login.

Also it works well on SSP.

 

I think it is relayed with Stellar Sky's worldprovider replacement being corrupted by Optifine,

but I can't know what is happening exactly.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

On postInit, I do this:

for(Side side : Side.values())
StellarWorldProvider.preProviders[side.ordinal()] =  DimensionManager.createProviderFor(0);

DimensionManager.unregisterDimension(0);
DimensionManager.unregisterProviderType(0);
DimensionManager.registerProviderType(0, StellarWorldProvider.class, true);
DimensionManager.registerDimension(0, 0);

 

When StellarWorldProvider is my own provider overlapping the existing provider.

preProviders are the original providers registered in the DimensionManager.

 

These are how I use preProviders:

@Override
    protected void registerWorldChunkManager()
    {
this.parProvider = worldObj.isRemote? preProviders[0] : preProviders[1];

parProvider.setDimension(this.dimensionId);

        parProvider.registerWorld(this.worldObj);
        this.worldChunkMgr = parProvider.worldChunkMgr;
    }

 

Most of StellarWorldProvider's methods just calls the same method of preProviders.

Only these are different:

@Override
    public float calculateCelestialAngle(long par1, float par3)
    {
    	if(StellarSky.getManager().Earth.EcRPos == null)
    		StellarSky.getManager().Update(par1+par3, isSurfaceWorld());
    	
    	IValRef<EVector> sun = EVectorSet.ins(3).getSTemp();
    	
    	sun.set(StellarSky.getManager().Sun.GetPosition());
    	sun.set(ExtinctionRefraction.Refraction(sun, true));
    	sun.set(VecMath.normalize(sun));
    	
    	double h=Math.asin(VecMath.getZ(sun));
    	
    	if(VecMath.getCoord(sun, 0).asDouble()<0) h=Math.PI-h;
    	if(VecMath.getCoord(sun, 0).asDouble()>0 && h<0) h=h+2*Math.PI;
    	
    	sun.onUsed();
    	
    	return (float)(Spmath.fmod((h/2/Math.PI)+0.75,2*Math.PI));
    }

@Override
    public int getMoonPhase(long par1)
    {
    	if(StellarSky.getManager().Earth.EcRPos==null)
    		StellarSky.getManager().Update(par1, isSurfaceWorld());
    	return (int)(StellarSky.getManager().Moon.Phase_Time()*;
    }

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

Till this time, there were no mods discovered incompatible without Optifine.

Even terrafirmacraft is compatible in this version.

 

And I should replace overworld provider just to change the celestial angle.

(I really hate this way, and I want some PR but I strongly doubt that these kind of PR can be accepted)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

Would that work properly?

Oh I really hadn't thought about it; I must be fool. I thought I really cannot change the provider field.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

So Is DimensionManager for new dimensions?

(EDIT: the provider field is final, so I should use Reflection. But that's okay)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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.