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 Create New Galaxy You Will Need To Create A Class For It.
To create a new galaxy you will need to create a class for it. The galaxy class will need to implement IGalaxy.
Galaxy Class Will Need To Implements 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 Your Galaxy Class, Then Add This Variable:
* 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 Your init Function You Will Need To Register The Galaxy Using:
* 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 Can't See Your Galaxy, It's Empty, You Will Need To Add Celestial Body To It.
* 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

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.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis