missile stuff

This commit is contained in:
Boblet 2024-02-02 14:59:02 +01:00
parent ae24f4cbef
commit dcad1001d2
30 changed files with 224 additions and 180 deletions

View File

@ -13,6 +13,14 @@
* Updated stealth missile texture
* Some of the larger oil machines now render using display lists which should make them somewhat more performant
* Glyphid diggers can no longer yeet multiblocks or blocks with tile entity
* Parasite-infested glyphids now explode into gore when the parasites pop out
* Missiles now have a top acceleration twice as much as the previous acceleration, but instead of being static, the acceleration goes up from 0 to max within 3 seconds
* This makes missiles reach top speed faster while also making the launches themselves slower and more pleasant
* Strange stone can no longer be destroyed via AoE, making it easier to find without accidentally mining it
* Launch pads now spawn launch smoke just like custom missile compact launchers
## Fixed
* Fixed dupe caused by shift-clicking ashes out of the bricked furnace
* Fixed dupe caused by shift-clicking ashes out of the bricked furnace
* Fixed missiles jerkingly rotating when launching, they should now smoothly transition from being part of the launch pad to being an entity
* Fixed missile control and launch smoke shifting around when the player is moving
* Fixed fast-moving missiles spawning too few particles, causing holes in the contrail

View File

@ -16,15 +16,7 @@ import com.hbm.entity.missile.EntityMissileTier3.*;
import com.hbm.entity.missile.EntityMissileTier4.*;
import com.hbm.entity.mob.*;
import com.hbm.entity.mob.botprime.*;
import com.hbm.entity.mob.glyphid.EntityGlyphid;
import com.hbm.entity.mob.glyphid.EntityGlyphidBehemoth;
import com.hbm.entity.mob.glyphid.EntityGlyphidBlaster;
import com.hbm.entity.mob.glyphid.EntityGlyphidBombardier;
import com.hbm.entity.mob.glyphid.EntityGlyphidBrawler;
import com.hbm.entity.mob.glyphid.EntityGlyphidBrenda;
import com.hbm.entity.mob.glyphid.EntityGlyphidDigger;
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
import com.hbm.entity.mob.glyphid.*;
import com.hbm.entity.mob.siege.*;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;

View File

@ -14,10 +14,12 @@ import com.hbm.explosion.vanillant.standard.EntityProcessorCross;
import com.hbm.explosion.vanillant.standard.ExplosionEffectStandard;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.main.MainRegistry;
import com.hbm.util.TrackerUtil;
import api.hbm.entity.IRadarDetectableNT;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.EntityTrackerEntry;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
@ -26,6 +28,7 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
import net.minecraftforge.common.ForgeChunkManager.Type;
@ -66,6 +69,8 @@ public abstract class EntityMissileBaseNT extends EntityThrowableInterp implemen
accelXZ = decelY = 1 / vector.lengthVector();
decelY *= 2;
velocity = 0;
this.rotationYaw = (float) (Math.atan2(targetX - posX, targetZ - posZ) * 180.0D / Math.PI);
this.setSize(1.5F, 1.5F);
}
@ -105,9 +110,12 @@ public abstract class EntityMissileBaseNT extends EntityThrowableInterp implemen
@Override
public void onUpdate() {
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
super.onUpdate();
if(velocity < 4) velocity += 0.025;
if(velocity < 4) velocity += MathHelper.clamp_double(this.ticksExisted / 60D * 0.05D, 0, 0.05);
if(!worldObj.isRemote) {
@ -141,15 +149,18 @@ public abstract class EntityMissileBaseNT extends EntityThrowableInterp implemen
this.setDead();
return;
}
this.rotationYaw = (float) (Math.atan2(targetX - posX, targetZ - posZ) * 180.0D / Math.PI);
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
for(this.rotationPitch = (float) (Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);
EntityTrackerEntry tracker = TrackerUtil.getTrackerEntry((WorldServer) worldObj, this.getEntityId());
if(tracker != null) tracker.lastYaw += 100; //coax the tracker into sending smother updates
loadNeighboringChunks((int) Math.floor(posX / 16), (int) Math.floor(posZ / 16));
} else {
this.spawnContrail();
}
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;
@ -160,8 +171,12 @@ public abstract class EntityMissileBaseNT extends EntityThrowableInterp implemen
}
protected void spawnContrail() {
Vec3 vec = Vec3.createVectorHelper(motionX, motionY, motionZ).normalize();
MainRegistry.proxy.particleControl(posX - vec.xCoord, posY - vec.yCoord, posZ - vec.zCoord, 2);
Vec3 vec = Vec3.createVectorHelper(this.lastTickPosX - this.posX, this.lastTickPosY - this.posY, this.lastTickPosZ - this.posZ);
double len = vec.lengthVector();
vec = vec.normalize();
for(int i = 0; i < Math.max(Math.min(len, 10), 1); i++) {
MainRegistry.proxy.particleControl(posX - vec.xCoord * i, posY - vec.yCoord * i, posZ - vec.zCoord * i, 2);
}
}
@Override

