Advertisement
Guest User

Untitled

a guest
Aug 17th, 2013
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.03 KB | None | 0 0
  1. import micdoodle8.mods.galacticraft.api.world.IExitHeight;
  2. import micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider;
  3. import micdoodle8.mods.galacticraft.api.world.ISolarLevel;
  4. import net.minecraft.world.WorldProvider;
  5. import net.minecraft.world.chunk.IChunkProvider;
  6. import PlanetWorldChunkProvider;
  7. import PlanetWorldChunkManager;
  8.  
  9. public class PlanetWorldProvider extends WorldProvider implements
  10.         IGalacticraftWorldProvider, IExitHeight, ISolarLevel {
  11.  
  12.     @Override
  13.     public double getSolarEnergyMultiplier() {
  14.         return 3.0;//This is optional, it allows you to change how much energy is produced by solar panels from the default
  15.     }
  16.  
  17.     @Override
  18.     public double getYCoordinateToTeleport() {
  19.         return 1200;//This is from IExitHeight, and it is at this y-coord that the planet selection gui opens up. 1200 is the overworld value
  20.     }
  21.  
  22.     @Override
  23.     public float getGravity() {
  24.         return 1.0F;//This is pretty explanatory, 1.0 is like the overworld.
  25.     }
  26.  
  27.     @Override
  28.     public double getMeteorFrequency() {
  29.         return 7;//This determines how often meteors spawn in the world. 7 is the value from the moon, i'm pretty sure
  30.     }
  31.  
  32.     @Override
  33.     public double getFuelUsageMultiplier() {
  34.         return 1.0;//This helps determine how much fuel is used up, and should probably be related to the gravity level
  35.     }
  36.  
  37.     @Override
  38.     public boolean canSpaceshipTierPass(int tier) {
  39.         return tier>0;//As the only current space ship in the game is tier one, if you made the required tier greater than one the planet would be unaccesible
  40.     }
  41.  
  42.     @Override
  43.     public String getDimensionName() {
  44.         return "TutorialPlanet";//This is how you reference the planet, and this value should be unique between dimensions
  45.     }
  46.    
  47.     @Override
  48.     public void registerWorldChunkManager()
  49.     {
  50.         this.worldChunkMgr = new PlanetWorldChunkManager();
  51.     }
  52.     @Override
  53.     public IChunkProvider createChunkGenerator()
  54.     {
  55.         return new PlanetWorldChunkProvider(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled());
  56.     }
  57.  
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement