laser detonator, do17 airstrikes

This commit is contained in:
HbmMods 2018-08-24 17:33:32 +02:00
parent 7c48197eb8
commit 510994b4f1
38 changed files with 2322 additions and 11 deletions

View File

@ -265,6 +265,7 @@ tile.emp_bomb.name=EMP-Ladung
tile.crashed_bomb.name=Blindgänger
tile.boxcar.name=Güterwagon
tile.bomber.name=Abgestürtzer Bomber
tile.crate.name=Vorratskiste
tile.crate_weapon.name=Waffenkiste
@ -1512,7 +1513,9 @@ item.shimmer_handle.name=Verstärketer Polymergriff
item.redcoil_capacitor.name=Rotspulenkondensator
item.detonator.name=Fernzünder
item.detonator_multi.name=Mehrfach-Fernzünder
item.detonator_laser.name=Laserzünder
item.crate_caller.name=Nachschub-Requester
item.bomb_caller.name=Luftschlag Zielmarker
item.meteor_remote.name=Meteoritenkontroller
item.ingot_hes.name=Stark angereicherter Schrabidiumkernbrennstoffbarren

View File

@ -243,6 +243,7 @@ tile.emp_bomb.name=EMP Device
tile.crashed_bomb.name=Dud
tile.boxcar.name=Boxcar
tile.bomber.name=Crashed Bomber
tile.turret_light.name=Light Machine Gun Turret
tile.turret_heavy.name=Heavy Machine Gun Turret
@ -1511,8 +1512,10 @@ item.shimmer_handle.name=Reinforced Polymer Handle
item.redcoil_capacitor.name=Redcoil Capacitor
item.detonator.name=Detonator
item.detonator_multi.name=Multi-Detonator
item.detonator_multi.name=Multi Detonator
item.detonator_laser.name=Laser Detonator
item.crate_caller.name=Supply Drop Requester
item.bomb_caller.name=Airstrike Designator
item.meteor_remote.name=Meteorite Remote
item.ingot_hes.name=Highly Enriched Schrabidium Fuel Ingot

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -189,7 +189,9 @@ public class ModBlocks {
public static Block crate_lead;
public static Block crate_metal;
public static Block crate_red;
public static Block boxcar;
public static Block bomber;
public static Block seal_frame;
public static Block seal_controller;
@ -873,6 +875,7 @@ public class ModBlocks {
crate_steel = new BlockStorageCrate(Material.iron).setBlockName("crate_steel").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
boxcar = new DecoBlock(Material.iron).setBlockName("boxcar").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":boxcar");
bomber = new DecoBlock(Material.iron).setBlockName("bomber").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":bomber");
machine_well = new MachineOilWell(Material.iron).setBlockName("machine_well").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_well");
machine_pumpjack = new MachinePumpjack(Material.iron).setBlockName("machine_pumpjack").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_pumpjack");
@ -1181,6 +1184,7 @@ public class ModBlocks {
//Junk
GameRegistry.registerBlock(boxcar, boxcar.getUnlocalizedName());
GameRegistry.registerBlock(bomber, bomber.getUnlocalizedName());
//Machines
GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName());

View File

@ -7,6 +7,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.tileentity.bomb.TileEntityNukeGadget;
import com.hbm.tileentity.deco.TileEntityBomber;
import com.hbm.tileentity.deco.TileEntityDecoBlock;
import net.minecraft.block.Block;
@ -34,6 +35,10 @@ public class DecoBlock extends BlockContainer {
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
if(this == ModBlocks.bomber)
return new TileEntityBomber();
return new TileEntityDecoBlock();
}
@ -55,7 +60,7 @@ public class DecoBlock extends BlockContainer {
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
{
if(this == ModBlocks.boxcar)
if(this == ModBlocks.boxcar || this == ModBlocks.bomber)
return null;
return Item.getItemFromBlock(this);
}

View File

@ -0,0 +1,294 @@
package com.hbm.entity.logic;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.projectile.EntityBombletZeta;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.lib.ModDamageSource;
import com.hbm.tileentity.deco.TileEntityBomber;
import com.hbm.tileentity.machine.TileEntityMachineRadar;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class EntityBomber extends Entity {
int timer = 200;
int bombStart = 75;
int bombStop = 125;
int bombRate = 3;
int type = 0;
public int health = 50;
public EntityBomber(World p_i1582_1_) {
super(p_i1582_1_);
this.ignoreFrustumCheck = true;
this.setSize(8.0F, 4.0F);
}
public boolean canBeCollidedWith()
{
return this.health > 0;
}
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
{
if(p_70097_1_ == ModDamageSource.nuclearBlast)
return false;
if (this.isEntityInvulnerable())
{
return false;
}
else
{
if (!this.isDead && !this.worldObj.isRemote && this.health > 0)
{
health -= p_70097_2_;
if (this.health <= 0)
{
this.killBomber();
}
}
return true;
}
}
private void killBomber() {
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true);
}
@Override
public void onUpdate() {
//super.onUpdate();
this.lastTickPosX = this.prevPosX = posX;
this.lastTickPosY = this.prevPosY = posY;
this.lastTickPosZ = this.prevPosZ = posZ;
this.setPosition(posX + motionX, posY + motionY, posZ + motionZ);
this.rotation();
if(this.health <= 0) {
motionY -= 0.025;
for(int i = 0; i < 10; i++)
this.worldObj.spawnEntityInWorld(new EntityGasFlameFX(this.worldObj, this.posX + rand.nextGaussian() * 0.5 - motionX * 2, this.posY + rand.nextGaussian() * 0.5 - motionY * 2, this.posZ + rand.nextGaussian() * 0.5 - motionZ * 2, 0.0, 0.1, 0.0));
if(worldObj.getBlock((int)posX, (int)posY, (int)posZ).isNormalCube() && !worldObj.isRemote) {
this.setDead();
/*worldObj.setBlock((int)posX, (int)posY, (int)posZ, ModBlocks.bomber);
TileEntityBomber te = (TileEntityBomber)worldObj.getTileEntity((int)posX, (int)posY, (int)posZ);
if(te != null) {
te.yaw = (int)(this.rotationYaw);
te.pitch = (int)(this.rotationPitch);
te.type = this.getDataWatcher().getWatchableObjectByte(16);
}*/
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 25, true, false, true);
return;
}
}
//if(this.ticksExisted > timer)
// this.setDead();
if(!worldObj.isRemote && this.health > 0 && this.ticksExisted > bombStart && this.ticksExisted < bombStop && this.ticksExisted % bombRate == 0) {
if(type == 3) {
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F);
ExplosionChaos.spawnChlorine(worldObj, this.posX, this.posY - 1F, this.posZ, 10, 0.5, 3);
} else {
EntityBombletZeta zeta = new EntityBombletZeta(worldObj);
zeta.rotationYaw = this.rotationYaw;
zeta.rotationPitch = this.rotationPitch;
zeta.type = type;
zeta.posX = posX + rand.nextDouble() - 0.5;
zeta.posY = posY - rand.nextDouble();
zeta.posZ = posZ + rand.nextDouble() - 0.5;
zeta.motionX = motionX;
zeta.motionZ = motionZ;
worldObj.spawnEntityInWorld(zeta);
}
}
}
public void fac(World world, double x, double y, double z) {
Vec3 vector = Vec3.createVectorHelper(world.rand.nextDouble() - 0.5, 0, world.rand.nextDouble() - 0.5);
vector = vector.normalize();
vector.xCoord *= 2;
vector.zCoord *= 2;
this.posX = x - vector.xCoord * 100;
this.posY = y + 50;
this.posZ = z - vector.zCoord * 100;
this.motionX = vector.xCoord;
this.motionZ = vector.zCoord;
this.motionY = 0.0D;
this.rotation();
int i = 1;
int rand = world.rand.nextInt(101);
if(rand < 50)
i = 1;
else if(rand > 50)
i = 2;
else
i = 0;
this.getDataWatcher().updateObject(16, (byte)i);
this.setSize(8.0F, 4.0F);
}
public static EntityBomber statFacCarpet(World world, double x, double y, double z) {
EntityBomber bomber = new EntityBomber(world);
bomber.timer = 200;
bomber.bombStart = 50;
bomber.bombStop = 100;
bomber.bombRate = 3;
bomber.fac(world, x, y, z);
bomber.type = 0;
return bomber;
}
public static EntityBomber statFacNapalm(World world, double x, double y, double z) {
EntityBomber bomber = new EntityBomber(world);
bomber.timer = 200;
bomber.bombStart = 50;
bomber.bombStop = 100;
bomber.bombRate = 5;
bomber.fac(world, x, y, z);
bomber.type = 1;
return bomber;
}
public static EntityBomber statFacChlorine(World world, double x, double y, double z) {
EntityBomber bomber = new EntityBomber(world);
bomber.timer = 200;
bomber.bombStart = 50;
bomber.bombStop = 100;
bomber.bombRate = 4;
bomber.fac(world, x, y, z);
bomber.type = 2;
return bomber;
}
public static EntityBomber statFacOrange(World world, double x, double y, double z) {
EntityBomber bomber = new EntityBomber(world);
bomber.timer = 200;
bomber.bombStart = 75;
bomber.bombStop = 125;
bomber.bombRate = 1;
bomber.fac(world, x, y, z);
bomber.type = 3;
return bomber;
}
public static EntityBomber statFacABomb(World world, double x, double y, double z) {
EntityBomber bomber = new EntityBomber(world);
bomber.timer = 200;
bomber.bombStart = 70;
bomber.bombStop = 80;
bomber.bombRate = 75;
bomber.fac(world, x, y, z);
bomber.type = 4;
return bomber;
}
@Override
public void entityInit() {
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
}
@Override
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { }
@Override
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { }
protected void rotation() {
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
}
}