View File

@ -14,10 +14,11 @@ import com.hbm.explosion.vanillant.standard.*;
import com.hbm.handler.pollution.PollutionHandler;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.ResourceManager;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.potion.HbmPotion;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -120,7 +121,7 @@ public class EntityGlyphid extends EntityMob {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getGrunt().damage);
}
public int getDivisorPerArmorPoint() {
public float getDivisorPerArmorPoint() {
return GlyphidStats.getStats().getGrunt().divisor;
}
@ -318,6 +319,14 @@ public class EntityGlyphid extends EntityMob {
maggot.velocityChanged = true;
this.worldObj.spawnEntityInWorld(maggot);
}
worldObj.playSoundEffect(posX, posY, posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
NBTTagCompound vdat = new NBTTagCompound();
vdat.setString("type", "giblets");
vdat.setInteger("ent", this.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(vdat, posX, posY + height * 0.5, posZ), new TargetPoint(dimension, posX, posY + height * 0.5, posZ, 150));
}
}
@ -340,7 +349,7 @@ public class EntityGlyphid extends EntityMob {
public float calculateDamage(float amount) {
byte armor = this.dataWatcher.getWatchableObjectByte(DW_ARMOR);
int divisor = 1;
float divisor = 1;
for(int i = 0; i < 5; i++) {
if((armor & (1 << i)) > 0) {

View File

@ -41,7 +41,7 @@ public class EntityGlyphidBehemoth extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBehemoth().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBehemoth().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBehemoth().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBehemoth().damageThreshold; }
public int timer = 120;

View File

@ -31,7 +31,7 @@ public class EntityGlyphidBlaster extends EntityGlyphidBombardier {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBlaster().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBlaster().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBlaster().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBlaster().damageThreshold; }
@Override

View File

@ -33,7 +33,7 @@ public class EntityGlyphidBombardier extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBombardier().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBombardier().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBombardier().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBombardier().damageThreshold; }
@Override

View File

@ -31,7 +31,7 @@ public class EntityGlyphidBrawler extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBrawler().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBrawler().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBrawler().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBrawler().damageThreshold; }
@Override

View File

@ -37,7 +37,7 @@ public class EntityGlyphidBrenda extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getBrenda().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBrenda().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getBrenda().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getBrenda().damageThreshold; }
@Override

View File

@ -44,7 +44,7 @@ public class EntityGlyphidDigger extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getDigger().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getDigger().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getDigger().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getDigger().damageThreshold; }
public int timer = 0;

View File

@ -54,7 +54,7 @@ public class EntityGlyphidNuclear extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getNuclear().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getNuclear().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getNuclear().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getNuclear().damageThreshold; }
@Override

View File

@ -62,7 +62,7 @@ public class EntityGlyphidScout extends EntityGlyphid {
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(GlyphidStats.getStats().getScout().damage);
}
@Override public int getDivisorPerArmorPoint() { return GlyphidStats.getStats().getScout().divisor; }
@Override public float getDivisorPerArmorPoint() { return GlyphidStats.getStats().getScout().divisor; }
@Override public float getDamageThreshold() { return GlyphidStats.getStats().getScout().damageThreshold; }
@Override

View File

