Search in sources :

Example 1 with Planet

use of micdoodle8.mods.galacticraft.api.galaxies.Planet in project MorePlanets by SteveKunG.

the class CelestialRegisterHelper method createMoon.

public static Moon createMoon(String name, Planet planet, float phaseShift, float distance, float orbitTime, float size, int tier, int id, Class<? extends WorldProvider> provider) {
    Moon moon = new Moon(name).setParentPlanet(planet);
    moon.setDimensionInfo(id, provider);
    moon.setPhaseShift(phaseShift);
    moon.setRelativeDistanceFromCenter(new ScalableDistance(distance, distance));
    moon.setRelativeOrbitTime(orbitTime);
    moon.setRelativeSize(size);
    moon.setTierRequired(tier);
    moon.setBodyIcon(new ResourceLocation("moreplanets:textures/gui/celestialbodies/" + name + ".png"));
    return moon;
}
Also used : ScalableDistance(micdoodle8.mods.galacticraft.api.galaxies.CelestialBody.ScalableDistance) ResourceLocation(net.minecraft.util.ResourceLocation)

Example 2 with Planet

use of micdoodle8.mods.galacticraft.api.galaxies.Planet in project MorePlanets by SteveKunG.

the class CelestialRegisterHelper method createPlanet.

public static Planet createPlanet(String name, SolarSystem solar, float phaseShift, float distance, float orbitTime, float size, int tier, int id, Class<? extends WorldProvider> provider) {
    Planet planet = new Planet(name).setParentSolarSystem(solar);
    planet.setDimensionInfo(id, provider);
    planet.setPhaseShift(phaseShift);
    planet.setRelativeDistanceFromCenter(new ScalableDistance(distance, distance));
    planet.setRelativeOrbitTime(orbitTime);
    planet.setRelativeSize(size);
    planet.setTierRequired(tier);
    planet.setBodyIcon(new ResourceLocation("moreplanets:textures/gui/celestialbodies/" + name + ".png"));
    return planet;
}
Also used : ScalableDistance(micdoodle8.mods.galacticraft.api.galaxies.CelestialBody.ScalableDistance) ResourceLocation(net.minecraft.util.ResourceLocation)

Example 3 with Planet

use of micdoodle8.mods.galacticraft.api.galaxies.Planet in project MorePlanets by SteveKunG.

the class EntityEventHandler method onLivingUpdate.

@SubscribeEvent
public void onLivingUpdate(LivingUpdateEvent event) {
    EntityLivingBase living = event.getEntityLiving();
    World world = living.world;
    if (living.isDead) {
        int id = GCCoreUtil.getDimensionID(living.world);
        PacketSimpleMP.sendToAllAround(new PacketSimpleMP(EnumSimplePacketMP.C_REMOVE_ENTITY_ID, id, String.valueOf(living.getEntityId())), living.world, id, living.getPosition(), 64);
    }
    if (living instanceof EntityPlayerMP) {
        EntityPlayerMP player = (EntityPlayerMP) living;
        if (ConfigManagerMP.enableStartedPlanet && !WorldTickEventHandler.startedDimensionData.startedDimension && !(ConfigManagerMP.startedPlanet.equals("planet.") || ConfigManagerMP.startedPlanet.equals("moon.") || ConfigManagerMP.startedPlanet.equals("satellite."))) {
            MPLog.debug("Start teleporting player to dimension {}", ConfigManagerMP.startedPlanet);
            TeleportUtil.startNewDimension(player);
            WorldTickEventHandler.startedDimensionData.startedDimension = true;
            WorldTickEventHandler.startedDimensionData.planetToBack = ConfigManagerMP.startedPlanet;
            WorldTickEventHandler.startedDimensionData.setDirty(true);
        }
        if (player.isPotionActive(MPPotions.INFECTED_SPORE_PROTECTION) || this.isInOxygen(world, player)) {
            player.removePotionEffect(MPPotions.INFECTED_SPORE);
        }
        if (player.isPotionActive(MPPotions.DARK_ENERGY_PROTECTION)) {
            player.removePotionEffect(MPPotions.DARK_ENERGY);
        }
        if (world.provider instanceof WorldProviderNibiru) {
            if (world.isRainingAt(player.getPosition()) && !this.isGodPlayer(player) && !player.isPotionActive(MPPotions.INFECTED_SPORE_PROTECTION) && world.getBiome(player.getPosition()) != MPBiomes.GREEN_VEIN) {
                player.addPotionEffect(new PotionEffect(MPPotions.INFECTED_SPORE, 40));
            }
            if (player.ticksExisted % 128 == 0 && !this.isGodPlayer(player) && !this.isInOxygen(world, player) && !player.isPotionActive(MPPotions.INFECTED_SPORE_PROTECTION) && world.getBiome(player.getPosition()) != MPBiomes.GREEN_VEIN) {
                player.addPotionEffect(new PotionEffect(MPPotions.INFECTED_SPORE, 80));
            }
        }
        if (world.provider instanceof IMeteorType) {
        // this.spawnMeteor(world, player, (IMeteorType)world.provider);
        }
    }
    if (world.provider instanceof WorldProviderNibiru) {
        if (!(living instanceof EntityPlayer) && !EntityEffectHelper.isGalacticraftMob(living) && !(living instanceof EntityJuicer)) {
            if (living.ticksExisted % 128 == 0 && world.getBiome(living.getPosition()) != MPBiomes.GREEN_VEIN) {
                living.addPotionEffect(new PotionEffect(MPPotions.INFECTED_SPORE, 80));
            }
            if (world.isRainingAt(living.getPosition()) && world.getBiome(living.getPosition()) != MPBiomes.GREEN_VEIN) {
                living.addPotionEffect(new PotionEffect(MPPotions.INFECTED_SPORE, 40));
            }
        }
    }
}
Also used : WorldProviderNibiru(stevekung.mods.moreplanets.module.planets.nibiru.dimension.WorldProviderNibiru) PotionEffect(net.minecraft.potion.PotionEffect) EntityJuicer(micdoodle8.mods.galacticraft.planets.venus.entities.EntityJuicer) EntityLivingBase(net.minecraft.entity.EntityLivingBase) EntityPlayer(net.minecraft.entity.player.EntityPlayer) PacketSimpleMP(stevekung.mods.moreplanets.network.PacketSimpleMP) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) World(net.minecraft.world.World) IMeteorType(stevekung.mods.moreplanets.world.IMeteorType) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 4 with Planet

