Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Abastro

  1. "hey I have a problem and cant figure out how to solve it"

    "oh I guess u would love to hear that I know all your code and can fix ur problem in no time"

    "oh man thats great!"

     

    guess what? we dont know ur code sadly

    please show ur code and tell us how u know the values are lost and how u are accessing it

    Actually he provided all of this code using Github:

     

    My code is here on GitHub, any help/advice that anyone can offer would be greatly appreciated. :)

  2. Anyway, there is currently 2 model systems:

    1. Json models, for blocks/items

    2. Entity models for entities

    Armor is special, since it is basically item but can be worn by entities.

     

    So it has Json model as item,

    and Entity model as armor worn by entity.

  3. 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()*;
        }
    

×
×
  • Create New...

Important Information

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