@ -28,10 +28,10 @@ public abstract class GlyphidStats {
public final double health;
public final double speed;
public final double damage;
public final int divisor;
public final float divisor;
public final float damageThreshold;
public StatBundle(double health, double speed, double damage, int divisor, float damageThreshold) {
public StatBundle(double health, double speed, double damage, float divisor, float damageThreshold) {
this.health = health;
this.speed = speed;
this.damage = damage;
@ -55,15 +55,15 @@ public abstract class GlyphidStats {
public static class GlyphidStats70K extends GlyphidStats {
public GlyphidStats70K() {
this.statsGrunt = new StatBundle(30D, 1D, 5D, 1, 0.5F);
this.statsBombardier = new StatBundle(20D, 1D, 5D, 1, 0.5F);
this.statsBrawler = new StatBundle(50D, 1D, 10D, 3, 1F);
this.statsDigger = new StatBundle(50D, 1D, 5D, 1, 0.5F);
this.statsBlaster = new StatBundle(50D, 1D, 10D, 2, 1F);
this.statsBehemoth = new StatBundle(130D, 0.8D, 25D, 4, 2.5F);
this.statsBrenda = new StatBundle(250D, 1.2D, 50D, 5, 10F);
this.statsNuclear = new StatBundle(100D, 0.8D, 50D, 5, 10F);
this.statsScout = new StatBundle(20D, 1.5D, 2D, 1, 0.5F);
this.statsGrunt = new StatBundle(30D, 1D, 5D, 1F, 0.5F);
this.statsBombardier = new StatBundle(20D, 1D, 5D, 1F, 0.5F);
this.statsBrawler = new StatBundle(50D, 1D, 10D, 3F, 1F);
this.statsDigger = new StatBundle(50D, 1D, 5D, 1F, 0.5F);
this.statsBlaster = new StatBundle(50D, 1D, 10D, 2F, 1F);
this.statsBehemoth = new StatBundle(130D, 0.8D, 25D, 4F, 2.5F);
this.statsBrenda = new StatBundle(250D, 1.2D, 50D, 5F, 10F);
this.statsNuclear = new StatBundle(100D, 0.8D, 50D, 5F, 10F);
this.statsScout = new StatBundle(20D, 1.5D, 2D, 1F, 0.5F);
}
@Override

View File

@ -34,6 +34,9 @@ public abstract class EntityThrowableInterp extends EntityThrowableNT {
if(!worldObj.isRemote) {
super.onUpdate();
} else {
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
if(this.turnProgress > 0) {
double interpX = this.posX + (this.syncPosX - this.posX) / (double) this.turnProgress;
double interpY = this.posY + (this.syncPosY - this.posY) / (double) this.turnProgress;

View File

@ -142,9 +142,6 @@ public abstract class EntityThrowableNT extends Entity implements IProjectile {
@Override
public void onUpdate() {
this.lastTickPosX = this.posX;
this.lastTickPosY = this.posY;
this.lastTickPosZ = this.posZ;
super.onUpdate();
if(this.throwableShake > 0) {

View File

@ -3,6 +3,8 @@ package com.hbm.items.tool;
import java.util.ArrayList;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.Enchantment;
@ -43,7 +45,7 @@ public interface IItemAbility {
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if(!(canHarvestBlock(block, stack) || canShearBlock(block, stack, world, x, y, z)) || block == Blocks.bedrock)
if(!(canHarvestBlock(block, stack) || canShearBlock(block, stack, world, x, y, z)) || block == Blocks.bedrock || block == ModBlocks.stone_keyhole)
return;
Block refBlock = world.getBlock(refX, refY, refZ);

View File

@ -66,14 +66,7 @@ import com.hbm.entity.missile.EntityMissileTier3.*;
import com.hbm.entity.missile.EntityMissileTier4.*;
import com.hbm.entity.mob.*;
import com.hbm.entity.mob.botprime.*;
import com.hbm.entity.mob.glyphid.EntityGlyphid;
import com.hbm.entity.mob.glyphid.EntityGlyphidBehemoth;
import com.hbm.entity.mob.glyphid.EntityGlyphidBlaster;
import com.hbm.entity.mob.glyphid.EntityGlyphidBombardier;
import com.hbm.entity.mob.glyphid.EntityGlyphidBrawler;
import com.hbm.entity.mob.glyphid.EntityGlyphidBrenda;
import com.hbm.entity.mob.glyphid.EntityGlyphidNuclear;
import com.hbm.entity.mob.glyphid.EntityGlyphidScout;
import com.hbm.entity.mob.glyphid.*;
import com.hbm.entity.mob.siege.*;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;

View File

@ -8,11 +8,13 @@ import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
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.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
@ -28,9 +30,9 @@ public class ParticleContrail extends EntityFX {
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
theRenderEngine = p_i1213_1_;
maxAge = 100 + rand.nextInt(40);
this.particleRed = this.particleGreen = this.particleBlue = 0;
this.particleScale = 1F;
this.particleRed = this.particleGreen = this.particleBlue = 0;
this.particleScale = 1F;
}
public ParticleContrail(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_, float red, float green, float blue, float scale) {
@ -38,24 +40,23 @@ public class ParticleContrail extends EntityFX {
theRenderEngine = p_i1213_1_;
maxAge = 100 + rand.nextInt(40);
this.particleRed = red;
this.particleGreen = green;
this.particleBlue = blue;
this.particleScale = scale;
this.particleRed = red;
this.particleGreen = green;
this.particleBlue = blue;
this.particleScale = scale;
}
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) {
particleAlpha = 1 - ((float) age / (float) maxAge);
++this.age;
if(this.age == this.maxAge) {
this.setDead();
}
}
@ -65,40 +66,44 @@ public class ParticleContrail extends EntityFX {
}
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);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
RenderHelper.disableStandardItemLighting();
Random urandom = new Random(this.getEntityId());
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
double dX = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double)p_70539_2_;
double dY = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double)p_70539_2_;
double dZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double)p_70539_2_;
for(int i = 0; i < 6; i++) {
p_70539_1_.startDrawingQuads();
float mod = urandom.nextFloat() * 0.2F + 0.2F;
p_70539_1_.setColorRGBA_F(this.particleRed + mod, this.particleGreen + mod, this.particleBlue + mod, this.particleAlpha);
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F);
p_70539_1_.setBrightness(240);
float scale = particleAlpha + 0.5F * this.particleScale;
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);
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double) p_70539_2_ - dX) + urandom.nextGaussian() * 0.5);
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double) p_70539_2_ - dY) + urandom.nextGaussian() * 0.5);
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double) p_70539_2_ - dZ) + 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);
}