use of micdoodle8.mods.galacticraft.api.galaxies.Planet in project Galacticraft by micdoodle8.

the class MarsModule method init.

@Override
public void init(FMLInitializationEvent event) {
    this.registerMicroBlocks();
    SchematicRegistry.registerSchematicRecipe(new SchematicTier2Rocket());
    SchematicRegistry.registerSchematicRecipe(new SchematicCargoRocket());
    GalacticraftCore.packetPipeline.addDiscriminator(6, PacketSimpleMars.class);
    this.registerTileEntities();
    this.registerCreatures();
    this.registerOtherEntities();
    MarsModule.planetMars = (Planet) new Planet("mars").setParentSolarSystem(GalacticraftCore.solarSystemSol).setRingColorRGB(0.67F, 0.1F, 0.1F).setPhaseShift(0.1667F).setRelativeSize(0.5319F).setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(1.25F, 1.25F)).setRelativeOrbitTime(1.8811610076670317634173055859803F);
    MarsModule.planetMars.setBodyIcon(new ResourceLocation(Constants.ASSET_PREFIX, "textures/gui/celestialbodies/mars.png"));
    MarsModule.planetMars.setDimensionInfo(ConfigManagerMars.dimensionIDMars, WorldProviderMars.class).setTierRequired(2);
    MarsModule.planetMars.setAtmosphere(new AtmosphereInfo(false, false, false, -1.0F, 0.3F, 0.1F));
    MarsModule.planetMars.atmosphereComponent(EnumAtmosphericGas.CO2).atmosphereComponent(EnumAtmosphericGas.ARGON).atmosphereComponent(EnumAtmosphericGas.NITROGEN);
    MarsModule.planetMars.setBiomeInfo(BiomeGenBaseMars.marsFlat);
    MarsModule.planetMars.addMobInfo(new BiomeGenBase.SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
    MarsModule.planetMars.addMobInfo(new BiomeGenBase.SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
    MarsModule.planetMars.addMobInfo(new BiomeGenBase.SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
    MarsModule.planetMars.addMobInfo(new BiomeGenBase.SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
    MarsModule.planetMars.addMobInfo(new BiomeGenBase.SpawnListEntry(EntityEvolvedEnderman.class, 10, 1, 4));
    MarsModule.planetMars.addChecklistKeys("equip_oxygen_suit", "thermal_padding");
    GalaxyRegistry.registerPlanet(MarsModule.planetMars);
    GalacticraftRegistry.registerTeleportType(WorldProviderMars.class, new TeleportTypeMars());
    GalacticraftRegistry.registerRocketGui(WorldProviderMars.class, new ResourceLocation(GalacticraftPlanets.ASSET_PREFIX, "textures/gui/mars_rocket_gui.png"));
    GalacticraftRegistry.addDungeonLoot(2, new ItemStack(MarsItems.schematic, 1, 0));
    GalacticraftRegistry.addDungeonLoot(2, new ItemStack(MarsItems.schematic, 1, 1));
    GalacticraftRegistry.addDungeonLoot(2, new ItemStack(MarsItems.schematic, 1, 2));
    CompressorRecipes.addShapelessRecipe(new ItemStack(MarsItems.marsItemBasic, 1, 3), new ItemStack(GCItems.heavyPlatingTier1), new ItemStack(GCItems.itemBasicMoon, 1, 1));
    CompressorRecipes.addShapelessRecipe(new ItemStack(MarsItems.marsItemBasic, 1, 5), new ItemStack(MarsItems.marsItemBasic, 1, 2));
    GalacticraftCore.proxy.registerFluidTexture(MarsModule.sludge, new ResourceLocation(GalacticraftPlanets.ASSET_PREFIX, "textures/misc/underbecterial.png"));
}
Also used : SchematicCargoRocket(micdoodle8.mods.galacticraft.planets.mars.schematic.SchematicCargoRocket) SchematicTier2Rocket(micdoodle8.mods.galacticraft.planets.mars.schematic.SchematicTier2Rocket) WorldProviderMars(micdoodle8.mods.galacticraft.planets.mars.dimension.WorldProviderMars) AtmosphereInfo(micdoodle8.mods.galacticraft.api.world.AtmosphereInfo) TeleportTypeMars(micdoodle8.mods.galacticraft.planets.mars.dimension.TeleportTypeMars) BiomeGenBase(net.minecraft.world.biome.BiomeGenBase) ResourceLocation(net.minecraft.util.ResourceLocation) Planet(micdoodle8.mods.galacticraft.api.galaxies.Planet) ItemStack(net.minecraft.item.ItemStack)

Example 5 with Planet

use of micdoodle8.mods.galacticraft.api.galaxies.Planet in project Galacticraft by micdoodle8.

the class VenusModule method init.

@Override
public void init(FMLInitializationEvent event) {
    this.registerMicroBlocks();
    // GalacticraftCore.packetPipeline.addDiscriminator(8, PacketSimpleVenus.class);
    this.registerTileEntities();
    this.registerCreatures();
    this.registerOtherEntities();
    VenusModule.planetVenus = (Planet) new Planet("venus").setParentSolarSystem(GalacticraftCore.solarSystemSol).setRingColorRGB(0.1F, 0.9F, 0.6F).setPhaseShift(2.0F).setRelativeDistanceFromCenter(new CelestialBody.ScalableDistance(0.75F, 0.75F)).setRelativeOrbitTime(0.61527929901423877327491785323111F);
    VenusModule.planetVenus.setBodyIcon(new ResourceLocation(Constants.ASSET_PREFIX, "textures/gui/celestialbodies/venus.png"));
    VenusModule.planetVenus.setDimensionInfo(ConfigManagerVenus.dimensionIDVenus, WorldProviderVenus.class).setTierRequired(3);
    VenusModule.planetVenus.setAtmosphere(new AtmosphereInfo(false, false, true, 5.0F, 0.3F, 54.0F));
    VenusModule.planetVenus.atmosphereComponent(EnumAtmosphericGas.CO2).atmosphereComponent(EnumAtmosphericGas.NITROGEN);
    VenusModule.planetVenus.setBiomeInfo(BiomeGenBaseVenus.venusFlat, BiomeGenBaseVenus.venusMountain, BiomeGenBaseVenus.venusValley);
    VenusModule.planetVenus.addMobInfo(new SpawnListEntry(EntityEvolvedZombie.class, 8, 2, 3));
    VenusModule.planetVenus.addMobInfo(new SpawnListEntry(EntityEvolvedSpider.class, 8, 2, 3));
    VenusModule.planetVenus.addMobInfo(new SpawnListEntry(EntityEvolvedSkeleton.class, 8, 2, 3));
    VenusModule.planetVenus.addMobInfo(new SpawnListEntry(EntityEvolvedCreeper.class, 8, 2, 3));
    VenusModule.planetVenus.addMobInfo(new SpawnListEntry(EntityEvolvedEnderman.class, 10, 1, 4));
    VenusModule.planetVenus.addChecklistKeys("equip_oxygen_suit", "equip_shield_controller", "thermal_padding_t2");
    GalaxyRegistry.registerPlanet(VenusModule.planetVenus);
    GalacticraftRegistry.registerTeleportType(WorldProviderVenus.class, new TeleportTypeVenus());
    GalacticraftRegistry.registerRocketGui(WorldProviderVenus.class, new ResourceLocation(GalacticraftPlanets.ASSET_PREFIX, "textures/gui/venus_rocket_gui.png"));
    GalacticraftRegistry.addDungeonLoot(3, new ItemStack(VenusItems.volcanicPickaxe, 1, 0));
    GalacticraftRegistry.addDungeonLoot(3, new ItemStack(VenusItems.basicItem, 1, 0));
    GalacticraftRegistry.registerGear(Constants.GEAR_ID_SHIELD_CONTROLLER, EnumExtendedInventorySlot.SHIELD_CONTROLLER, new ItemStack(VenusItems.basicItem, 1, 0));
    GalacticraftRegistry.registerGear(Constants.GEAR_ID_THERMAL_PADDING_T2_HELMET, EnumExtendedInventorySlot.THERMAL_HELMET, new ItemStack(VenusItems.thermalPaddingTier2, 1, 0));
    GalacticraftRegistry.registerGear(Constants.GEAR_ID_THERMAL_PADDING_T2_CHESTPLATE, EnumExtendedInventorySlot.THERMAL_CHESTPLATE, new ItemStack(VenusItems.thermalPaddingTier2, 1, 1));
    GalacticraftRegistry.registerGear(Constants.GEAR_ID_THERMAL_PADDING_T2_LEGGINGS, EnumExtendedInventorySlot.THERMAL_LEGGINGS, new ItemStack(VenusItems.thermalPaddingTier2, 1, 2));
    GalacticraftRegistry.registerGear(Constants.GEAR_ID_THERMAL_PADDING_T2_BOOTS, EnumExtendedInventorySlot.THERMAL_BOOTS, new ItemStack(VenusItems.thermalPaddingTier2, 1, 3));
    GalacticraftCore.proxy.registerFluidTexture(VenusModule.sulphuricAcid, new ResourceLocation(GalacticraftPlanets.ASSET_PREFIX, "textures/misc/underacid.png"));
}
Also used : AtmosphereInfo(micdoodle8.mods.galacticraft.api.world.AtmosphereInfo) SpawnListEntry(net.minecraft.world.biome.BiomeGenBase.SpawnListEntry) TeleportTypeVenus(micdoodle8.mods.galacticraft.planets.venus.dimension.TeleportTypeVenus) ResourceLocation(net.minecraft.util.ResourceLocation) Planet(micdoodle8.mods.galacticraft.api.galaxies.Planet) ItemStack(net.minecraft.item.ItemStack) WorldProviderVenus(micdoodle8.mods.galacticraft.planets.venus.dimension.WorldProviderVenus)

Aggregations

ItemStack (net.minecraft.item.ItemStack)7 ResourceLocation (net.minecraft.util.ResourceLocation)7 IGalacticraftWorldProvider (micdoodle8.mods.galacticraft.api.world.IGalacticraftWorldProvider)6 Planet (micdoodle8.mods.galacticraft.api.galaxies.Planet)4 AtmosphereInfo (micdoodle8.mods.galacticraft.api.world.AtmosphereInfo)4 Vector3f (org.lwjgl.util.vector.Vector3f)4 ScalableDistance (micdoodle8.mods.galacticraft.api.galaxies.CelestialBody.ScalableDistance)3 BlockVec3 (micdoodle8.mods.galacticraft.api.vector.BlockVec3)3 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)3 CelestialBodyRenderEvent (micdoodle8.mods.galacticraft.api.event.client.CelestialBodyRenderEvent)2 SpaceStationRecipe (micdoodle8.mods.galacticraft.api.recipe.SpaceStationRecipe)2 Vector3 (micdoodle8.mods.galacticraft.api.vector.Vector3)2 Entity (net.minecraft.entity.Entity)2 EntityLivingBase (net.minecraft.entity.EntityLivingBase)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 PotionEffect (net.minecraft.potion.PotionEffect)2 WorldProvider (net.minecraft.world.WorldProvider)2 WorldServer (net.minecraft.world.WorldServer)2 SpawnListEntry (net.minecraft.world.biome.BiomeGenBase.SpawnListEntry)2 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)2