View File

@ -0,0 +1,87 @@
package com.hbm.entity.particle;
import com.hbm.blocks.ModBlocks;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionNukeGeneric;
import net.minecraft.block.material.Material;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityOrangeFX extends EntityModFX {
public EntityOrangeFX(World world) {
super(world, 0, 0, 0);
}
public EntityOrangeFX(World p_i1225_1_, double p_i1225_2_, double p_i1225_4_, double p_i1225_6_, double p_i1225_8_, double p_i1225_10_, double p_i1225_12_)
{
this(p_i1225_1_, p_i1225_2_, p_i1225_4_, p_i1225_6_, p_i1225_8_, p_i1225_10_, p_i1225_12_, 1.0F);
}
public EntityOrangeFX(World p_i1226_1_, double p_i1226_2_, double p_i1226_4_, double p_i1226_6_, double p_i1226_8_, double p_i1226_10_, double p_i1226_12_, float p_i1226_14_)
{
super(p_i1226_1_, p_i1226_2_, p_i1226_4_, p_i1226_6_, 0.0D, 0.0D, 0.0D);
this.motionX *= 0.10000000149011612D;
this.motionY *= 0.10000000149011612D;
this.motionZ *= 0.10000000149011612D;
this.motionX += p_i1226_8_;
this.motionY += p_i1226_10_;
this.motionZ += p_i1226_12_;
this.particleRed = this.particleGreen = this.particleBlue = (float)(Math.random() * 0.30000001192092896D);
this.particleScale *= 0.75F;
this.particleScale *= p_i1226_14_;
this.smokeParticleScale = this.particleScale;
this.noClip = false;
}
@Override
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (maxAge < 900) {
maxAge = rand.nextInt(301) + 900;
}
if (!worldObj.isRemote && rand.nextInt(50) == 0)
ExplosionChaos.poison(worldObj, (int) posX, (int) posY, (int) posZ, 2);
this.particleAge++;
if (this.particleAge >= maxAge) {
this.setDead();
}
this.motionX *= 0.8599999785423279D;
this.motionY *= 0.8599999785423279D;
this.motionZ *= 0.8599999785423279D;
if (this.onGround) {
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}
this.motionY -= 0.1;
double subdivisions = 4;
for(int i = 0; i < subdivisions; i++) {
this.posX += this.motionX/subdivisions;
this.posY += this.motionY/subdivisions;
this.posZ += this.motionZ/subdivisions;
if(worldObj.getBlock((int) posX, (int) posY, (int) posZ).getMaterial() != Material.air) {
this.setDead();
for(int a = -1; a < 2; a++)
for(int b = -1; b < 2; b++)
for(int c = -1; c < 2; c++)
ExplosionNukeGeneric.solinium(worldObj, (int) posX + a, (int) posY + b, (int) posZ + c);
}
}
}
}

View File

@ -0,0 +1,110 @@
package com.hbm.entity.projectile;
import com.hbm.entity.logic.EntityNukeExplosionMK4;
import com.hbm.entity.missile.EntityBombletSelena;
import com.hbm.entity.particle.EntitySSmokeFX;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import com.hbm.main.MainRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class EntityBombletZeta extends EntityThrowable {
public int type = 0;
public EntityBombletZeta(World p_i1582_1_) {
super(p_i1582_1_);
this.ignoreFrustumCheck = true;
}
@Override
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
this.motionX *= 0.99;
this.motionZ *= 0.99;
this.motionY -= 0.05D;
this.rotation();
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
{
if(!this.worldObj.isRemote)
{
if(type == 0) {
ExplosionLarge.explode(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 5.0F, true, false, false);
}
if(type == 1) {
ExplosionLarge.explode(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 5.0F, true, false, false);
ExplosionChaos.burn(worldObj, (int)posX, (int)posY, (int)posZ, 7);
}
if(type == 2) {
ExplosionChaos.spawnChlorine(worldObj, this.posX + 0.5F - motionX, this.posY + 0.5F - motionY, this.posZ + 0.5F - motionZ, 75, 2, 0);
}
if(type == 4) {
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, (int) (MainRegistry.fatmanRadius * 1.5), posX, posY, posZ));
if(rand.nextInt(100) == 0)
{
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY, (int)this.posZ);
}
}
}
this.setDead();
}
}
protected void rotation() {
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
}
}