View File

@ -8,11 +8,13 @@ import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
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.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@ -73,6 +75,11 @@ public class ParticleSmokePlume extends EntityFX {
RenderHelper.disableStandardItemLighting();
Random urandom = new Random(this.getEntityId());
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
double dX = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double)p_70539_2_;
double dY = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double)p_70539_2_;
double dZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double)p_70539_2_;
for(int i = 0; i < 6; i++) {
@ -85,9 +92,9 @@ public class ParticleSmokePlume extends EntityFX {
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);
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double) p_70539_2_ - dX) + urandom.nextGaussian() * 0.5);
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double) p_70539_2_ - dY) + urandom.nextGaussian() * 0.5);
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double) p_70539_2_ - dZ) + 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);

View File

@ -16,27 +16,26 @@ import net.minecraft.util.ResourceLocation;
public class RenderMissileCustom extends Render {
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
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(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
int w = entity.getDataWatcher().getWatchableObjectInt(9);
int f = entity.getDataWatcher().getWatchableObjectInt(10);
int s = entity.getDataWatcher().getWatchableObjectInt(11);
int t = entity.getDataWatcher().getWatchableObjectInt(12);
MissileMultipart missile = new MissileMultipart();
missile.warhead = MissilePart.getPart(Item.getItemById(w));
missile.fuselage = MissilePart.getPart(Item.getItemById(f));
missile.fins = MissilePart.getPart(Item.getItemById(s));
missile.thruster = MissilePart.getPart(Item.getItemById(t));
MissilePronter.prontMissile(missile, Minecraft.getMinecraft().getTextureManager());
int w = p_76986_1_.getDataWatcher().getWatchableObjectInt(9);
int f = p_76986_1_.getDataWatcher().getWatchableObjectInt(10);
int s = p_76986_1_.getDataWatcher().getWatchableObjectInt(11);
int t = p_76986_1_.getDataWatcher().getWatchableObjectInt(12);
MissileMultipart missile = new MissileMultipart();
missile.warhead = MissilePart.getPart(Item.getItemById(w));
missile.fuselage = MissilePart.getPart(Item.getItemById(f));
missile.fins = MissilePart.getPart(Item.getItemById(s));
missile.thruster = MissilePart.getPart(Item.getItemById(t));
MissilePronter.prontMissile(missile, Minecraft.getMinecraft().getTextureManager());
GL11.glPopMatrix();
}
@ -44,5 +43,4 @@ public class RenderMissileCustom extends Render {
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return ResourceManager.universal;
}
}

