soyuz model, launch smoke, more missile tweaks, gerald the android
150
assets/hbm/models/missile_parts/mp_w_15_n2.obj
Normal file
@ -0,0 +1,150 @@
|
||||
# Blender v2.76 (sub 0) OBJ File: 'mp_w_15_n2.blend'
|
||||
# www.blender.org
|
||||
o Cone
|
||||
v 0.000000 1.000000 -0.750000
|
||||
v 0.000000 3.000000 0.000000
|
||||
v 0.375000 1.000000 -0.649519
|
||||
v 0.649519 1.000000 -0.375000
|
||||
v 0.750000 1.000000 0.000000
|
||||
v 0.649519 1.000000 0.375000
|
||||
v 0.375000 1.000000 0.649519
|
||||
v 0.000000 1.000000 0.750000
|
||||
v -0.375000 1.000000 0.649519
|
||||
v -0.649519 1.000000 0.375000
|
||||
v -0.750000 1.000000 0.000000
|
||||
v -0.649519 1.000000 -0.375000
|
||||
v -0.375000 1.000000 -0.649519
|
||||
v -0.000000 0.000000 -0.750000
|
||||
v 0.375000 0.000000 -0.649519
|
||||
v 0.649519 0.000000 -0.375000
|
||||
v 0.750000 0.000000 0.000000
|
||||
v 0.649519 0.000000 0.375000
|
||||
v 0.375000 0.000000 0.649519
|
||||
v 0.000000 0.000000 0.750000
|
||||
v -0.375000 0.000000 0.649519
|
||||
v -0.649519 0.000000 0.375000
|
||||
v -0.750000 0.000000 0.000000
|
||||
v -0.649519 0.000000 -0.375000
|
||||
v -0.375000 0.000000 -0.649519
|
||||
vt 0.891892 0.216216
|
||||
vt 0.851351 0.675676
|
||||
vt 0.810811 0.216216
|
||||
vt 0.729730 0.216216
|
||||
vt 0.689189 0.675676
|
||||
vt 0.648649 0.216216
|
||||
vt 0.972973 0.216216
|
||||
vt 0.932432 0.675676
|
||||
vt 0.081081 0.216216
|
||||
vt 0.040541 0.675676
|
||||
vt 0.000000 0.216216
|
||||
vt 0.162162 0.216216
|
||||
vt 0.121622 0.675676
|
||||
vt 0.243243 0.216216
|
||||
vt 0.202703 0.675676
|
||||
vt 0.324324 0.216216
|
||||
vt 0.283784 0.675676
|
||||
vt 0.405405 0.216216
|
||||
vt 0.364865 0.675676
|
||||
vt 0.486486 0.216216
|
||||
vt 0.445946 0.675676
|
||||
vt 0.567568 0.216216
|
||||
vt 0.527027 0.675676
|
||||
vt 0.770270 0.675676
|
||||
vt 0.608108 0.675676
|
||||
vt 0.891892 0.000000
|
||||
vt 0.972973 0.000000
|
||||
vt 0.318543 0.837838
|
||||
vt 0.083972 0.973267
|
||||
vt 0.083972 0.702408
|
||||
vt 0.324324 0.000000
|
||||
vt 0.405405 0.000000
|
||||
vt 0.648649 0.000000
|
||||
vt 0.729730 0.000000
|
||||
vt 0.162162 0.000000
|
||||
vt 0.243243 0.000000
|
||||
vt 0.567568 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.081081 0.000000
|
||||
vt 0.486486 0.000000
|
||||
vt 0.810811 0.000000
|
||||
vt 0.162162 0.681457
|
||||
vt 0.240353 0.702408
|
||||
vt 0.297592 0.759648
|
||||
vt 0.297592 0.916028
|
||||
vt 0.240352 0.973267
|
||||
vt 0.162162 0.994218
|
||||
vt 0.026733 0.916028
|
||||
vt 0.005782 0.837838
|
||||
vt 0.026733 0.759648
|
||||
vn -0.664800 0.340600 -0.664800
|
||||
vn 0.243300 0.340600 -0.908200
|
||||
vn -0.908200 0.340600 -0.243300
|
||||
vn -0.908200 0.340600 0.243300
|
||||
vn -0.664800 0.340600 0.664800
|
||||
vn -0.243300 0.340600 0.908200
|
||||
vn 0.243300 0.340600 0.908200
|
||||
vn 0.664800 0.340600 0.664800
|
||||
vn 0.908200 0.340600 0.243300
|
||||
vn 0.908200 0.340600 -0.243300
|
||||
vn -0.243300 0.340600 -0.908200
|
||||
vn 0.664800 0.340600 -0.664800
|
||||
vn -0.965900 0.000000 -0.258800
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.707100 0.000000 0.707100
|
||||
vn 0.258800 -0.000000 -0.965900
|
||||
vn -0.258800 0.000000 0.965900
|
||||
vn 0.707100 0.000000 -0.707100
|
||||
vn -0.965900 0.000000 0.258800
|
||||
vn 0.965900 0.000000 0.258800
|
||||
vn -0.707100 0.000000 -0.707100
|
||||
vn 0.258800 -0.000000 0.965900
|
||||
vn -0.707100 0.000000 0.707100
|
||||
vn -0.258800 0.000000 -0.965900
|
||||
vn 0.965900 0.000000 -0.258800
|
||||
s off
|
||||
f 12/1/1 2/2/1 13/3/1
|
||||
f 1/4/2 2/5/2 3/6/2
|
||||
f 11/7/3 2/8/3 12/1/3
|
||||
f 10/9/4 2/10/4 11/11/4
|
||||
f 9/12/5 2/13/5 10/9/5
|
||||
f 8/14/6 2/15/6 9/12/6
|
||||
f 7/16/7 2/17/7 8/14/7
|
||||
f 6/18/8 2/19/8 7/16/8
|
||||
f 5/20/9 2/21/9 6/18/9
|
||||
f 4/22/10 2/23/10 5/20/10
|
||||
f 13/3/11 2/24/11 1/4/11
|
||||
f 3/6/12 2/25/12 4/22/12
|
||||
f 12/1/13 24/26/13 23/27/13
|
||||
f 17/28/14 21/29/14 25/30/14
|
||||
f 7/16/15 19/31/15 18/32/15
|
||||
f 3/6/16 15/33/16 14/34/16
|
||||
f 9/12/17 21/35/17 20/36/17
|
||||
f 4/22/18 16/37/18 15/33/18
|
||||
f 11/11/19 23/38/19 22/39/19
|
||||
f 6/18/20 18/32/20 17/40/20
|
||||
f 13/3/21 25/41/21 24/26/21
|
||||
f 8/14/22 20/36/22 19/31/22
|
||||
f 10/9/23 22/39/23 21/35/23
|
||||
f 1/4/24 14/34/24 25/41/24
|
||||
f 5/20/25 17/40/25 16/37/25
|
||||
f 11/7/13 12/1/13 23/27/13
|
||||
f 25/30/14 14/42/14 17/28/14
|
||||
f 15/43/14 16/44/14 17/28/14
|
||||
f 17/28/14 18/45/14 19/46/14
|
||||
f 19/46/14 20/47/14 17/28/14
|
||||
f 21/29/14 22/48/14 25/30/14
|
||||
f 23/49/14 24/50/14 25/30/14
|
||||
f 14/42/14 15/43/14 17/28/14
|
||||
f 17/28/14 20/47/14 21/29/14
|
||||
f 22/48/14 23/49/14 25/30/14
|
||||
f 6/18/15 7/16/15 18/32/15
|
||||
f 1/4/16 3/6/16 14/34/16
|
||||
f 8/14/17 9/12/17 20/36/17
|
||||
f 3/6/18 4/22/18 15/33/18
|
||||
f 10/9/19 11/11/19 22/39/19
|
||||
f 5/20/20 6/18/20 17/40/20
|
||||
f 12/1/21 13/3/21 24/26/21
|
||||
f 7/16/22 8/14/22 19/31/22
|
||||
f 9/12/23 10/9/23 21/35/23
|
||||
f 13/3/24 1/4/24 25/41/24
|
||||
f 4/22/25 5/20/25 16/37/25
|
||||
9984
assets/hbm/models/soyuz.obj
Normal file
BIN
assets/hbm/textures/blocks/compact_launcher.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
assets/hbm/textures/items/polaroid_memento.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
assets/hbm/textures/items/sat_gerald.png
Normal file
|
After Width: | Height: | Size: 662 B |
5
assets/hbm/textures/items/sat_gerald.png.mcmeta
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 2
|
||||
}
|
||||
}
|
||||
BIN
assets/hbm/textures/models/missile_parts/warheads/mp_w_15_n2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
BIN
assets/hbm/textures/models/soyuz/booster.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/hbm/textures/models/soyuz/boosterside.png
Normal file
|
After Width: | Height: | Size: 343 B |
BIN
assets/hbm/textures/models/soyuz/bottomstage.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/hbm/textures/models/soyuz/engineblock.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
assets/hbm/textures/models/soyuz/les.png
Normal file
|
After Width: | Height: | Size: 484 B |
BIN
assets/hbm/textures/models/soyuz/lesthrusters.png
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
assets/hbm/textures/models/soyuz/mainengines.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
assets/hbm/textures/models/soyuz/payload.png
Normal file
|
After Width: | Height: | Size: 759 B |
BIN
assets/hbm/textures/models/soyuz/payloadblocks.png
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
assets/hbm/textures/models/soyuz/sideengines.png
Normal file
|
After Width: | Height: | Size: 302 B |
BIN
assets/hbm/textures/models/soyuz/topstage.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
@ -3,6 +3,8 @@ package com.hbm.entity.missile;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.logic.IChunkLoader;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
@ -41,6 +43,8 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
double velocity;
|
||||
double decelY;
|
||||
double accelXZ;
|
||||
float fuel;
|
||||
float consumption;
|
||||
private Ticket loaderTicket;
|
||||
public int health = 50;
|
||||
MissileMultipart template;
|
||||
@ -107,7 +111,7 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
if(template.fins != null)
|
||||
this.dataWatcher.updateObject(11, Item.getIdFromItem(template.fins.part));
|
||||
else
|
||||
this.dataWatcher.addObject(11, Integer.valueOf(0));
|
||||
this.dataWatcher.updateObject(11, Integer.valueOf(0));
|
||||
this.dataWatcher.updateObject(12, Item.getIdFromItem(template.thruster.part));
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
@ -116,6 +120,12 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
|
||||
velocity = 0.0;
|
||||
|
||||
ItemMissile fuselage = (ItemMissile) template.fuselage.part;
|
||||
ItemMissile thruster = (ItemMissile) template.thruster.part;
|
||||
|
||||
this.fuel = (Float)fuselage.attributes[1];
|
||||
this.consumption = (Float)thruster.attributes[1];
|
||||
|
||||
this.setSize(1.5F, 1.5F);
|
||||
}
|
||||
|
||||
@ -158,6 +168,8 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
startX = nbt.getInteger("sX");
|
||||
startZ = nbt.getInteger("sZ");
|
||||
velocity = nbt.getInteger("veloc");
|
||||
fuel = nbt.getFloat("fuel");
|
||||
consumption = nbt.getFloat("consumption");
|
||||
this.dataWatcher.updateObject(9, nbt.getInteger("warhead"));
|
||||
this.dataWatcher.updateObject(10, nbt.getInteger("fuselage"));
|
||||
this.dataWatcher.updateObject(11, nbt.getInteger("fins"));
|
||||
@ -179,6 +191,8 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
nbt.setInteger("sX", startX);
|
||||
nbt.setInteger("sZ", startZ);
|
||||
nbt.setDouble("veloc", velocity);
|
||||
nbt.setFloat("fuel", fuel);
|
||||
nbt.setFloat("consumption", consumption);
|
||||
nbt.setInteger("warhead", this.dataWatcher.getWatchableObjectInt(9));
|
||||
nbt.setInteger("fuselage", this.dataWatcher.getWatchableObjectInt(10));
|
||||
nbt.setInteger("fins", this.dataWatcher.getWatchableObjectInt(11));
|
||||
@ -222,30 +236,37 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
this.setLocationAndAngles(posX + this.motionX * velocity, posY + this.motionY * velocity, posZ + this.motionZ * velocity, 0, 0);
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(fuel > 0) {
|
||||
|
||||
fuel -= consumption;
|
||||
|
||||
this.motionY -= decelY * velocity;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= accelXZ * velocity;
|
||||
vector.zCoord *= accelXZ * velocity;
|
||||
|
||||
if (motionY > 0) {
|
||||
motionX += vector.xCoord;
|
||||
motionZ += vector.zCoord;
|
||||
}
|
||||
|
||||
if (motionY < 0) {
|
||||
motionX -= vector.xCoord;
|
||||
motionZ -= vector.zCoord;
|
||||
}
|
||||
|
||||
if(velocity < 5)
|
||||
velocity += 0.01;
|
||||
} else {
|
||||
|
||||
this.motionY -= decelY * velocity;
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(targetX - startX, 0, targetZ - startZ);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= accelXZ * velocity;
|
||||
vector.zCoord *= accelXZ * velocity;
|
||||
|
||||
if (motionY > 0) {
|
||||
motionX += vector.xCoord;
|
||||
motionZ += vector.zCoord;
|
||||
motionX *= 0.99;
|
||||
motionZ *= 0.99;
|
||||
motionY -= 0.1;
|
||||
}
|
||||
|
||||
if (motionY < 0) {
|
||||
motionX -= vector.xCoord;
|
||||
motionZ -= vector.zCoord;
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
// this.worldObj.spawnEntityInWorld(new EntitySmokeFX(this.worldObj,
|
||||
// this.posX, this.posY, this.posZ, 0.0, 0.0, 0.0));
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacket(posX, posY, posZ, 2),
|
||||
new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 300));
|
||||
|
||||
if (this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air
|
||||
&& this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.water
|
||||
&& this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.flowing_water) {
|
||||
@ -257,10 +278,10 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.worldObj.isRemote)
|
||||
MainRegistry.proxy.particleControl(posX, posY, posZ, 2);
|
||||
|
||||
loadNeighboringChunks((int)(posX / 16), (int)(posZ / 16));
|
||||
|
||||
if(velocity < 5)
|
||||
velocity += 0.01;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -282,18 +303,31 @@ public class EntityMissileCustom extends Entity implements IChunkLoader {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, strength, true, true, true);
|
||||
break;
|
||||
case INC:
|
||||
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, strength, true, true, true);
|
||||
break;
|
||||
case CLUSTER:
|
||||
break;
|
||||
case BUSTER:
|
||||
ExplosionLarge.buster(worldObj, posX, posY, posZ, Vec3.createVectorHelper(motionX, motionY, motionZ), strength, strength * 4);
|
||||
break;
|
||||
case NUCLEAR:
|
||||
break;
|
||||
case TX:
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int) strength, posX, posY, posZ));
|
||||
EntityNukeCloudSmall nuke = new EntityNukeCloudSmall(worldObj, 1000, strength * 0.005F);
|
||||
nuke.posX = posX;
|
||||
nuke.posY = posY;
|
||||
nuke.posZ = posZ;
|
||||
worldObj.spawnEntityInWorld(nuke);
|
||||
break;
|
||||
case BALEFIRE:
|
||||
break;
|
||||
case N2:
|
||||
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFacNoRad(worldObj, (int) strength, posX, posY, posZ));
|
||||
EntityNukeCloudSmall n2 = new EntityNukeCloudSmall(worldObj, 1000, strength * 0.005F);
|
||||
n2.posX = posX;
|
||||
n2.posY = posY;
|
||||
n2.posZ = posZ;
|
||||
worldObj.spawnEntityInWorld(n2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@ -203,6 +203,16 @@ public class ExplosionLarge {
|
||||
spawnShrapnels(world, x, y, z, shrapnelFunction((int)strength));
|
||||
}
|
||||
|
||||
public static void buster(World world, double x, double y, double z, Vec3 vector, float strength, float depth) {
|
||||
|
||||
vector = vector.normalize();
|
||||
|
||||
for(int i = 0; i < depth; i += 2) {
|
||||
|
||||
world.createExplosion((Entity)null, x + vector.xCoord * i, y + vector.yCoord * i, z + vector.zCoord * i, strength, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static void jolt(World world, double posX, double posY, double posZ, double strength, int count, double vel) {
|
||||
|
||||
for(int j = 0; j < count; j++) {
|
||||
|
||||
@ -905,6 +905,7 @@ public class ModItems {
|
||||
public static Item mp_warhead_15_nuclear;
|
||||
public static Item mp_warhead_15_nuclear_shark;
|
||||
public static Item mp_warhead_15_boxcar;
|
||||
public static Item mp_warhead_15_n2;
|
||||
public static Item mp_warhead_20_he;
|
||||
|
||||
public static Item mp_chip_1;
|
||||
@ -933,6 +934,7 @@ public class ModItems {
|
||||
public static Item sat_foeq;
|
||||
public static Item sat_resonator;
|
||||
public static Item sat_miner;
|
||||
public static Item sat_gerald;
|
||||
public static Item sat_chip;
|
||||
public static Item sat_interface;
|
||||
|
||||
@ -2417,6 +2419,7 @@ public class ModItems {
|
||||
sat_foeq = new ItemSatChip().setUnlocalizedName("sat_foeq").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_foeq");
|
||||
sat_resonator = new ItemSatChip().setUnlocalizedName("sat_resonator").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_resonator");
|
||||
sat_miner = new ItemSatChip().setUnlocalizedName("sat_miner").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_miner");
|
||||
sat_gerald = new ItemSatChip().setUnlocalizedName("sat_gerald").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_gerald");
|
||||
sat_chip = new ItemSatChip().setUnlocalizedName("sat_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_chip");
|
||||
sat_interface = new ItemSatInterface().setUnlocalizedName("sat_interface").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_interface");
|
||||
|
||||
@ -2488,14 +2491,15 @@ public class ModItems {
|
||||
mp_fuselage_20_kerosene = new ItemMissile().makeFuselage(FuelType.KEROSENE, 1000F, PartSize.SIZE_20, PartSize.SIZE_20) .setUnlocalizedName("mp_f_20").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_fuselage");
|
||||
mp_warhead_10_he = new ItemMissile().makeWarhead(WarheadType.HE, 15F, 1.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_he").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_incendiary = new ItemMissile().makeWarhead(WarheadType.INC, 15F, 1.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_incendiary").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_buster = new ItemMissile().makeWarhead(WarheadType.BUSTER, 15F, 1.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_buster").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_nuclear = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 15F, 1.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_nuclear").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_nuclear_large = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 15F, 2.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_nuclear_large").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_he = new ItemMissile().makeWarhead(WarheadType.HE, 15F, 2.5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_he").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_incendiary = new ItemMissile().makeWarhead(WarheadType.INC, 15F, 2.5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_incendiary").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_nuclear = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 15F, 5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_nuclear").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_nuclear_shark = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 15F, 5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_nuclear_shark").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_buster = new ItemMissile().makeWarhead(WarheadType.BUSTER, 5F, 1.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_buster").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_nuclear = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 35F, 1.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_nuclear").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_10_nuclear_large = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 75F, 2.5F, PartSize.SIZE_10) .setUnlocalizedName("mp_warhead_10_nuclear_large").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_he = new ItemMissile().makeWarhead(WarheadType.HE, 50F, 2.5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_he").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_incendiary = new ItemMissile().makeWarhead(WarheadType.INC, 35F, 2.5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_incendiary").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_nuclear = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 125F, 5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_nuclear").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_nuclear_shark = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 125F, 5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_nuclear_shark").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_boxcar = new ItemMissile().makeWarhead(WarheadType.NUCLEAR, 15F, 7.5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_boxcar").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_15_n2 = new ItemMissile().makeWarhead(WarheadType.N2, 100F, 5F, PartSize.SIZE_15) .setUnlocalizedName("mp_warhead_15_n2").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_warhead_20_he = new ItemMissile().makeWarhead(WarheadType.HE, 15F, 1F, PartSize.SIZE_20) .setUnlocalizedName("mp_w_20").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_warhead");
|
||||
mp_chip_1 = new ItemMissile().makeChip(0.1F) .setUnlocalizedName("mp_c_1").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_c_1");
|
||||
mp_chip_2 = new ItemMissile().makeChip(0.05F) .setUnlocalizedName("mp_c_2").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":mp_c_2");
|
||||
@ -4264,6 +4268,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(mp_warhead_15_nuclear, mp_warhead_15_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mp_warhead_15_nuclear_shark, mp_warhead_15_nuclear_shark.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mp_warhead_15_boxcar, mp_warhead_15_boxcar.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mp_warhead_15_n2, mp_warhead_15_n2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mp_warhead_20_he, mp_warhead_20_he.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mp_chip_1, mp_chip_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(mp_chip_2, mp_chip_2.getUnlocalizedName());
|
||||
@ -4289,6 +4294,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(sat_foeq, sat_foeq.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_resonator, sat_resonator.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_miner, sat_miner.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_gerald, sat_gerald.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_chip, sat_chip.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_interface, sat_interface.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -163,6 +163,7 @@ public class ItemAmmo extends Item {
|
||||
if(this == ModItems.ammo_rocket_rpc) {
|
||||
list.add(EnumChatFormatting.BLUE + "+ Chainsaw");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Penetrating");
|
||||
list.add(EnumChatFormatting.BLUE + "+ Not affected by gravity");
|
||||
list.add(EnumChatFormatting.RED + "- Increased wear");
|
||||
list.add(EnumChatFormatting.RED + "- Non-explosive");
|
||||
list.add(EnumChatFormatting.YELLOW + "* Uhhhh");
|
||||
|
||||
@ -72,7 +72,10 @@ public class ItemMissile extends Item {
|
||||
NUCLEAR,
|
||||
TX,
|
||||
N2,
|
||||
BALEFIRE
|
||||
BALEFIRE,
|
||||
SCHRAB,
|
||||
TAINT,
|
||||
CLOUD
|
||||
}
|
||||
|
||||
public enum FuelType {
|
||||
@ -215,6 +218,12 @@ public class ItemMissile extends Item {
|
||||
return "N²";
|
||||
case BALEFIRE:
|
||||
return "BF";
|
||||
case SCHRAB:
|
||||
return "Schrabidium";
|
||||
case TAINT:
|
||||
return "Taint";
|
||||
case CLOUD:
|
||||
return "Cloud";
|
||||
default:
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ import com.hbm.entity.particle.*;
|
||||
import com.hbm.entity.projectile.*;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.particle.ParticleContrail;
|
||||
import com.hbm.particle.ParticleSmokePlume;
|
||||
import com.hbm.render.block.*;
|
||||
import com.hbm.render.entity.*;
|
||||
import com.hbm.render.item.*;
|
||||
@ -487,5 +488,19 @@ public class ClientProxy extends ServerProxy
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//version 2, now with strings!
|
||||
@Override
|
||||
public void spawnParticle(double x, double y, double z, String type, float args[]) {
|
||||
|
||||
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
TextureManager man = Minecraft.getMinecraft().renderEngine;
|
||||
|
||||
if("launchsmoke".equals(type)) {
|
||||
ParticleSmokePlume contrail = new ParticleSmokePlume(man, world, x, y, z);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(contrail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -315,6 +315,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom missileCarrier = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileCarrier.obj"));
|
||||
public static final IModelCustom missileBooster = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileBooster.obj"));
|
||||
public static final IModelCustom minerRocket = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/minerRocket.obj"));
|
||||
public static final IModelCustom soyuz = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/soyuz.obj"));
|
||||
|
||||
//Missile Parts
|
||||
public static final IModelCustom missile_assembly = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_assembly.obj"));
|
||||
@ -357,6 +358,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom mp_w_15_incendiary = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_parts/mp_w_15_incendiary.obj"));
|
||||
public static final IModelCustom mp_w_15_nuclear = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_parts/mp_w_15_nuclear.obj"));
|
||||
public static final IModelCustom mp_w_15_boxcar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_parts/mp_w_15_boxcar.obj"));
|
||||
public static final IModelCustom mp_w_15_n2 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_parts/mp_w_15_n2.obj"));
|
||||
public static final IModelCustom mp_w_20 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missile_parts/mp_w_20.obj"));
|
||||
|
||||
////Texture Entities
|
||||
@ -407,6 +409,19 @@ public class ResourceManager {
|
||||
public static final ResourceLocation missileMicroSchrab_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroSchrab.png");
|
||||
public static final ResourceLocation missileMicroEMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroEMP.png");
|
||||
|
||||
public static final ResourceLocation soyuz_engineblock = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/engineblock.png");
|
||||
public static final ResourceLocation soyuz_bottomstage = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/bottomstage.png");
|
||||
public static final ResourceLocation soyuz_topstage = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/topstage.png");
|
||||
public static final ResourceLocation soyuz_payload = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/payload.png");
|
||||
public static final ResourceLocation soyuz_payloadblocks = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/payloadblocks.png");
|
||||
public static final ResourceLocation soyuz_les = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/les.png");
|
||||
public static final ResourceLocation soyuz_lesthrusters = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/lesthrusters.png");
|
||||
public static final ResourceLocation soyuz_mainengines = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/mainengines.png");
|
||||
public static final ResourceLocation soyuz_sideengines = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/sideengines.png");
|
||||
public static final ResourceLocation soyuz_booster = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/booster.png");
|
||||
public static final ResourceLocation soyuz_boosterside = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz/boosterside.png");
|
||||
public static final ResourceLocation soyuz_memento = new ResourceLocation(RefStrings.MODID, "textures/items/polaroid_memento.png");
|
||||
|
||||
//Missile Parts
|
||||
public static final ResourceLocation missile_assembly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_assembly.png");
|
||||
public static final ResourceLocation strut_tex = new ResourceLocation(RefStrings.MODID, "textures/models/strut.png");
|
||||
@ -486,4 +501,5 @@ public class ResourceManager {
|
||||
public static final ResourceLocation mp_w_15_incendiary_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_parts/warheads/mp_w_15_incendiary.png");
|
||||
public static final ResourceLocation mp_w_15_nuclear_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_parts/warheads/mp_w_15_nuclear.png");
|
||||
public static final ResourceLocation mp_w_15_nuclear_shark_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_parts/warheads/mp_w_15_nuclear_shark.png");
|
||||
public static final ResourceLocation mp_w_15_n2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_parts/warheads/mp_w_15_n2.png");
|
||||
}
|
||||
|
||||
@ -9,9 +9,9 @@ public class ServerProxy
|
||||
|
||||
public void registerTileEntitySpecialRenderer() { }
|
||||
|
||||
public void particleControl(double x, double y, double z, int type) {
|
||||
|
||||
}
|
||||
public void particleControl(double x, double y, double z, int type) { }
|
||||
|
||||
public void spawnParticle(double x, double y, double z, String type, float[] args) { }
|
||||
|
||||
public void registerMissileItems() { }
|
||||
}
|
||||
@ -56,6 +56,7 @@ public class ParticleContrail extends EntityFX {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
@ -65,11 +66,11 @@ public class ParticleContrail extends EntityFX {
|
||||
|
||||
p_70539_1_.startDrawingQuads();
|
||||
|
||||
this.particleRed = this.particleGreen = this.particleBlue = urandom.nextFloat() * 0.1F + 0.2F;
|
||||
this.particleRed = this.particleGreen = this.particleBlue = urandom.nextFloat() * 0.2F + 0.2F;
|
||||
|
||||
p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
|
||||
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
//p_70539_1_.setBrightness(240);
|
||||
p_70539_1_.setBrightness(240);
|
||||
|
||||
float scale = particleAlpha + 0.5F;
|
||||
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double)p_70539_2_ - interpPosX) + urandom.nextGaussian() * 0.5);
|
||||
|
||||
120
com/hbm/particle/ParticleSmokePlume.java
Normal file
@ -0,0 +1,120 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleSmokePlume extends EntityFX {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/contrail.png");
|
||||
private TextureManager theRenderEngine;
|
||||
private int age;
|
||||
private int maxAge;
|
||||
|
||||
public ParticleSmokePlume(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_) {
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
theRenderEngine = p_i1213_1_;
|
||||
maxAge = 100 + rand.nextInt(40);
|
||||
|
||||
int r = rand.nextInt(4);
|
||||
float veloc = 0.5F;
|
||||
|
||||
if(r == 1) {
|
||||
motionX = rand.nextGaussian() * veloc + veloc;
|
||||
motionZ = rand.nextGaussian() * 0.05;
|
||||
} else if(r == 2) {
|
||||
motionX = rand.nextGaussian() * veloc - veloc;
|
||||
motionZ = rand.nextGaussian() * 0.05;
|
||||
} else if(r == 3) {
|
||||
motionZ = rand.nextGaussian() * veloc + veloc;
|
||||
motionX = rand.nextGaussian() * 0.05;
|
||||
} else if(r == 0) {
|
||||
motionZ = rand.nextGaussian() * veloc - veloc;
|
||||
motionX = rand.nextGaussian() * 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
particleAlpha = 1 - ((float) age / (float) maxAge);
|
||||
|
||||
++this.age;
|
||||
|
||||
if (this.age == this.maxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
double bak = Vec3.createVectorHelper(motionX, motionY, motionZ).lengthVector();
|
||||
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (Math.abs(motionX) < 0.025 && Math.abs(motionZ) < 0.025)
|
||||
{
|
||||
motionY = bak;
|
||||
}
|
||||
|
||||
motionX *= 0.925;
|
||||
motionY *= 0.925;
|
||||
motionZ *= 0.925;
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
|
||||
|
||||
this.theRenderEngine.bindTexture(texture);
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
Random urandom = new Random(this.getEntityId());
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
p_70539_1_.startDrawingQuads();
|
||||
|
||||
this.particleRed = this.particleGreen = this.particleBlue = urandom.nextFloat() * 0.7F + 0.2F;
|
||||
|
||||
p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, this.particleBlue, this.particleAlpha);
|
||||
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
p_70539_1_.setBrightness(240);
|
||||
|
||||
float scale = 0.5F;
|
||||
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double)p_70539_2_ - interpPosX) + urandom.nextGaussian() * 0.5);
|
||||
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double)p_70539_2_ - interpPosY) + urandom.nextGaussian() * 0.5);
|
||||
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double)p_70539_2_ - interpPosZ) + urandom.nextGaussian() * 0.5);
|
||||
|
||||
p_70539_1_.addVertexWithUV((double)(pX - p_70539_3_ * scale - p_70539_6_ * scale), (double)(pY - p_70539_4_ * scale), (double)(pZ - p_70539_5_ * scale - p_70539_7_ * scale), 1, 1);
|
||||
p_70539_1_.addVertexWithUV((double)(pX - p_70539_3_ * scale + p_70539_6_ * scale), (double)(pY + p_70539_4_ * scale), (double)(pZ - p_70539_5_ * scale + p_70539_7_ * scale), 1, 0);
|
||||
p_70539_1_.addVertexWithUV((double)(pX + p_70539_3_ * scale + p_70539_6_ * scale), (double)(pY + p_70539_4_ * scale), (double)(pZ + p_70539_5_ * scale + p_70539_7_ * scale), 0, 0);
|
||||
p_70539_1_.addVertexWithUV((double)(pX + p_70539_3_ * scale - p_70539_6_ * scale), (double)(pY - p_70539_4_ * scale), (double)(pZ + p_70539_5_ * scale - p_70539_7_ * scale), 0, 1);
|
||||
p_70539_1_.draw();
|
||||
}
|
||||
|
||||
GL11.glPolygonOffset(0.0F, 0.0F);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
@ -129,6 +129,7 @@ public class MissilePart {
|
||||
MissilePart.registerPart(ModItems.mp_warhead_15_nuclear, PartType.WARHEAD, 3.5, 2, ResourceManager.mp_w_15_nuclear, ResourceManager.mp_w_15_nuclear_tex);
|
||||
MissilePart.registerPart(ModItems.mp_warhead_15_nuclear_shark, PartType.WARHEAD, 3.5, 2, ResourceManager.mp_w_15_nuclear, ResourceManager.mp_w_15_nuclear_shark_tex);
|
||||
MissilePart.registerPart(ModItems.mp_warhead_15_boxcar, PartType.WARHEAD, 2.25, 7.5, ResourceManager.mp_w_15_boxcar, ResourceManager.boxcar_tex);
|
||||
MissilePart.registerPart(ModItems.mp_warhead_15_n2, PartType.WARHEAD, 3, 2, ResourceManager.mp_w_15_n2, ResourceManager.mp_w_15_n2_tex);
|
||||
//
|
||||
MissilePart.registerPart(ModItems.mp_warhead_20_he, PartType.WARHEAD, 3, 2.25, ResourceManager.mp_w_20, ResourceManager.universal);
|
||||
|
||||
|
||||
85
com/hbm/render/misc/SoyuzPronter.java
Normal file
@ -0,0 +1,85 @@
|
||||
package com.hbm.render.misc;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
|
||||
public class SoyuzPronter {
|
||||
|
||||
|
||||
public static void prontSoyuz() {
|
||||
|
||||
prontMain();
|
||||
prontBoosters();
|
||||
}
|
||||
|
||||
public static void prontMain() {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
TextureManager tex = Minecraft.getMinecraft().getTextureManager();
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_engineblock);
|
||||
ResourceManager.soyuz.renderOnly("EngineBlock");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_bottomstage);
|
||||
ResourceManager.soyuz.renderOnly("BottomStage");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_topstage);
|
||||
ResourceManager.soyuz.renderOnly("TopStage");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_payload);
|
||||
ResourceManager.soyuz.renderOnly("Payload");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_memento);
|
||||
ResourceManager.soyuz.renderOnly("Memento");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_payloadblocks);
|
||||
ResourceManager.soyuz.renderOnly("PayloadBlocks");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_les);
|
||||
ResourceManager.soyuz.renderOnly("LES");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_lesthrusters);
|
||||
ResourceManager.soyuz.renderOnly("LESThrusters");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_mainengines);
|
||||
ResourceManager.soyuz.renderOnly("MainEngines");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_sideengines);
|
||||
ResourceManager.soyuz.renderOnly("SideEngines");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static void prontBoosters() {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
TextureManager tex = Minecraft.getMinecraft().getTextureManager();
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_booster);
|
||||
ResourceManager.soyuz.renderOnly("Booster.000");
|
||||
ResourceManager.soyuz.renderOnly("Booster.001");
|
||||
ResourceManager.soyuz.renderOnly("Booster.002");
|
||||
ResourceManager.soyuz.renderOnly("Booster.003");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_mainengines);
|
||||
ResourceManager.soyuz.renderOnly("BoosterEngines.000");
|
||||
ResourceManager.soyuz.renderOnly("BoosterEngines.001");
|
||||
ResourceManager.soyuz.renderOnly("BoosterEngines.002");
|
||||
ResourceManager.soyuz.renderOnly("BoosterEngines.003");
|
||||
|
||||
tex.bindTexture(ResourceManager.soyuz_boosterside);
|
||||
ResourceManager.soyuz.renderOnly("BoosterSide.000");
|
||||
ResourceManager.soyuz.renderOnly("BoosterSide.001");
|
||||
ResourceManager.soyuz.renderOnly("BoosterSide.002");
|
||||
ResourceManager.soyuz.renderOnly("BoosterSide.003");
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.misc.ErrorPronter;
|
||||
import com.hbm.render.misc.SoyuzPronter;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -17,7 +18,7 @@ public class RenderLaunchTable extends TileEntitySpecialRenderer {
|
||||
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y, (float) z + 0.5F);
|
||||
|
||||
ErrorPronter.prontError();
|
||||
SoyuzPronter.prontSoyuz();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.items.weapon.ItemMissile.FuelType;
|
||||
import com.hbm.items.weapon.ItemMissile.PartSize;
|
||||
import com.hbm.items.weapon.ItemMissile.PartType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -24,6 +25,7 @@ import com.hbm.render.misc.MissileMultipart;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -197,6 +199,20 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
List<Entity> entities = worldObj.getEntitiesWithinAABBExcludingEntity(null, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord, zCoord - 0.5, xCoord + 1.5, yCoord + 10, zCoord + 1.5));
|
||||
|
||||
for(Entity e : entities) {
|
||||
|
||||
if(e instanceof EntityMissileCustom) {
|
||||
|
||||
for(int i = 0; i < 15; i++)
|
||||
MainRegistry.proxy.spawnParticle(xCoord + 0.5, yCoord + 0.25, zCoord + 0.5, "launchsmoke", null);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,6 +226,8 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
EntityMissileCustom missile = new EntityMissileCustom(worldObj, xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, tX, tZ, getMultipart(slots[0]));
|
||||
worldObj.spawnEntityInWorld(missile);
|
||||
|
||||
subtractFuel();
|
||||
|
||||
slots[0] = null;
|
||||
}
|
||||
|
||||
@ -218,6 +236,42 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
return solidState() != 0 && liquidState() != 0 && oxidizerState() != 0;
|
||||
}
|
||||
|
||||
private void subtractFuel() {
|
||||
|
||||
MissileMultipart multipart = getMultipart(slots[0]);
|
||||
|
||||
if(multipart == null || multipart.fuselage == null)
|
||||
return;
|
||||
|
||||
ItemMissile fuselage = (ItemMissile)multipart.fuselage.part;
|
||||
|
||||
float f = (Float)fuselage.attributes[1];
|
||||
int fuel = (int)f;
|
||||
|
||||
switch((FuelType)fuselage.attributes[0]) {
|
||||
case KEROSENE:
|
||||
tanks[0].setFill(tanks[0].getFill() - fuel);
|
||||
tanks[1].setFill(tanks[1].getFill() - fuel);
|
||||
break;
|
||||
case HYDROGEN:
|
||||
tanks[0].setFill(tanks[0].getFill() - fuel);
|
||||
tanks[1].setFill(tanks[1].getFill() - fuel);
|
||||
break;
|
||||
case XENON:
|
||||
tanks[0].setFill(tanks[0].getFill() - fuel);
|
||||
break;
|
||||
case BALEFIRE:
|
||||
tanks[0].setFill(tanks[0].getFill() - fuel);
|
||||
tanks[1].setFill(tanks[1].getFill() - fuel);
|
||||
break;
|
||||
case SOLID:
|
||||
this.solid -= fuel; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
this.power -= maxPower * 0.75;
|
||||
}
|
||||
|
||||
public static MissileMultipart getMultipart(ItemStack stack) {
|
||||
|
||||
return ItemCustomMissile.getMultipart(stack);
|
||||
|
||||
@ -1,7 +1,22 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityLaunchTable extends TileEntity {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared()
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||