View File

@ -14,6 +14,7 @@ import com.hbm.entity.particle.EntityChlorineFX;
import com.hbm.entity.particle.EntityCloudFX;
import com.hbm.entity.particle.EntityDSmokeFX;
import com.hbm.entity.particle.EntityModFX;
import com.hbm.entity.particle.EntityOrangeFX;
import com.hbm.entity.particle.EntityPinkCloudFX;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.entity.projectile.EntityMiniNuke;
@ -364,8 +365,10 @@ public class ExplosionChaos {
fx = new EntityChlorineFX(world, x, y, z, 0.0, 0.0, 0.0);
} else if(type == 1) {
fx = new EntityCloudFX(world, x, y, z, 0.0, 0.0, 0.0);
} else {
} else if(type == 2) {
fx = new EntityPinkCloudFX(world, x, y, z, 0.0, 0.0, 0.0);
} else {
fx = new EntityOrangeFX(world, x, y, z, 0.0, 0.0, 0.0);
}
fx.motionY = rand.nextGaussian() * speed;

View File

@ -1155,7 +1155,9 @@ public class ModItems {
public static Item igniter;
public static Item detonator;
public static Item detonator_multi;
public static Item detonator_laser;
public static Item crate_caller;
public static Item bomb_caller;
public static Item meteor_remote;
public static Item remote;
public static Item turret_control;
@ -1250,6 +1252,14 @@ public class ModItems {
public static Item cloud6;
public static Item cloud7;
public static Item cloud8;
public static Item orange1;
public static Item orange2;
public static Item orange3;
public static Item orange4;
public static Item orange5;
public static Item orange6;
public static Item orange7;
public static Item orange8;
public static Item gasflame1;
public static Item gasflame2;
public static Item gasflame3;
@ -2234,7 +2244,9 @@ public class ModItems {
igniter = new ItemCustomLore().setUnlocalizedName("igniter").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":trigger");
detonator = new ItemDetonator().setUnlocalizedName("detonator").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":detonator");
detonator_multi = new ItemMultiDetonator().setUnlocalizedName("detonator_multi").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":detonator_multi");
detonator_laser = new ItemLaserDetonator().setUnlocalizedName("detonator_laser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":detonator_laser");
crate_caller = new ItemCrateCaller().setUnlocalizedName("crate_caller").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":crate_caller");
bomb_caller = new ItemBombCaller().setUnlocalizedName("bomb_caller").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bomb_caller");
meteor_remote = new ItemMeteorRemote().setUnlocalizedName("meteor_remote").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":meteor_remote");
remote = new ItemRamManipulator().setUnlocalizedName("remote").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":remote");
chopper = new ItemChopper().setUnlocalizedName("chopper").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":chopper");
@ -2489,6 +2501,14 @@ public class ModItems {
cloud6 = new Item().setUnlocalizedName("cloud6").setTextureName(RefStrings.MODID + ":cloud6");
cloud7 = new Item().setUnlocalizedName("cloud7").setTextureName(RefStrings.MODID + ":cloud7");
cloud8 = new Item().setUnlocalizedName("cloud8").setTextureName(RefStrings.MODID + ":cloud8");
orange1 = new Item().setUnlocalizedName("orange1").setTextureName(RefStrings.MODID + ":orange1");
orange2 = new Item().setUnlocalizedName("orange2").setTextureName(RefStrings.MODID + ":orange2");
orange3 = new Item().setUnlocalizedName("orange3").setTextureName(RefStrings.MODID + ":orange3");
orange4 = new Item().setUnlocalizedName("orange4").setTextureName(RefStrings.MODID + ":orange4");
orange5 = new Item().setUnlocalizedName("orange5").setTextureName(RefStrings.MODID + ":orange5");
orange6 = new Item().setUnlocalizedName("orange6").setTextureName(RefStrings.MODID + ":orange6");
orange7 = new Item().setUnlocalizedName("orange7").setTextureName(RefStrings.MODID + ":orange7");
orange8 = new Item().setUnlocalizedName("orange8").setTextureName(RefStrings.MODID + ":orange8");
gasflame1 = new Item().setUnlocalizedName("gasflame1").setTextureName(RefStrings.MODID + ":gasflame1");
gasflame2 = new Item().setUnlocalizedName("gasflame2").setTextureName(RefStrings.MODID + ":gasflame2");
gasflame3 = new Item().setUnlocalizedName("gasflame3").setTextureName(RefStrings.MODID + ":gasflame3");
@ -3678,7 +3698,9 @@ public class ModItems {
GameRegistry.registerItem(igniter, igniter.getUnlocalizedName());
GameRegistry.registerItem(detonator, detonator.getUnlocalizedName());
GameRegistry.registerItem(detonator_multi, detonator_multi.getUnlocalizedName());
GameRegistry.registerItem(detonator_laser, detonator_laser.getUnlocalizedName());
GameRegistry.registerItem(crate_caller, crate_caller.getUnlocalizedName());
GameRegistry.registerItem(bomb_caller, bomb_caller.getUnlocalizedName());
GameRegistry.registerItem(meteor_remote, meteor_remote.getUnlocalizedName());
GameRegistry.registerItem(defuser, defuser.getUnlocalizedName());
GameRegistry.registerItem(hazmat_helmet, hazmat_helmet.getUnlocalizedName());
@ -3831,6 +3853,14 @@ public class ModItems {
GameRegistry.registerItem(cloud6, cloud6.getUnlocalizedName());
GameRegistry.registerItem(cloud7, cloud7.getUnlocalizedName());
GameRegistry.registerItem(cloud8, cloud8.getUnlocalizedName());
GameRegistry.registerItem(orange1, orange1.getUnlocalizedName());
GameRegistry.registerItem(orange2, orange2.getUnlocalizedName());
GameRegistry.registerItem(orange3, orange3.getUnlocalizedName());
GameRegistry.registerItem(orange4, orange4.getUnlocalizedName());
GameRegistry.registerItem(orange5, orange5.getUnlocalizedName());
GameRegistry.registerItem(orange6, orange6.getUnlocalizedName());
GameRegistry.registerItem(orange7, orange7.getUnlocalizedName());
GameRegistry.registerItem(orange8, orange8.getUnlocalizedName());
GameRegistry.registerItem(gasflame1, gasflame1.getUnlocalizedName());
GameRegistry.registerItem(gasflame2, gasflame2.getUnlocalizedName());
GameRegistry.registerItem(gasflame3, gasflame3.getUnlocalizedName());

View File

@ -0,0 +1,91 @@
package com.hbm.items.tool;
import java.util.List;
import com.hbm.entity.logic.EntityBomber;
import com.hbm.interfaces.IBomb;
import com.hbm.lib.Library;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class ItemBombCaller extends Item {
public ItemBombCaller() {
super();
this.setHasSubtypes(true);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
{
list.add("Aim & click to call an airstrike!");
if(itemstack.getItemDamage() == 0)
list.add("Type: Carpet bombing");
if(itemstack.getItemDamage() == 1)
list.add("Type: Napalm");
if(itemstack.getItemDamage() == 2)
list.add("Type: Poison gas");
if(itemstack.getItemDamage() == 3)
list.add("Type: Agent orange");
if(itemstack.getItemDamage() == 4)
list.add("Type: Atomic bomb");
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
MovingObjectPosition pos = Library.rayTrace(player, 500, 1);
int x = pos.blockX;
int y = pos.blockY;
int z = pos.blockZ;
if(!world.isRemote)
{
player.addChatMessage(new ChatComponentText("Called in airstrike!"));
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
if(stack.getItemDamage() == 0)
world.spawnEntityInWorld(EntityBomber.statFacCarpet(world, x, y, z));
if(stack.getItemDamage() == 1)
world.spawnEntityInWorld(EntityBomber.statFacNapalm(world, x, y, z));
if(stack.getItemDamage() == 2)
world.spawnEntityInWorld(EntityBomber.statFacChlorine(world, x, y, z));
if(stack.getItemDamage() == 3)
world.spawnEntityInWorld(EntityBomber.statFacOrange(world, x, y, z));
if(stack.getItemDamage() == 4)
world.spawnEntityInWorld(EntityBomber.statFacABomb(world, x, y, z));
}
stack.stackSize--;
return stack;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_)
{
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 0));
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 1));
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 2));
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 3));
p_150895_3_.add(new ItemStack(p_150895_1_, 1, 4));
}
@Override
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack p_77636_1_)
{
return p_77636_1_.getItemDamage() == 4;
}
}