View File

@ -9,22 +9,24 @@ import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderMissileDoomsday extends Render {
public RenderMissileDoomsday() { }
public RenderMissileDoomsday() {
}
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
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(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glScalef(2F, 2F, 2F);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
GL11.glScalef(2F, 2F, 2F);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.missileDoomsday_tex);
ResourceManager.missileDoomsday.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.missileDoomsday_tex);
ResourceManager.missileDoomsday.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}

View File

@ -23,6 +23,7 @@ public class RenderMissileGeneric extends Render {
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
if(entity instanceof EntityMissileAntiBallistic) {
bindTexture(ResourceManager.missileAA_tex);

View File

@ -15,21 +15,18 @@ public class RenderMissileHuge extends Render {
}
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
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(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
if(p_76986_1_ instanceof EntityMissileBurst)
bindTexture(ResourceManager.missileHuge_HE_tex);
if(p_76986_1_ instanceof EntityMissileInferno)
bindTexture(ResourceManager.missileHuge_IN_tex);
if(p_76986_1_ instanceof EntityMissileRain)
bindTexture(ResourceManager.missileHuge_CL_tex);
if(p_76986_1_ instanceof EntityMissileDrill)
bindTexture(ResourceManager.missileHuge_BU_tex);
if(entity instanceof EntityMissileBurst) bindTexture(ResourceManager.missileHuge_HE_tex);
if(entity instanceof EntityMissileInferno) bindTexture(ResourceManager.missileHuge_IN_tex);
if(entity instanceof EntityMissileRain) bindTexture(ResourceManager.missileHuge_CL_tex);
if(entity instanceof EntityMissileDrill) bindTexture(ResourceManager.missileHuge_BU_tex);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.missileHuge.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);

View File

@ -13,16 +13,17 @@ public class RenderMissileMirv extends Render {
public RenderMissileMirv() { }
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
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(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
bindTexture(ResourceManager.missileMIRV_tex);
ResourceManager.missileNuclear.renderAll();
bindTexture(ResourceManager.missileMIRV_tex);
ResourceManager.missileNuclear.renderAll();
GL11.glPopMatrix();
}

View File

@ -14,15 +14,16 @@ public class RenderMissileNuclear extends Render {
public RenderMissileNuclear() { }
@Override
public void doRender(Entity missile, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
GL11.glPushMatrix();
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
GL11.glRotatef(missile.prevRotationYaw + (missile.rotationYaw - missile.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(missile.prevRotationPitch + (missile.rotationPitch - missile.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
if(missile instanceof EntityMissileVolcano)
if(entity instanceof EntityMissileVolcano)
bindTexture(ResourceManager.missileVolcano_tex);
else
bindTexture(ResourceManager.missileNuclear_tex);

View File

@ -13,16 +13,16 @@ public class RenderMissileShuttle extends Render {
public RenderMissileShuttle() { }
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glScalef(1F, 1F, 1F);
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);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
bindTexture(ResourceManager.missileShuttle_tex);
ResourceManager.missileShuttle.renderAll();
bindTexture(ResourceManager.missileShuttle_tex);
ResourceManager.missileShuttle.renderAll();
GL11.glPopMatrix();
}

View File

@ -14,24 +14,20 @@ public class RenderMissileStrong extends Render {
public RenderMissileStrong() { }
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
GL11.glPushMatrix();
GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
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);
if(p_76986_1_ instanceof EntityMissileStrong)
bindTexture(ResourceManager.missileStrong_HE_tex);
if(p_76986_1_ instanceof EntityMissileIncendiaryStrong)
bindTexture(ResourceManager.missileStrong_IN_tex);
if(p_76986_1_ instanceof EntityMissileClusterStrong)
bindTexture(ResourceManager.missileStrong_CL_tex);
if(p_76986_1_ instanceof EntityMissileBusterStrong)
bindTexture(ResourceManager.missileStrong_BU_tex);
if(p_76986_1_ instanceof EntityMissileEMPStrong)
bindTexture(ResourceManager.missileStrong_EMP_tex);
if(entity instanceof EntityMissileStrong) bindTexture(ResourceManager.missileStrong_HE_tex);
if(entity instanceof EntityMissileIncendiaryStrong) bindTexture(ResourceManager.missileStrong_IN_tex);
if(entity instanceof EntityMissileClusterStrong) bindTexture(ResourceManager.missileStrong_CL_tex);
if(entity instanceof EntityMissileBusterStrong) bindTexture(ResourceManager.missileStrong_BU_tex);
if(entity instanceof EntityMissileEMPStrong) bindTexture(ResourceManager.missileStrong_EMP_tex);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.missileStrong.renderAll();
GL11.glShadeModel(GL11.GL_FLAT);

View File

@ -15,18 +15,19 @@ public class RenderMissileTaint extends Render {
}
@Override
public void doRender(Entity missile, double x, double y, double z, float f1, float f2) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
GL11.glPushMatrix();
GL11.glTranslatef((float)x, (float)y, (float)z);
GL11.glRotatef(missile.prevRotationYaw + (missile.rotationYaw - missile.prevRotationYaw) * f2 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(missile.prevRotationPitch + (missile.rotationPitch - missile.prevRotationPitch) * f2, 0.0F, 0.0F, 1.0F);
GL11.glScalef(2F, 2F, 2F);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
GL11.glScalef(2F, 2F, 2F);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(getEntityTexture(missile));
ResourceManager.missileTaint.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(getEntityTexture(entity));
ResourceManager.missileTaint.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
}

View File

@ -14,19 +14,18 @@ public class RenderMissileThermo extends Render {
public RenderMissileThermo() { }
@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_) {
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float interp) {
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(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
GL11.glTranslatef((float) x, (float) y, (float) z);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, -1.0F, 0.0F);
GL11.glScalef(1.5F, 1.5F, 1.5F);
if(p_76986_1_ instanceof EntityMissileEndo)
bindTexture(ResourceManager.missileEndo_tex);
if(p_76986_1_ instanceof EntityMissileExo)
bindTexture(ResourceManager.missileExo_tex);
ResourceManager.missileThermo.renderAll();
if(entity instanceof EntityMissileEndo) bindTexture(ResourceManager.missileEndo_tex);
if(entity instanceof EntityMissileExo) bindTexture(ResourceManager.missileExo_tex);
ResourceManager.missileThermo.renderAll();
GL11.glPopMatrix();
}

View File

@ -1,6 +1,7 @@
package com.hbm.tileentity.bomb;
import java.util.HashMap;
import java.util.List;
import org.apache.logging.log4j.Level;
@ -126,6 +127,22 @@ public class TileEntityLaunchPad extends TileEntityMachineBase implements IEnerg
data.setShort("meta", (short) slots[0].getItemDamage());
}
networkPack(data, 250);
} else {
List<EntityMissileBaseNT> entities = worldObj.getEntitiesWithinAABB(EntityMissileBaseNT.class, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord, zCoord - 0.5, xCoord + 1.5, yCoord + 10, zCoord + 1.5));
if(!entities.isEmpty()) {
for(int i = 0; i < 15; i++) {
boolean dir = worldObj.rand.nextBoolean();
float moX = (float) (dir ? 0 : worldObj.rand.nextGaussian() * 0.5F);
float moZ = (float) (!dir ? 0 : worldObj.rand.nextGaussian() * 0.5F);
MainRegistry.proxy.spawnParticle(xCoord + 0.5, yCoord + 0.25, zCoord + 0.5, "launchsmoke", new float[] { moX, 0, moZ });
}
}
}
}
@ -304,7 +321,7 @@ public class TileEntityLaunchPad extends TileEntityMachineBase implements IEnerg
if(clazz != null) {
try {
EntityMissileBaseNT missile = clazz.getConstructor(World.class, float.class, float.class, float.class, int.class, int.class).newInstance(worldObj, xCoord + 0.5F, yCoord + 2F, zCoord + 0.5F, targetX, targetZ);
EntityMissileBaseNT missile = clazz.getConstructor(World.class, float.class, float.class, float.class, int.class, int.class).newInstance(worldObj, xCoord + 0.5F, yCoord + 1F, zCoord + 0.5F, targetX, targetZ);
worldObj.playSoundEffect(xCoord + 0.5, yCoord, zCoord + 0.5, "hbm:weapon.missileTakeOff", 2.0F, 1.0F);
if(GeneralConfig.enableExtendedLogging) MainRegistry.logger.log(Level.INFO, "[MISSILE] Tried to launch missile at " + xCoord + " / " + yCoord + " / " + zCoord + " to " + xCoord + " / " + zCoord + "!");
return missile;