Adding New Galaxy: Difference between revisions
(Created page with "== Imports == IGalaxy: import micdoodle8.mods.galacticraft.api.world.IGalaxy; GalacticraftRegistry (Just In @Mod Class): import micdoodle8.mods.galacticraft.api.Galact...") |
No edit summary |
||
Line 9: | Line 9: | ||
import net.minecraft.util.StatCollector; | import net.minecraft.util.StatCollector; | ||
== Creating Galaxy Class == | == Creating Galaxy Class == | ||
To | To create a new galaxy you will need to create a class for it. The galaxy class will need to implement IGalaxy. | ||
=== getGalaxyName === | === getGalaxyName === | ||
return StatCollector.translateToLocal("galaxy.blockyway.name"); //Change "galaxy.blockyway.name". | return StatCollector.translateToLocal("galaxy.blockyway.name"); //Change "galaxy.blockyway.name". | ||
Line 21: | Line 20: | ||
== @Mod Class == | == @Mod Class == | ||
* Import | * Import your galaxy class, then add this variable: | ||
public static final IGalaxy galaxyMilkyWay = new GCCoreGalaxyBlockyWay(); //This Is From GalacticraftCore File, So Change The Names. | public static final IGalaxy galaxyMilkyWay = new GCCoreGalaxyBlockyWay(); //This Is From GalacticraftCore File, So Change The Names. | ||
* At | * 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. | GalacticraftRegistry.registerGalaxy(GalacticraftCore.galaxyMilkyWay); //This Is From GalacticraftCore File, So Change The Names. | ||
== Notes | == Notes == | ||
* You | * You can't see your galaxy; it's empty. You will need to add a celestial body to it. |
Latest revision as of 04:29, 15 June 2014
Contents
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.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.