Adding New Galaxy
From Galacticraft Wiki
Contents
Warning, This Method is Depreciated, IGalaxy No Longer Exists
Page kept for archiving purposes
Imports
IGalaxy:
import micdoodle8.mods.galacticraft.api.world.IGalaxy;
GalacticraftRegistry (Just In @Mod Class):
import micdoodle8.mods.galacticraft.api.GalacticraftRegistry;
Victor3 (Just In Galaxy Class):
import micdoodle8.mods.galacticraft.api.vector.Vector3;
StatCollector (Just In Galaxy Class):
import net.minecraft.util.StatCollector;
Creating Galaxy Class
To create a new galaxy you will need to create a class for it. The galaxy class will need to implement IGalaxy.
getGalaxyName
return StatCollector.translateToLocal("galaxy.blockyway.name"); //Change "galaxy.blockyway.name".
getXCoord
return -1; //Change This To Whatever You Need,Note: One Number Will Make It Too Far, Another Note: PixelGalaxy Add-on Use X:1.
getYCoord
return -1; //Change This To Whatever You Need,Note: One Number Will Make It Too Far, Another Note: PixelGalaxy Add-on Use Y:1.
getRGBRingColors
return new Vector3(256.0D / 256.0D, 256.0D / 256.0D, 50.0D / 256.0D); //If You Need You Can Change The Color, It's Red,Green,Blue.
@Mod Class
- Import your galaxy class, then add this variable:
public static final IGalaxy galaxyMilkyWay = new GCCoreGalaxyBlockyWay(); //This Is From GalacticraftCore File, So Change The Names.
- At your init function, you will need to register the galaxy using:
GalacticraftRegistry.registerGalaxy(GalacticraftCore.galaxyMilkyWay); //This Is From GalacticraftCore File, So Change The Names.
Notes
- You can't see your galaxy; it's empty. You will need to add a celestial body to it.