mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
more animation stuff, vaporizer tank
This commit is contained in:
parent
a21b693441
commit
0fe52691f6
@ -1652,6 +1652,7 @@ item.ammo_grenade_kampf.name=40mm Rakete
|
||||
item.ammo_fuel.name=Dieselkatusche
|
||||
item.ammo_fuel_napalm.name=Napalmkatusche
|
||||
item.ammo_fuel_phosphorus.name=WP-Katusche
|
||||
item.ammo_fuel_vaporizer.name=Vaporisierer-Katusche
|
||||
item.ammo_fuel_gas.name=Gaskatusche
|
||||
|
||||
item.folly_shell.name=Silberne Kanonenhülse
|
||||
|
||||
@ -1652,6 +1652,7 @@ item.ammo_grenade_kampf.name=40mm Rocket
|
||||
item.ammo_fuel.name=Diesel Tank
|
||||
item.ammo_fuel_napalm.name=Napalm Tank
|
||||
item.ammo_fuel_phosphorus.name=WP Tank
|
||||
item.ammo_fuel_vaporizer.name=Vaporizer Tank
|
||||
item.ammo_fuel_gas.name=Gas Tank
|
||||
|
||||
item.folly_shell.name=Silver Bullet Casing
|
||||
|
||||
BIN
assets/hbm/textures/items/ammo_fuel_vaporizer.png
Normal file
BIN
assets/hbm/textures/items/ammo_fuel_vaporizer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 280 B |
@ -357,16 +357,16 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
|
||||
if(worldObj.isRemote && !config.vPFX.isEmpty()) {
|
||||
|
||||
double motion = Vec3.createVectorHelper(motionX, motionY, motionZ).lengthVector();
|
||||
double motion = Vec3.createVectorHelper(-motionX, -motionY, -motionZ).lengthVector();
|
||||
|
||||
for (i = 0; i < motion * 3; ++i) {
|
||||
for(double d = 0; d < 1; d += 1 / motion) {
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("type", "vanillaExt");
|
||||
nbt.setString("mode", config.vPFX);
|
||||
nbt.setDouble("posX", this.posX - this.motionX * i / 1.0D);
|
||||
nbt.setDouble("posY", this.posY - this.motionY * i / 1.0D);
|
||||
nbt.setDouble("posZ", this.posZ - this.motionZ * i / 1.0D);
|
||||
nbt.setDouble("posX", (this.lastTickPosX - this.posX) * d + this.posX);
|
||||
nbt.setDouble("posY", (this.lastTickPosY - this.posY) * d + this.posY);
|
||||
nbt.setDouble("posZ", (this.lastTickPosZ - this.posZ) * d + this.posZ);
|
||||
MainRegistry.proxy.effectNT(nbt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,6 +119,7 @@ public class BulletConfigSyncingUtil {
|
||||
public static int FLAMER_NORMAL = i++;
|
||||
public static int FLAMER_NAPALM = i++;
|
||||
public static int FLAMER_WP = i++;
|
||||
public static int FLAMER_VAPORIZER = i++;
|
||||
public static int FLAMER_GAS = i++;
|
||||
|
||||
public static int R556_NORMAL = i++;
|
||||
@ -258,6 +259,7 @@ public class BulletConfigSyncingUtil {
|
||||
configSet.put(FLAMER_NORMAL, GunEnergyFactory.getFlameConfig());
|
||||
configSet.put(FLAMER_NAPALM, GunEnergyFactory.getNapalmConfig());
|
||||
configSet.put(FLAMER_WP, GunEnergyFactory.getPhosphorusConfig());
|
||||
configSet.put(FLAMER_VAPORIZER, GunEnergyFactory.getVaporizerConfig());
|
||||
configSet.put(FLAMER_GAS, GunEnergyFactory.getGasConfig());
|
||||
|
||||
configSet.put(R556_NORMAL, Gun556mmFactory.get556Config());
|
||||
|
||||
@ -21,7 +21,7 @@ public class Gun20GaugeFactory {
|
||||
|
||||
GunConfiguration config = new GunConfiguration();
|
||||
|
||||
config.rateOfFire = 20;
|
||||
config.rateOfFire = 25;
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
@ -35,13 +35,16 @@ public class Gun20GaugeFactory {
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 500))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 45, 250))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 45, 500))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 500))
|
||||
)
|
||||
.addBus("LEVER_RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0.5, 0, 0, 50))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 90, 50))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 50))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 150))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, -0.5, 0, 500))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 500))
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -76,6 +77,7 @@ public class GunEnergyFactory {
|
||||
config.config.add(BulletConfigSyncingUtil.FLAMER_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.FLAMER_NAPALM);
|
||||
config.config.add(BulletConfigSyncingUtil.FLAMER_WP);
|
||||
config.config.add(BulletConfigSyncingUtil.FLAMER_VAPORIZER);
|
||||
config.config.add(BulletConfigSyncingUtil.FLAMER_GAS);
|
||||
|
||||
return config;
|
||||
@ -184,6 +186,29 @@ public class GunEnergyFactory {
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getVaporizerConfig() {
|
||||
|
||||
BulletConfiguration bullet = getFlameConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_fuel_vaporizer;
|
||||
bullet.wear = 4;
|
||||
bullet.spread = 0.25F;
|
||||
bullet.bulletsMin = 8;
|
||||
bullet.bulletsMax = 10;
|
||||
bullet.dmgMin = 6;
|
||||
bullet.dmgMax = 10;
|
||||
bullet.maxAge = 15;
|
||||
bullet.vPFX = "flame";
|
||||
bullet.incendiary = 0;
|
||||
|
||||
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
|
||||
eff.getCurativeItems().clear();
|
||||
bullet.effects = new ArrayList();
|
||||
bullet.effects.add(new PotionEffect(eff));
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getGasConfig() {
|
||||
|
||||
BulletConfiguration bullet = getFlameConfig();
|
||||
|
||||
@ -1184,6 +1184,7 @@ public class ModItems {
|
||||
public static Item ammo_fuel;
|
||||
public static Item ammo_fuel_napalm;
|
||||
public static Item ammo_fuel_phosphorus;
|
||||
public static Item ammo_fuel_vaporizer;
|
||||
public static Item ammo_fuel_gas;
|
||||
|
||||
public static Item gun_rpg;
|
||||
@ -2972,6 +2973,7 @@ public class ModItems {
|
||||
ammo_fuel = new ItemAmmo().setUnlocalizedName("ammo_fuel").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel");
|
||||
ammo_fuel_napalm = new ItemAmmo().setUnlocalizedName("ammo_fuel_napalm").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_napalm");
|
||||
ammo_fuel_phosphorus = new ItemAmmo().setUnlocalizedName("ammo_fuel_phosphorus").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_phosphorus");
|
||||
ammo_fuel_vaporizer = new ItemAmmo().setUnlocalizedName("ammo_fuel_vaporizer").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_vaporizer");
|
||||
ammo_fuel_gas = new ItemAmmo().setUnlocalizedName("ammo_fuel_gas").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fuel_gas");
|
||||
|
||||
gun_rpg = new ItemGunBase(GunRocketFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
|
||||
@ -5089,6 +5091,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_fuel, ammo_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_fuel_napalm, ammo_fuel_napalm.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_fuel_phosphorus, ammo_fuel_phosphorus.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_fuel_vaporizer, ammo_fuel_vaporizer.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_fuel_gas, ammo_fuel_gas.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket, ammo_rocket.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_he, ammo_rocket_he.getUnlocalizedName());
|
||||
|
||||
@ -335,6 +335,16 @@ public class ItemAmmo extends Item {
|
||||
list.add(EnumChatFormatting.RED + "- Single projectile");
|
||||
list.add(EnumChatFormatting.RED + "- Highly increased wear");
|
||||
}
|
||||
if(this == ModItems.ammo_fuel_vaporizer) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Induces phosphorus burns");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Increased flame count");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Increased damage");
|
||||
list.add(EnumChatFormatting.YELLOW + "* For removing big mistakes");
|
||||
list.add(EnumChatFormatting.RED + "- Highly decreased accuracy");
|
||||
list.add(EnumChatFormatting.RED + "- Highly decreased range");
|
||||
list.add(EnumChatFormatting.RED + "- Highly increased wear");
|
||||
list.add(EnumChatFormatting.RED + "- No lingering fire");
|
||||
}
|
||||
if(this == ModItems.ammo_fuel_gas) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ No gravity");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Poison splash");
|
||||
|
||||
@ -58,5 +58,27 @@ public class HbmAnimations {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static double[] getRelevantTransformation(String bus) {
|
||||
|
||||
Animation anim = HbmAnimations.getRelevantAnim();
|
||||
|
||||
if(anim != null) {
|
||||
|
||||
BusAnimation buses = anim.animation;
|
||||
int millis = (int)(System.currentTimeMillis() - anim.startMillis);
|
||||
|
||||
BusAnimationSequence seq = buses.getBus(bus);
|
||||
|
||||
if(seq != null) {
|
||||
double[] trans = seq.getTransformation(millis);
|
||||
|
||||
if(trans != null)
|
||||
return trans;
|
||||
}
|
||||
}
|
||||
|
||||
return new double[] {0, 0, 0};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8,10 +8,7 @@ import com.hbm.items.weapon.GunBoltAction;
|
||||
import com.hbm.items.weapon.GunLeverAction;
|
||||
import com.hbm.items.weapon.GunLeverActionS;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
import com.hbm.render.anim.HbmAnimations.Animation;
|
||||
import com.hbm.render.model.ModelB92;
|
||||
import com.hbm.render.model.ModelB93;
|
||||
import com.hbm.render.model.ModelBoltAction;
|
||||
@ -91,33 +88,15 @@ public class ItemRenderGunAnim implements IItemRenderer {
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_lever_action || item.getItem() == ModItems.gun_lever_action_dark) {
|
||||
|
||||
Animation anim = HbmAnimations.getRelevantAnim();
|
||||
|
||||
if(anim != null) {
|
||||
|
||||
BusAnimation buses = anim.animation;
|
||||
int millis = (int)(System.currentTimeMillis() - anim.startMillis);
|
||||
|
||||
BusAnimationSequence rotate = buses.getBus("LEVER_ROTATE");
|
||||
|
||||
if(rotate != null) {
|
||||
double[] trans = rotate.getTransformation(millis);
|
||||
|
||||
if(trans != null) {
|
||||
GL11.glRotated(trans[2], 0.0, 0.0, 1.0);
|
||||
lever = (float) Math.toRadians(trans[2]);
|
||||
}
|
||||
}
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("LEVER_RECOIL");
|
||||
GL11.glTranslated(recoil[0], recoil[1] * 4, recoil[2]);
|
||||
|
||||
BusAnimationSequence recoil = buses.getBus("LEVER_RECOIL");
|
||||
if(recoil != null) {
|
||||
double[] trans = recoil.getTransformation(millis);
|
||||
|
||||
if(trans != null)
|
||||
GL11.glTranslated(trans[0], 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
GL11.glTranslatef(-1.5F, 0, 0);
|
||||
double[] rotation = HbmAnimations.getRelevantTransformation("LEVER_ROTATE");
|
||||
GL11.glRotated(rotation[2], 0.0, 0.0, 1.0);
|
||||
lever = (float) Math.toRadians(rotation[2] * 2);
|
||||
GL11.glTranslatef(1.5F, 0, 0);
|
||||
}
|
||||
|
||||
if((item.getItem() == ModItems.gun_lever_action_sonata) && GunLeverActionS.getRotationFromAnim(item) > 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user