View File

@ -33,7 +33,9 @@ public class ItemDesingatorRange extends Item {
} else {
list.add("Please select a target.");
}
}@Override
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
MovingObjectPosition pos = Library.rayTrace(player, 300, 1);

View File

@ -0,0 +1,48 @@
package com.hbm.items.tool;
import java.util.List;
import com.hbm.blocks.bomb.LaunchPad;
import com.hbm.interfaces.IBomb;
import com.hbm.lib.Library;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class ItemLaserDetonator extends Item {
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
{
list.add("Aim & click to detonate!");
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
MovingObjectPosition pos = Library.rayTrace(player, 500, 1);
int x = pos.blockX;
int y = pos.blockY;
int z = pos.blockZ;
if(!world.isRemote)
{
if(world.getBlock(x, y, z) instanceof IBomb) {
((IBomb)world.getBlock(x, y, z)).explode(world, x, y, z);
player.addChatMessage(new ChatComponentText("Detonated!"));
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
} else {
player.addChatMessage(new ChatComponentText("Target can not be detonated."));
world.playSoundAtEntity(player, "hbm:item.techBoop", 1.0F, 1.0F);
}
}
return stack;
}
}

View File

@ -10,6 +10,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.entity.effect.*;
import com.hbm.entity.grenade.*;
import com.hbm.entity.item.EntityMinecartTest;
import com.hbm.entity.logic.EntityBomber;
import com.hbm.entity.logic.EntityNukeExplosionAdvanced;
import com.hbm.entity.missile.*;
import com.hbm.entity.mob.*;
@ -289,11 +290,13 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityMIRV.class, new RenderMirv());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileDoomsday.class, new RenderMissileDoomsday());
RenderingRegistry.registerEntityRenderingHandler(EntityBombletTheta.class, new RenderBombletTheta());
RenderingRegistry.registerEntityRenderingHandler(EntityBombletZeta.class, new RenderBombletTheta());
RenderingRegistry.registerEntityRenderingHandler(EntityBombletSelena.class, new RenderBombletSelena());
RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new RenderMeteor());
RenderingRegistry.registerEntityRenderingHandler(EntityBoxcar.class, new RenderBoxcar());
RenderingRegistry.registerEntityRenderingHandler(EntityCarrier.class, new RenderCarrierMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityBooster.class, new RenderBoosterMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityBomber.class, new RenderBomber());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileTaint.class, new RenderMissileTaint());
RenderingRegistry.registerEntityRenderingHandler(EntityMissileMicro.class, new RenderMissileTaint());
@ -311,6 +314,7 @@ public class ClientProxy extends ServerProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBroadcaster.class, new RenderDecoBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRadioRec.class, new RenderDecoBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRadiobox.class, new RenderDecoBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBomber.class, new RenderDecoBlock());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoBlockAlt.class, new RenderDecoBlockAlt());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoBlockAltG.class, new RenderDecoBlockAlt());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoBlockAltW.class, new RenderDecoBlockAlt());
@ -337,6 +341,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityChlorineFX.class, new MultiCloudRenderer(new Item[] { ModItems.chlorine1, ModItems.chlorine2, ModItems.chlorine3, ModItems.chlorine4, ModItems.chlorine5, ModItems.chlorine6, ModItems.chlorine7, ModItems.chlorine8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityPinkCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.pc1, ModItems.pc2, ModItems.pc3, ModItems.pc4, ModItems.pc5, ModItems.pc6, ModItems.pc7, ModItems.pc8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityCloudFX.class, new MultiCloudRenderer(new Item[] { ModItems.cloud1, ModItems.cloud2, ModItems.cloud3, ModItems.cloud4, ModItems.cloud5, ModItems.cloud6, ModItems.cloud7, ModItems.cloud8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityOrangeFX.class, new MultiCloudRenderer(new Item[] { ModItems.orange1, ModItems.orange2, ModItems.orange3, ModItems.orange4, ModItems.orange5, ModItems.orange6, ModItems.orange7, ModItems.orange8 }));
RenderingRegistry.registerEntityRenderingHandler(EntitySSmokeFX.class, new SSmokeRenderer(ModItems.nuclear_waste));
RenderingRegistry.registerEntityRenderingHandler(EntityOilSpillFX.class, new SpillRenderer(ModItems.nuclear_waste));
RenderingRegistry.registerEntityRenderingHandler(EntityGasFX.class, new GasRenderer(ModItems.nuclear_waste));

View File

@ -89,6 +89,7 @@ import com.hbm.entity.grenade.EntityGrenadeStrong;
import com.hbm.entity.grenade.EntityGrenadeTau;
import com.hbm.entity.grenade.EntityGrenadeZOMG;
import com.hbm.entity.item.EntityMinecartTest;
import com.hbm.entity.logic.EntityBomber;
import com.hbm.entity.logic.EntityMissileTest;
import com.hbm.entity.logic.EntityNukeExplosion;
import com.hbm.entity.logic.EntityNukeExplosionAdvanced;
@ -135,12 +136,14 @@ import com.hbm.entity.particle.EntityDSmokeFX;
import com.hbm.entity.particle.EntityGasFX;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntityOilSpillFX;
import com.hbm.entity.particle.EntityOrangeFX;
import com.hbm.entity.particle.EntityPinkCloudFX;
import com.hbm.entity.particle.EntitySSmokeFX;
import com.hbm.entity.particle.EntitySmokeFX;
import com.hbm.entity.particle.EntityTSmokeFX;
import com.hbm.entity.projectile.EntityAAShell;
import com.hbm.entity.projectile.EntityBaleflare;
import com.hbm.entity.projectile.EntityBombletZeta;
import com.hbm.entity.projectile.EntityBoxcar;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.entity.projectile.EntityChopperMine;
@ -218,6 +221,7 @@ import com.hbm.tileentity.conductor.TileEntityOilDuct;
import com.hbm.tileentity.conductor.TileEntityOilDuctSolid;
import com.hbm.tileentity.conductor.TileEntityPylonRedWire;
import com.hbm.tileentity.conductor.TileEntityWireCoated;
import com.hbm.tileentity.deco.TileEntityBomber;
import com.hbm.tileentity.deco.TileEntityDecoBlock;
import com.hbm.tileentity.deco.TileEntityDecoPoleSatelliteReceiver;
import com.hbm.tileentity.deco.TileEntityDecoPoleTop;
@ -671,6 +675,7 @@ public class MainRegistry
GameRegistry.registerTileEntity(TileEntityRadioRec.class, "tileentity_radio_receiver");
GameRegistry.registerTileEntity(TileEntityVent.class, "tileentity_vent");
GameRegistry.registerTileEntity(TileEntityLandmine.class, "tileentity_landmine");
GameRegistry.registerTileEntity(TileEntityBomber.class, "tileentity_bomber");
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
@ -780,6 +785,9 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityCloudFX.class, "entity_cloud_fx", 105, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityGrenadePC.class, "entity_grenade_pink_cloud", 106, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityGrenadeCloud.class, "entity_grenade_cloud", 107, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityBomber.class, "entity_bomber", 108, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityBombletZeta.class, "entity_zeta", 109, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityOrangeFX.class, "entity_agent_orange", 110, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72);

View File

@ -218,6 +218,9 @@ public class ResourceManager {
//Boxcar
public static final IModelCustom boxcar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/boxcar.obj"));
//DO16
public static final IModelCustom dornier = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/dornier.obj"));
//Missiles
public static final IModelCustom missileV2 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileV2.obj"));
public static final IModelCustom missileStrong = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/missileGeneric.obj"));
@ -235,6 +238,11 @@ public class ResourceManager {
//Boxcar
public static final ResourceLocation boxcar_tex = new ResourceLocation(RefStrings.MODID, "textures/models/boxcar.png");
//Dornier
public static final ResourceLocation dornier_0_tex = new ResourceLocation(RefStrings.MODID, "textures/models/dornier_0.png");
public static final ResourceLocation dornier_1_tex = new ResourceLocation(RefStrings.MODID, "textures/models/dornier_1.png");
public static final ResourceLocation dornier_2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/dornier_2.png");
//Missiles
public static final ResourceLocation missileV2_HE_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileV2_HE.png");
public static final ResourceLocation missileV2_IN_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileV2_IN.png");

View File

@ -4,6 +4,7 @@ import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.ISource;
import com.hbm.tileentity.bomb.TileEntityTurretCIWS;
import com.hbm.tileentity.bomb.TileEntityTurretCheapo;
import com.hbm.tileentity.deco.TileEntityBomber;
import com.hbm.tileentity.machine.TileEntityAMSBase;
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
@ -129,6 +130,16 @@ public class AuxGaugePacket implements IMessage {
if(m.id == 3)
reactor.hullHeat = m.value;
}
if (te instanceof TileEntityBomber) {
TileEntityBomber bomber = (TileEntityBomber)te;
if(m.id == 0)
bomber.yaw = m.value;
if(m.id == 1)
bomber.pitch = m.value;
if(m.id == 2)
bomber.type = m.value;
}
} catch (Exception x) { }
return null;

View File

@ -0,0 +1,50 @@
package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderBomber extends Render {
public RenderBomber() { }
@Override
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(90, 0F, 0F, 1F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScalef(5F, 5F, 5F);
GL11.glRotatef(-90, 0F, 1F, 0F);
int i = p_76986_1_.getDataWatcher().getWatchableObjectByte(16);
switch(i) {
case 0: bindTexture(ResourceManager.dornier_0_tex); break;
case 1: bindTexture(ResourceManager.dornier_1_tex); break;
case 2: bindTexture(ResourceManager.dornier_2_tex); break;
default: bindTexture(ResourceManager.dornier_1_tex); break;
}
ResourceManager.dornier.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return ResourceManager.dornier_1_tex;
}
}

View File

@ -2,6 +2,7 @@ package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.projectile.EntityBombletZeta;
import com.hbm.lib.RefStrings;
import net.minecraft.client.renderer.entity.Render;
@ -29,7 +30,13 @@ public class RenderBombletTheta extends Render {
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
bindTexture(boyTexture);
if(p_76986_1_ instanceof EntityBombletZeta) {
GL11.glScaled(0.5D, 0.5D, 0.5D);
bindTexture(new ResourceLocation(RefStrings.MODID, "textures/models/bombletZetaTexture.png"));
} else {
bindTexture(boyTexture);
}
boyModel.renderAll();
GL11.glPopMatrix();
}

View File

@ -12,6 +12,7 @@ import com.hbm.render.model.ModelSteelCorner;
import com.hbm.render.model.ModelSteelRoof;
import com.hbm.render.model.ModelSteelScaffold;
import com.hbm.render.model.ModelSteelWall;
import com.hbm.tileentity.deco.TileEntityBomber;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@ -187,6 +188,33 @@ public class RenderDecoBlock extends TileEntitySpecialRenderer {
GL11.glEnable(GL11.GL_CULL_FACE);
}
if(tileentity instanceof TileEntityBomber)
{
TileEntityBomber bomber = (TileEntityBomber)tileentity;
float yaw = (float)(((double)bomber.yaw) / 180D * Math.PI);
float pitch = (float)(((double)bomber.pitch) / 180D * Math.PI);
GL11.glRotatef(yaw - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(90, 0F, 0F, 1F);
GL11.glRotatef(pitch, 0.0F, 0.0F, 1.0F);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glScalef(5F, 5F, 5F);
int i = bomber.type;
switch(i) {
case 0: bindTexture(ResourceManager.dornier_0_tex); break;
case 1: bindTexture(ResourceManager.dornier_1_tex); break;
case 2: bindTexture(ResourceManager.dornier_2_tex); break;
default: bindTexture(ResourceManager.dornier_1_tex); break;
}
ResourceManager.dornier.renderAll();
}
if(tileentity.getWorldObj().getBlock(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == ModBlocks.sat_radar) {
GL11.glRotatef(180, 0F, 0F, 1F);
GL11.glTranslatef(0, -1.5F, 0);

View File

@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
@ -46,11 +47,11 @@ public class RendererObjTester extends TileEntitySpecialRenderer {
/*bindTexture(objTesterTexture);
objTesterModel.renderAll();*/
bindTexture(ResourceManager.reactor_small_base_tex);
ResourceManager.reactor_small_base.renderAll();
GL11.glTranslated(0, Math.sin(System.currentTimeMillis() % (Math.PI * 1200) / 600) * 0.5 + 0.5, 0);
bindTexture(ResourceManager.reactor_small_rods_tex);
ResourceManager.reactor_small_rods.renderAll();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glScaled(5, 5, 5);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.dornier_2_tex);
ResourceManager.dornier.renderAll();
GL11.glPopMatrix();
}

View File

@ -0,0 +1,40 @@
package com.hbm.tileentity.deco;
import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.PacketDispatcher;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
public class TileEntityBomber extends TileEntity {
public int yaw;
public int pitch;
public int type = 1;
@Override
public void updateEntity() {
if (!worldObj.isRemote) {
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, yaw, 0));
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, pitch, 1));
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, type, 2));
}
}
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
yaw = nbt.getInteger("bomberYaw");
pitch = nbt.getInteger("bomberPitch");
type = nbt.getInteger("bomberType");
}
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setInteger("bomberYaw", yaw);
nbt.setInteger("bomberPitch", pitch);
nbt.setInteger("bomberType", type);
}
}