Skip to content

Commit

Permalink
Add more missile configs
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGuardsman committed Mar 7, 2018
1 parent 0547c38 commit 5bcd23a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/main/java/icbm/classic/config/ConfigMissile.java
@@ -0,0 +1,18 @@
package icbm.classic.config;

import icbm.classic.ICBMClassic;
import net.minecraftforge.common.config.Config;

/** Configs for {@link icbm.classic.content.entity.EntityMissile}
* @see <a href="https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/license.md">License</a> for what you can and can't do with the code.
* Created by Dark(DarkGuardsman, Robert) on 2/28/2018.
*/
@Config(modid = ICBMClassic.DOMAIN, name = "icbmclassic/missile")
@Config.LangKey("config.icbmclassic:blast.title")
public class ConfigMissile
{
@Config.Name("speed")
@Config.Comment("Speed limiter of the missile when moving upwards out of the launcher")
@Config.RangeDouble(min = 0.0001, max = 10)
public static float LAUNCH_SPEED = 0.012F;
}
5 changes: 2 additions & 3 deletions src/main/java/icbm/classic/content/entity/EntityMissile.java
@@ -1,5 +1,6 @@
package icbm.classic.content.entity;

import icbm.classic.config.ConfigMissile;
import icbm.classic.lib.transform.vector.Pos;
import icbm.classic.lib.radar.RadarRegistry;
import icbm.classic.prefab.entity.EntityProjectile;
Expand Down Expand Up @@ -32,8 +33,6 @@
/** @Author - Calclavia */
public class EntityMissile extends EntityProjectile implements IEntityAdditionalSpawnData, IExplosiveContainer, IMissile
{
public static final float SPEED = 0.012F;

public Explosives explosiveID = Explosives.CONDENSED;
public int maxHeight = 200;
public Pos targetVector = null;
Expand Down Expand Up @@ -242,7 +241,7 @@ protected void updateMotion()
// Start the launch
if (this.lockHeight > 0)
{
this.motionY = SPEED * this.ticksInAir * (this.ticksInAir / 2);
this.motionY = ConfigMissile.LAUNCH_SPEED * this.ticksInAir * (this.ticksInAir / 2);
this.motionX = 0;
this.motionZ = 0;
this.lockHeight -= this.motionY;
Expand Down

0 comments on commit 5bcd23a

Please sign in to comment.