update defensetech textures
feel free to imrpove these
No files matched your search
@@ -97,7 +97,7 @@ task coreJar(type: Jar) {
|
||||
}
|
||||
|
||||
from zipTree(jar.outputs.getFiles().getSingleFile()).matching {
|
||||
exclude 'mekanism/tools/**', 'mekanism/generators/**', 'mekanism/defense/**', 'defense/**', 'mcmod.info', 'mekanism/ultimate/**'
|
||||
exclude 'mekanism/tools/**', 'mekanism/generators/**', 'mekanism/defense/**', 'defense/**', 'assets/defense/**', 'mcmod.info', 'mekanism/ultimate/**'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ task alltJar(type: Jar) {
|
||||
expand 'version': mod_version, 'mc_version': minecraft_version, 'fmp_version': FMP_version
|
||||
}
|
||||
from zipTree(jar.outputs.getFiles().getSingleFile()).matching {
|
||||
exclude 'mcmod.info', 'mekanism/defense/**', 'defense/**', 'mekanism/ultimate/**'
|
||||
exclude 'mcmod.info', 'mekanism/defense/**', 'defense/**', 'assets/defense/**', 'mekanism/ultimate/**'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ task defensetechJar(type: Jar) {
|
||||
}
|
||||
|
||||
from zipTree(jar.outputs.getFiles().getSingleFile()).matching {
|
||||
include 'mekanism/defense/**', 'defense/**'
|
||||
include 'mekanism/defense/**', 'defense/**', 'assets/defense/**'
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.entity.RenderMinecart;
|
||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -38,6 +37,7 @@ import defense.client.gui.GuiRadarStation;
|
||||
import defense.client.render.RenderUtils;
|
||||
import defense.client.render.block.BlockRenderingHandler;
|
||||
import defense.client.render.entity.RenderEntityExplosive;
|
||||
import defense.client.render.entity.RenderBombCart;
|
||||
import defense.client.render.entity.RenderExplosion;
|
||||
import defense.client.render.entity.RenderGrenade;
|
||||
import defense.client.render.entity.RenderLightBeam;
|
||||
@@ -112,7 +112,7 @@ public class ClientProxy extends CommonProxy
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityExplosion.class, new RenderExplosion());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityLightBeam.class, new RenderLightBeam());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderGrenade());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBombCart.class, new RenderMinecart());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBombCart.class, new RenderBombCart());
|
||||
|
||||
RenderingRegistry.registerBlockHandler(new RenderBombBlock());
|
||||
RenderingRegistry.registerBlockHandler(new BlockRenderingHandler());
|
||||
|
||||
@@ -1,265 +1,34 @@
|
||||
package defense.client.model.missile;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.tmt.ModelRendererTurbo;
|
||||
|
||||
/** Anvil-derived T4 airframe with a compact layered containment warhead. */
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelAntimatterMissile extends ModelMissileBase
|
||||
public class ModelAntimatterMissile extends ModelT4AnvilMissile
|
||||
{
|
||||
// fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape36;
|
||||
ModelRenderer Shape4a;
|
||||
ModelRenderer Shape5a;
|
||||
ModelRenderer Shape6a;
|
||||
ModelRenderer Shape6b;
|
||||
ModelRenderer Shape6c;
|
||||
ModelRenderer Shape6d;
|
||||
ModelRenderer Shape6e;
|
||||
ModelRenderer Shape6f;
|
||||
ModelRenderer Shape6g;
|
||||
ModelRenderer Shape6h;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
ModelRenderer Shape9;
|
||||
ModelRenderer Shape10a;
|
||||
ModelRenderer Shape10b;
|
||||
ModelRenderer Shape10c;
|
||||
ModelRenderer Shape10d;
|
||||
ModelRenderer Shape11a;
|
||||
ModelRenderer Shape11b;
|
||||
ModelRenderer Shape2e;
|
||||
ModelRenderer Shape12;
|
||||
ModelRenderer Shape13;
|
||||
ModelRenderer Shape14;
|
||||
|
||||
public ModelAntimatterMissile()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
int textureX = 32;
|
||||
int textureY = 128;
|
||||
|
||||
Shape1 = new ModelRenderer(this, 27, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 8, 10, 14);
|
||||
Shape1.setRotationPoint(-8F, 14F, -2F);
|
||||
Shape1.setTextureSize(128, 128);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0.7853982F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 27, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 8, 10, 14);
|
||||
Shape2.setRotationPoint(2F, 14F, -8F);
|
||||
Shape2.setTextureSize(128, 128);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, -0.7853982F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 36, 47);
|
||||
Shape3.addBox(0F, 0F, 0F, 21, 11, 2);
|
||||
Shape3.setRotationPoint(-8F, 13F, 7F);
|
||||
Shape3.setTextureSize(128, 128);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0.7853982F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 36, 47);
|
||||
Shape4.addBox(0F, 0F, 0F, 21, 11, 2);
|
||||
Shape4.setRotationPoint(-7F, 13F, -8F);
|
||||
Shape4.setTextureSize(128, 128);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, -0.7853982F, 0F);
|
||||
Shape36 = new ModelRenderer(this, 0, 0);
|
||||
Shape36.addBox(0F, 0F, 0F, 6, 40, 6);
|
||||
Shape36.setRotationPoint(-3F, -26F, -3F);
|
||||
Shape36.setTextureSize(128, 128);
|
||||
Shape36.mirror = true;
|
||||
setRotation(Shape36, 0F, 0F, 0F);
|
||||
Shape4a = new ModelRenderer(this, 27, 25);
|
||||
Shape4a.addBox(0F, 0F, 0F, 10, 10, 10);
|
||||
Shape4a.setRotationPoint(-5F, 4F, -5F);
|
||||
Shape4a.setTextureSize(128, 128);
|
||||
Shape4a.mirror = true;
|
||||
setRotation(Shape4a, 0F, 0F, 0F);
|
||||
Shape5a = new ModelRenderer(this, 72, 31);
|
||||
Shape5a.addBox(0F, 0F, 0F, 8, 4, 8);
|
||||
Shape5a.setRotationPoint(-4F, -30F, -4F);
|
||||
Shape5a.setTextureSize(128, 128);
|
||||
Shape5a.mirror = true;
|
||||
setRotation(Shape5a, 0F, 0F, 0F);
|
||||
Shape6a = new ModelRenderer(this, 89, 8);
|
||||
Shape6a.addBox(0F, 0F, 0F, 2, 5, 1);
|
||||
Shape6a.setRotationPoint(-1F, -35F, 3F);
|
||||
Shape6a.setTextureSize(128, 128);
|
||||
Shape6a.mirror = true;
|
||||
setRotation(Shape6a, 0F, 0F, 0F);
|
||||
Shape6b = new ModelRenderer(this, 89, 8);
|
||||
Shape6b.addBox(0F, 0F, 0F, 1, 5, 2);
|
||||
Shape6b.setRotationPoint(3F, -35F, -1F);
|
||||
Shape6b.setTextureSize(128, 128);
|
||||
Shape6b.mirror = true;
|
||||
setRotation(Shape6b, 0F, 0F, 0F);
|
||||
Shape6c = new ModelRenderer(this, 89, 8);
|
||||
Shape6c.addBox(0F, 0F, 0F, 1, 5, 2);
|
||||
Shape6c.setRotationPoint(-4F, -35F, -1F);
|
||||
Shape6c.setTextureSize(128, 128);
|
||||
Shape6c.mirror = true;
|
||||
setRotation(Shape6c, 0F, 0F, 0F);
|
||||
Shape6d = new ModelRenderer(this, 89, 8);
|
||||
Shape6d.addBox(0F, 0F, 0F, 2, 5, 1);
|
||||
Shape6d.setRotationPoint(-1F, -35F, -4F);
|
||||
Shape6d.setTextureSize(128, 128);
|
||||
Shape6d.mirror = true;
|
||||
setRotation(Shape6d, 0F, 0F, 0F);
|
||||
Shape6e = new ModelRenderer(this, 103, 8);
|
||||
Shape6e.addBox(0F, 0F, 0F, 1, 5, 2);
|
||||
Shape6e.setRotationPoint(-2F, -39F, -1F);
|
||||
Shape6e.setTextureSize(128, 128);
|
||||
Shape6e.mirror = true;
|
||||
setRotation(Shape6e, 0F, 0F, 0.4014257F);
|
||||
Shape6f = new ModelRenderer(this, 103, 8);
|
||||
Shape6f.addBox(0F, 0F, 0F, 1, 5, 2);
|
||||
Shape6f.setRotationPoint(1F, -39F, -1F);
|
||||
Shape6f.setTextureSize(128, 128);
|
||||
Shape6f.mirror = true;
|
||||
setRotation(Shape6f, 0F, 0F, -0.4014257F);
|
||||
Shape6g = new ModelRenderer(this, 96, 8);
|
||||
Shape6g.addBox(0F, 0F, 0F, 2, 5, 1);
|
||||
Shape6g.setRotationPoint(-1F, -39F, -2F);
|
||||
Shape6g.setTextureSize(128, 128);
|
||||
Shape6g.mirror = true;
|
||||
setRotation(Shape6g, -0.4014257F, 0F, 0F);
|
||||
Shape6h = new ModelRenderer(this, 96, 8);
|
||||
Shape6h.addBox(0F, 0F, 0F, 2, 5, 1);
|
||||
Shape6h.setRotationPoint(-1F, -39F, 1F);
|
||||
Shape6h.setTextureSize(128, 128);
|
||||
Shape6h.mirror = true;
|
||||
setRotation(Shape6h, 0.4014257F, 0F, 0F);
|
||||
Shape7 = new ModelRenderer(this, 110, 0);
|
||||
Shape7.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Shape7.setRotationPoint(-2F, -40F, -2F);
|
||||
Shape7.setTextureSize(128, 128);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 0F, 0F, 0F);
|
||||
Shape8 = new ModelRenderer(this, 110, 19);
|
||||
Shape8.addBox(0F, 0F, 0F, 4, 5, 4);
|
||||
Shape8.setRotationPoint(-2F, -35F, -2F);
|
||||
Shape8.setTextureSize(128, 128);
|
||||
Shape8.mirror = true;
|
||||
setRotation(Shape8, 0F, 0F, 0F);
|
||||
Shape9 = new ModelRenderer(this, 110, 8);
|
||||
Shape9.addBox(0F, 0F, 0F, 2, 8, 2);
|
||||
Shape9.setRotationPoint(-1F, -43F, -1F);
|
||||
Shape9.setTextureSize(128, 128);
|
||||
Shape9.mirror = true;
|
||||
setRotation(Shape9, 0F, 0F, 0F);
|
||||
Shape10a = new ModelRenderer(this, 72, 8);
|
||||
Shape10a.addBox(0F, 0F, 0F, 6, 6, 2);
|
||||
Shape10a.setRotationPoint(8F, -23F, 1F);
|
||||
Shape10a.setTextureSize(128, 128);
|
||||
Shape10a.mirror = true;
|
||||
// Wing 1
|
||||
setRotation(Shape10a, 0F, -3.141593F, 0.7853982F);
|
||||
Shape10b = new ModelRenderer(this, 72, 17);
|
||||
Shape10b.addBox(0F, 0F, 0F, 2, 6, 6);
|
||||
Shape10b.setRotationPoint(-1F, -23F, -8F);
|
||||
Shape10b.setTextureSize(128, 128);
|
||||
Shape10b.mirror = true;
|
||||
setRotation(Shape10b, 0.7853982F, 0F, 0F);
|
||||
Shape10c = new ModelRenderer(this, 72, 8);
|
||||
Shape10c.addBox(0F, 0F, 0F, 6, 6, 2);
|
||||
Shape10c.setRotationPoint(-8F, -23F, -1F);
|
||||
Shape10c.setTextureSize(128, 128);
|
||||
Shape10c.mirror = true;
|
||||
setRotation(Shape10c, 0F, 0F, -0.7853982F);
|
||||
Shape10d = new ModelRenderer(this, 72, 8);
|
||||
Shape10d.addBox(0F, 0F, 0F, 6, 6, 2);
|
||||
Shape10d.setRotationPoint(-1F, -23F, 8F);
|
||||
Shape10d.setTextureSize(128, 128);
|
||||
Shape10d.mirror = true;
|
||||
// Wing 2
|
||||
setRotation(Shape10d, 0F, 1.570796F, -0.7853982F);
|
||||
Shape11a = new ModelRenderer(this, 72, 0);
|
||||
Shape11a.addBox(0F, 0F, 0F, 16, 5, 2);
|
||||
Shape11a.setRotationPoint(-8F, -23F, -1F);
|
||||
Shape11a.setTextureSize(128, 128);
|
||||
Shape11a.mirror = true;
|
||||
setRotation(Shape11a, 0F, 0F, 0F);
|
||||
Shape11b = new ModelRenderer(this, 72, 0);
|
||||
Shape11b.addBox(0F, 0F, 0F, 16, 5, 2);
|
||||
Shape11b.setRotationPoint(-1F, -23F, 8F);
|
||||
Shape11b.setTextureSize(128, 128);
|
||||
Shape11b.mirror = true;
|
||||
setRotation(Shape11b, 0F, 1.570796F, 0F);
|
||||
Shape2e = new ModelRenderer(this, 0, 103);
|
||||
Shape2e.addBox(0F, 0F, 0F, 16, 10, 4);
|
||||
Shape2e.setRotationPoint(-8F, 14F, -2F);
|
||||
Shape2e.setTextureSize(128, 128);
|
||||
Shape2e.mirror = true;
|
||||
setRotation(Shape2e, 0F, 0F, 0F);
|
||||
Shape12 = new ModelRenderer(this, 0, 76);
|
||||
Shape12.addBox(0F, 0F, 0F, 4, 10, 16);
|
||||
Shape12.setRotationPoint(-2F, 14F, -8F);
|
||||
Shape12.setTextureSize(128, 128);
|
||||
Shape12.mirror = true;
|
||||
setRotation(Shape12, 0F, 0F, 0F);
|
||||
Shape13 = new ModelRenderer(this, 0, 47);
|
||||
Shape13.addBox(0F, 0F, 0F, 3, 14, 14);
|
||||
Shape13.setRotationPoint(6F, 13F, -8F);
|
||||
Shape13.setTextureSize(128, 128);
|
||||
Shape13.mirror = true;
|
||||
setRotation(Shape13, 0.7853982F, -0.7853982F, 0F);
|
||||
Shape14 = new ModelRenderer(this, 0, 47);
|
||||
Shape14.addBox(0F, 0F, 0F, 3, 14, 14);
|
||||
Shape14.setRotationPoint(8F, 13F, 6F);
|
||||
Shape14.setTextureSize(128, 128);
|
||||
Shape14.mirror = true;
|
||||
setRotation(Shape14, 0.7853982F, -2.356194F, 0F);
|
||||
}
|
||||
warheadModel = new ModelRendererTurbo[4];
|
||||
warheadModel[0] = new ModelRendererTurbo(this, 0, 76, textureX, textureY);
|
||||
warheadModel[1] = new ModelRendererTurbo(this, 0, 84, textureX, textureY);
|
||||
warheadModel[2] = new ModelRendererTurbo(this, 0, 97, textureX, textureY);
|
||||
warheadModel[3] = new ModelRendererTurbo(this, 24, 76, textureX, textureY);
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.render(f5);
|
||||
}
|
||||
warheadModel[0].addBox(-3F, -1F, -3F, 6, 2, 6, 0F);
|
||||
warheadModel[0].setRotationPoint(0F, -21F, 0F);
|
||||
|
||||
@Override
|
||||
public void render(float f5)
|
||||
{
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape36.render(f5);
|
||||
Shape4a.render(f5);
|
||||
Shape5a.render(f5);
|
||||
Shape6a.render(f5);
|
||||
Shape6b.render(f5);
|
||||
Shape6c.render(f5);
|
||||
Shape6d.render(f5);
|
||||
Shape6e.render(f5);
|
||||
Shape6f.render(f5);
|
||||
Shape6g.render(f5);
|
||||
Shape6h.render(f5);
|
||||
Shape7.render(f5);
|
||||
Shape8.render(f5);
|
||||
Shape9.render(f5);
|
||||
Shape10a.render(f5);
|
||||
Shape10b.render(f5);
|
||||
Shape10c.render(f5);
|
||||
Shape10d.render(f5);
|
||||
Shape11a.render(f5);
|
||||
Shape11b.render(f5);
|
||||
Shape2e.render(f5);
|
||||
Shape12.render(f5);
|
||||
Shape13.render(f5);
|
||||
Shape14.render(f5);
|
||||
}
|
||||
warheadModel[1].addBox(-4F, -1F, -4F, 8, 5, 8, 0F);
|
||||
warheadModel[1].setRotationPoint(0F, -26F, 0F);
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
warheadModel[2].addBox(-3F, -1F, -3F, 6, 3, 6, 0F);
|
||||
warheadModel[2].setRotationPoint(0F, -29F, 0F);
|
||||
|
||||
warheadModel[3].addBox(-1F, -1F, -1F, 2, 3, 2, 0F);
|
||||
warheadModel[3].setRotationPoint(0F, -32F, 0F);
|
||||
}
|
||||
}
|
||||
@@ -1,264 +1,34 @@
|
||||
package defense.client.model.missile;
|
||||
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.tmt.ModelRendererTurbo;
|
||||
|
||||
/** Anvil-derived T4 airframe with a narrow field-projector warhead. */
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelRedMatterMissile extends ModelMissileBase
|
||||
public class ModelRedMatterMissile extends ModelT4AnvilMissile
|
||||
{
|
||||
// fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape1a;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape2a;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape6a;
|
||||
ModelRenderer Shape6b;
|
||||
ModelRenderer Shape6c;
|
||||
ModelRenderer Shape6d;
|
||||
ModelRenderer Shape6e;
|
||||
ModelRenderer Shape6f;
|
||||
ModelRenderer Shape6g;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
ModelRenderer Shape9;
|
||||
ModelRenderer Shape10;
|
||||
ModelRenderer Shape10a;
|
||||
ModelRenderer Shape10b;
|
||||
ModelRenderer Shape10c;
|
||||
ModelRenderer Shape11d;
|
||||
ModelRenderer Shape11e;
|
||||
ModelRenderer Shape2z;
|
||||
ModelRenderer Shape12;
|
||||
ModelRenderer Shape13;
|
||||
ModelRenderer Shape14;
|
||||
|
||||
public ModelRedMatterMissile()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
int textureX = 32;
|
||||
int textureY = 128;
|
||||
|
||||
Shape1 = new ModelRenderer(this, 27, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 8, 10, 14);
|
||||
Shape1.setRotationPoint(-8F, 14F, -2F);
|
||||
Shape1.setTextureSize(128, 128);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0.7853982F, 0F);
|
||||
Shape1a = new ModelRenderer(this, 27, 0);
|
||||
Shape1a.addBox(0F, 0F, 0F, 8, 10, 14);
|
||||
Shape1a.setRotationPoint(2F, 14F, -8F);
|
||||
Shape1a.setTextureSize(128, 128);
|
||||
Shape1a.mirror = true;
|
||||
setRotation(Shape1a, 0F, -0.7853982F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 36, 47);
|
||||
Shape2.addBox(0F, 0F, 0F, 21, 11, 2);
|
||||
Shape2.setRotationPoint(-8F, 13F, 7F);
|
||||
Shape2.setTextureSize(128, 128);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0.7853982F, 0F);
|
||||
Shape2a = new ModelRenderer(this, 36, 47);
|
||||
Shape2a.addBox(0F, 0F, 0F, 21, 11, 2);
|
||||
Shape2a.setRotationPoint(-7F, 13F, -8F);
|
||||
Shape2a.setTextureSize(128, 128);
|
||||
Shape2a.mirror = true;
|
||||
setRotation(Shape2a, 0F, -0.7853982F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 0);
|
||||
Shape3.addBox(0F, 0F, 0F, 6, 40, 6);
|
||||
Shape3.setRotationPoint(-3F, -26F, -3F);
|
||||
Shape3.setTextureSize(128, 128);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 27, 25);
|
||||
Shape4.addBox(0F, 0F, 0F, 10, 10, 10);
|
||||
Shape4.setRotationPoint(-5F, 4F, -5F);
|
||||
Shape4.setTextureSize(128, 128);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 72, 31);
|
||||
Shape5.addBox(0F, 0F, 0F, 8, 4, 8);
|
||||
Shape5.setRotationPoint(-4F, -30F, -4F);
|
||||
Shape5.setTextureSize(128, 128);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
Shape6 = new ModelRenderer(this, 89, 17);
|
||||
Shape6.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
Shape6.setRotationPoint(-1F, -35F, 4F);
|
||||
Shape6.setTextureSize(128, 128);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
Shape6a = new ModelRenderer(this, 89, 17);
|
||||
Shape6a.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
Shape6a.setRotationPoint(4F, -35F, -1F);
|
||||
Shape6a.setTextureSize(128, 128);
|
||||
Shape6a.mirror = true;
|
||||
setRotation(Shape6a, 0F, 0F, 0F);
|
||||
Shape6b = new ModelRenderer(this, 89, 17);
|
||||
Shape6b.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
Shape6b.setRotationPoint(-6F, -35F, -1F);
|
||||
Shape6b.setTextureSize(128, 128);
|
||||
Shape6b.mirror = true;
|
||||
setRotation(Shape6b, 0F, 0F, 0F);
|
||||
Shape6c = new ModelRenderer(this, 89, 17);
|
||||
Shape6c.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
Shape6c.setRotationPoint(-1F, -35F, -6F);
|
||||
Shape6c.setTextureSize(128, 128);
|
||||
Shape6c.mirror = true;
|
||||
setRotation(Shape6c, 0F, 0F, 0F);
|
||||
Shape6d = new ModelRenderer(this, 103, 8);
|
||||
Shape6d.addBox(0F, 0F, 0F, 1, 6, 2);
|
||||
Shape6d.setRotationPoint(-2F, -39F, -1F);
|
||||
Shape6d.setTextureSize(128, 128);
|
||||
Shape6d.mirror = true;
|
||||
setRotation(Shape6d, 0F, 0F, 0.6108652F);
|
||||
Shape6e = new ModelRenderer(this, 103, 8);
|
||||
Shape6e.addBox(0F, 0F, 0F, 1, 6, 2);
|
||||
Shape6e.setRotationPoint(1F, -39F, -1F);
|
||||
Shape6e.setTextureSize(128, 128);
|
||||
Shape6e.mirror = true;
|
||||
setRotation(Shape6e, 0F, 0F, -0.6108652F);
|
||||
Shape6f = new ModelRenderer(this, 96, 8);
|
||||
Shape6f.addBox(0F, 0F, 0F, 2, 6, 1);
|
||||
Shape6f.setRotationPoint(-1F, -39F, -2F);
|
||||
Shape6f.setTextureSize(128, 128);
|
||||
Shape6f.mirror = true;
|
||||
setRotation(Shape6f, -0.6108652F, 0F, 0F);
|
||||
Shape6g = new ModelRenderer(this, 96, 8);
|
||||
Shape6g.addBox(0F, 0F, 0F, 2, 6, 1);
|
||||
Shape6g.setRotationPoint(-1F, -39F, 1F);
|
||||
Shape6g.setTextureSize(128, 128);
|
||||
Shape6g.mirror = true;
|
||||
setRotation(Shape6g, 0.6108652F, 0F, 0F);
|
||||
Shape7 = new ModelRenderer(this, 110, 0);
|
||||
Shape7.addBox(0F, 0F, 0F, 4, 2, 4);
|
||||
Shape7.setRotationPoint(-2F, -40F, -2F);
|
||||
Shape7.setTextureSize(128, 128);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 0F, 0F, 0F);
|
||||
Shape8 = new ModelRenderer(this, 84, 46);
|
||||
Shape8.addBox(0F, 0F, 0F, 10, 5, 10);
|
||||
Shape8.setRotationPoint(-5F, -34F, -5F);
|
||||
Shape8.setTextureSize(128, 128);
|
||||
Shape8.mirror = true;
|
||||
setRotation(Shape8, 0F, 0F, 0F);
|
||||
Shape9 = new ModelRenderer(this, 110, 8);
|
||||
Shape9.addBox(0F, 0F, 0F, 2, 8, 2);
|
||||
Shape9.setRotationPoint(-1F, -42F, -1F);
|
||||
Shape9.setTextureSize(128, 128);
|
||||
Shape9.mirror = true;
|
||||
setRotation(Shape9, 0F, 0F, 0F);
|
||||
Shape10 = new ModelRenderer(this, 72, 8);
|
||||
Shape10.addBox(0F, 0F, 0F, 6, 6, 2);
|
||||
Shape10.setRotationPoint(8F, -23F, 1F);
|
||||
Shape10.setTextureSize(128, 128);
|
||||
Shape10.mirror = false;
|
||||
setRotation(Shape10, 0F, -3.141593F, -0.7853982F);
|
||||
Shape10a = new ModelRenderer(this, 72, 17);
|
||||
Shape10a.addBox(0F, 0F, 0F, 2, 6, 6);
|
||||
Shape10a.setRotationPoint(-1F, -23F, -8F);
|
||||
Shape10a.setTextureSize(128, 128);
|
||||
Shape10a.mirror = false;
|
||||
setRotation(Shape10a, 0.7853982F, 0F, 0F);
|
||||
Shape10b = new ModelRenderer(this, 72, 8);
|
||||
Shape10b.addBox(0F, 0F, 0F, 6, 6, 2);
|
||||
Shape10b.setRotationPoint(-8F, -23F, -1F);
|
||||
Shape10b.setTextureSize(128, 128);
|
||||
Shape10b.mirror = false;
|
||||
setRotation(Shape10b, 0F, 0F, -0.7853982F);
|
||||
Shape10c = new ModelRenderer(this, 72, 8);
|
||||
Shape10c.addBox(0F, 0F, 0F, 6, 6, 2);
|
||||
Shape10c.setRotationPoint(-1F, -23F, 8F);
|
||||
Shape10c.setTextureSize(128, 128);
|
||||
Shape10c.mirror = false;
|
||||
setRotation(Shape10c, 0F, 1.570796F, -0.7853982F);
|
||||
Shape11d = new ModelRenderer(this, 72, 0);
|
||||
Shape11d.addBox(0F, 0F, 0F, 16, 5, 2);
|
||||
Shape11d.setRotationPoint(-8F, -23F, -1F);
|
||||
Shape11d.setTextureSize(128, 128);
|
||||
Shape11d.mirror = true;
|
||||
setRotation(Shape11d, 0F, 0F, 0F);
|
||||
Shape11e = new ModelRenderer(this, 72, 0);
|
||||
Shape11e.addBox(0F, 0F, 0F, 16, 5, 2);
|
||||
Shape11e.setRotationPoint(-1F, -23F, 8F);
|
||||
Shape11e.setTextureSize(128, 128);
|
||||
Shape11e.mirror = true;
|
||||
setRotation(Shape11e, 0F, 1.570796F, 0F);
|
||||
Shape2z = new ModelRenderer(this, 0, 103);
|
||||
Shape2z.addBox(0F, 0F, 0F, 16, 10, 4);
|
||||
Shape2z.setRotationPoint(-8F, 14F, -2F);
|
||||
Shape2z.setTextureSize(128, 128);
|
||||
Shape2z.mirror = true;
|
||||
setRotation(Shape2z, 0F, 0F, 0F);
|
||||
Shape12 = new ModelRenderer(this, 0, 76);
|
||||
Shape12.addBox(0F, 0F, 0F, 4, 10, 16);
|
||||
Shape12.setRotationPoint(-2F, 14F, -8F);
|
||||
Shape12.setTextureSize(128, 128);
|
||||
Shape12.mirror = true;
|
||||
setRotation(Shape12, 0F, 0F, 0F);
|
||||
Shape13 = new ModelRenderer(this, 0, 47);
|
||||
Shape13.addBox(0F, 0F, 0F, 3, 14, 14);
|
||||
Shape13.setRotationPoint(6F, 13F, -8F);
|
||||
Shape13.setTextureSize(128, 128);
|
||||
Shape13.mirror = true;
|
||||
setRotation(Shape13, 0.7853982F, -0.7853982F, 0F);
|
||||
Shape14 = new ModelRenderer(this, 0, 47);
|
||||
Shape14.addBox(0F, 0F, 0F, 3, 14, 14);
|
||||
Shape14.setRotationPoint(8F, 13F, 6F);
|
||||
Shape14.setTextureSize(128, 128);
|
||||
Shape14.mirror = true;
|
||||
setRotation(Shape14, 0.7853982F, -2.356194F, 0F);
|
||||
}
|
||||
warheadModel = new ModelRendererTurbo[4];
|
||||
warheadModel[0] = new ModelRendererTurbo(this, 0, 76, textureX, textureY);
|
||||
warheadModel[1] = new ModelRendererTurbo(this, 0, 84, textureX, textureY);
|
||||
warheadModel[2] = new ModelRendererTurbo(this, 0, 96, textureX, textureY);
|
||||
warheadModel[3] = new ModelRendererTurbo(this, 24, 96, textureX, textureY);
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
warheadModel[0].addBox(-3F, -1F, -3F, 6, 2, 6, 0F);
|
||||
warheadModel[0].setRotationPoint(0F, -21F, 0F);
|
||||
|
||||
this.render(f5);
|
||||
}
|
||||
warheadModel[1].addBox(-4F, -1F, -4F, 8, 4, 8, 0F);
|
||||
warheadModel[1].setRotationPoint(0F, -25F, 0F);
|
||||
|
||||
@Override
|
||||
public void render(float f5)
|
||||
{
|
||||
Shape1.render(f5);
|
||||
Shape1a.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape2a.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
Shape6a.render(f5);
|
||||
Shape6b.render(f5);
|
||||
Shape6c.render(f5);
|
||||
Shape6d.render(f5);
|
||||
Shape6e.render(f5);
|
||||
Shape6f.render(f5);
|
||||
Shape6g.render(f5);
|
||||
Shape7.render(f5);
|
||||
Shape8.render(f5);
|
||||
Shape9.render(f5);
|
||||
Shape10.render(f5);
|
||||
Shape10a.render(f5);
|
||||
Shape10b.render(f5);
|
||||
Shape10c.render(f5);
|
||||
Shape11d.render(f5);
|
||||
Shape11e.render(f5);
|
||||
Shape2z.render(f5);
|
||||
Shape12.render(f5);
|
||||
Shape13.render(f5);
|
||||
Shape14.render(f5);
|
||||
}
|
||||
warheadModel[2].addBox(-3F, -1F, -3F, 6, 4, 6, 0F);
|
||||
warheadModel[2].setRotationPoint(0F, -29F, 0F);
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
warheadModel[3].addBox(-1F, -1F, -1F, 2, 4, 2, 0F);
|
||||
warheadModel[3].setRotationPoint(0F, -33F, 0F);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package defense.client.model.missile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.tmt.ModelRendererTurbo;
|
||||
|
||||
/**
|
||||
* Keeps the approved Anvil missile airframe and its four side boosters while
|
||||
* allowing T4 payloads to replace the Anvil-specific fist/rock warhead.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class ModelT4AnvilMissile extends ModelAnvilMissile
|
||||
{
|
||||
protected ModelRendererTurbo[] warheadModel;
|
||||
|
||||
protected ModelT4AnvilMissile()
|
||||
{
|
||||
// ModelAnvilMissile indices 25..39 form the payload-specific fist.
|
||||
// The central airframe, fins, and side boosters remain untouched.
|
||||
for(int index = 25; index <= 39; index++)
|
||||
{
|
||||
bodyModel[index] = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(float scale)
|
||||
{
|
||||
super.render(scale);
|
||||
|
||||
if(warheadModel != null)
|
||||
{
|
||||
for(ModelRendererTurbo model : warheadModel)
|
||||
{
|
||||
if(model != null)
|
||||
{
|
||||
model.render(scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package defense.client.model.tile;
|
||||
|
||||
import mekanism.client.model.ModelObsidianTNT;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
|
||||
/**
|
||||
* DefenseTech adapter for Mekanism's shared nine-charge explosive geometry.
|
||||
* Payloads provide their own original DefenseTech texture atlases.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelExplosiveBundle extends ModelMissileBase
|
||||
{
|
||||
public static final ModelExplosiveBundle INSTANCE = new ModelExplosiveBundle();
|
||||
|
||||
private final ModelObsidianTNT model = new ModelObsidianTNT();
|
||||
|
||||
private ModelExplosiveBundle() {}
|
||||
|
||||
@Override
|
||||
public void render(float size)
|
||||
{
|
||||
model.render(size);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package defense.client.render.entity;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.entity.RenderTntMinecart;
|
||||
import net.minecraft.entity.item.EntityMinecartTNT;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.common.entity.EntityBombCart;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.ExplosiveRegistry;
|
||||
|
||||
/** Renders custom explosive payload models in bomb carts while retaining TNT fuse effects. */
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBombCart extends RenderTntMinecart
|
||||
{
|
||||
@Override
|
||||
protected void func_147910_a(EntityMinecartTNT entity, float partialTick, Block block, int metadata)
|
||||
{
|
||||
if(!(entity instanceof EntityBombCart))
|
||||
{
|
||||
super.func_147910_a(entity, partialTick, block, metadata);
|
||||
return;
|
||||
}
|
||||
|
||||
Explosive explosive = ExplosiveRegistry.get(((EntityBombCart)entity).explosiveID);
|
||||
if(explosive == null || explosive.getBlockModel() == null || explosive.getBlockResource() == null)
|
||||
{
|
||||
super.func_147910_a(entity, partialTick, block, metadata);
|
||||
return;
|
||||
}
|
||||
|
||||
int fuse = entity.func_94104_d();
|
||||
if(fuse > -1 && (float)fuse - partialTick + 1.0F < 10.0F)
|
||||
{
|
||||
float pulse = 1.0F - ((float)fuse - partialTick + 1.0F) / 10.0F;
|
||||
pulse = Math.max(0.0F, Math.min(1.0F, pulse));
|
||||
pulse *= pulse;
|
||||
pulse *= pulse;
|
||||
float scale = 1.0F + pulse * 0.3F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
}
|
||||
|
||||
renderModel(explosive, true);
|
||||
|
||||
if(fuse > -1 && fuse / 5 % 2 == 0)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, (1.0F - ((float)fuse - partialTick + 1.0F) / 100.0F) * 0.8F);
|
||||
renderModel(explosive, false);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
}
|
||||
|
||||
private void renderModel(Explosive explosive, boolean bindTexture)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
// RenderMinecart already applies its 0.75 display-payload scale.
|
||||
// Center the shared model around the same local origin as a block.
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
if(bindTexture)
|
||||
{
|
||||
bindTexture(explosive.getBlockResource());
|
||||
}
|
||||
explosive.getBlockModel().render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.render.RenderUtils;
|
||||
import defense.common.DefenseTechBlocks;
|
||||
import defense.common.entity.EntityExplosive;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.ExplosiveRegistry;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderEntityExplosive extends Render
|
||||
@@ -53,8 +55,9 @@ public class RenderEntityExplosive extends Render
|
||||
}
|
||||
|
||||
f2 = (1.0F - (entityExplosive.fuse - par9 + 1.0F) / 100.0F) * 0.8F;
|
||||
RenderUtils.setTerrainTexture();
|
||||
this.blockRenderer.renderBlockAsItem(DefenseTechBlocks.blockExplosive, entityExplosive.explosiveID, entityExplosive.getBrightness(par9));
|
||||
Explosive explosive = ExplosiveRegistry.get(entityExplosive.explosiveID);
|
||||
boolean customModel = explosive != null && explosive.getBlockModel() != null && explosive.getBlockResource() != null;
|
||||
renderExplosive(entityExplosive, explosive, customModel, entityExplosive.getBrightness(par9), true);
|
||||
|
||||
if (entityExplosive.fuse / 5 % 2 == 0)
|
||||
{
|
||||
@@ -63,7 +66,7 @@ public class RenderEntityExplosive extends Render
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, f2);
|
||||
this.blockRenderer.renderBlockAsItem(DefenseTechBlocks.blockExplosive, entityExplosive.explosiveID, 1.0F);
|
||||
renderExplosive(entityExplosive, explosive, customModel, 1.0F, false);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
@@ -73,6 +76,35 @@ public class RenderEntityExplosive extends Render
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderExplosive(EntityExplosive entityExplosive, Explosive explosive, boolean customModel, float brightness, boolean bindTexture)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if(customModel)
|
||||
{
|
||||
// Match Mekanism's primed Obsidian TNT presentation rather than
|
||||
// the ground-aligned tile transform.
|
||||
GL11.glTranslatef(0.0F, 1.2F, 0.0F);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
if(bindTexture)
|
||||
{
|
||||
bindTexture(explosive.getBlockResource());
|
||||
}
|
||||
explosive.getBlockModel().render(0.0625F);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(bindTexture)
|
||||
{
|
||||
RenderUtils.setTerrainTexture();
|
||||
}
|
||||
blockRenderer.renderBlockAsItem(DefenseTechBlocks.blockExplosive, entityExplosive.explosiveID, brightness);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
|
||||
@@ -48,6 +48,9 @@ public class RenderMissile extends Render
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
}
|
||||
|
||||
float tierScale = getTierScale(missile.getTier());
|
||||
GL11.glScalef(tierScale, tierScale, tierScale);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(missile.getMissileResource());
|
||||
|
||||
synchronized (cache)
|
||||
@@ -64,9 +67,15 @@ public class RenderMissile extends Render
|
||||
}
|
||||
}
|
||||
|
||||
public static float getTierScale(int tier)
|
||||
{
|
||||
int clampedTier = Math.max(1, Math.min(4, tier));
|
||||
return 1.0F + (clampedTier - 1) * 0.06F;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,51 +60,28 @@ public class RenderItemMachine implements IItemRenderer
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
GL11.glScalef(0.4f, 0.4f, 0.4f);
|
||||
|
||||
if (tier == BaseTier.BASIC)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherBase.TEXTURE_FILE_0);
|
||||
RenderLauncherBase.modelBase0.render(0.0625F);
|
||||
RenderLauncherBase.modelRail0.render(0.0625F);
|
||||
}
|
||||
else if (tier == BaseTier.ADVANCED)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherBase.TEXTURE_FILE_1);
|
||||
|
||||
RenderLauncherBase.modelBase1.render(0.0625F);
|
||||
RenderLauncherBase.modelRail1.render(0.0625F);
|
||||
GL11.glRotatef(180F, 0F, 180F, 1.0F);
|
||||
RenderLauncherBase.modelRail1.render(0.0625F);
|
||||
}
|
||||
else if (tier == BaseTier.ELITE)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherBase.TEXTURE_FILE_2);
|
||||
RenderLauncherBase.modelBase2.render(0.0625F);
|
||||
RenderLauncherBase.modelRail2.render(0.0625F);
|
||||
GL11.glRotatef(180F, 0F, 180F, 1.0F);
|
||||
RenderLauncherBase.modelRail2.render(0.0625F);
|
||||
}
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherBase.getTexture(tier.ordinal()));
|
||||
RenderLauncherBase.MODEL_BASE.render(0.0625F);
|
||||
RenderLauncherBase.MODEL_RAIL.render(0.0625F);
|
||||
}
|
||||
else if (metadata == MachineData.LauncherScreen.ordinal())
|
||||
{
|
||||
BaseTier tier = ((ItemBlockMachine)item.getItem()).getBaseTier(item);
|
||||
GL11.glTranslatef(0f, 0.9f, 0f);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
GL11.glRotatef(180f, 0f, 180f, 1f);
|
||||
|
||||
if (tier == BaseTier.BASIC)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherScreen.TEXTURE_FILE_0);
|
||||
RenderLauncherScreen.model0.render(0.0625F);
|
||||
}
|
||||
else if (tier == BaseTier.ADVANCED)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherScreen.TEXTURE_FILE_1);
|
||||
RenderLauncherScreen.model1.render(0.0625F);
|
||||
}
|
||||
else if (tier == BaseTier.ELITE)
|
||||
if (tier == BaseTier.ELITE)
|
||||
{
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
GL11.glTranslatef(0.0F, -0.8F, 0.0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherScreen.TEXTURE_FILE_2);
|
||||
RenderLauncherScreen.model2.render(0.0625F);
|
||||
RenderLauncherScreen.renderT3(FMLClientHandler.instance().getClient().renderEngine);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef(0f, 0.9f, 0f);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
GL11.glRotatef(180f, 0f, 180f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderLauncherScreen.getTexture(tier.ordinal()));
|
||||
RenderLauncherScreen.MODEL_T1.render(0.0625F);
|
||||
}
|
||||
}
|
||||
else if (metadata == MachineData.LauncherFrame.ordinal())
|
||||
|
||||
@@ -57,15 +57,8 @@ public class RenderItemMissile implements IItemRenderer
|
||||
scale = scale / 1.7f;
|
||||
right = 0.5f;
|
||||
}
|
||||
else if (missile.getTier() == 4)
|
||||
{
|
||||
scale = scale / 1.4f;
|
||||
right = 0.2f;
|
||||
}
|
||||
|
||||
GL11.glTranslatef(right, 0f, 0f);
|
||||
}
|
||||
|
||||
if (type == ItemRenderType.EQUIPPED_FIRST_PERSON || type == ItemRenderType.EQUIPPED)
|
||||
{
|
||||
GL11.glTranslatef(1.15f, 1f, 0.5f);
|
||||
@@ -81,6 +74,8 @@ public class RenderItemMissile implements IItemRenderer
|
||||
scale = scale / 1.5f;
|
||||
}
|
||||
|
||||
scale = scale * RenderMissile.getTierScale(missile.getTier());
|
||||
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(missile.getMissileResource());
|
||||
|
||||
@@ -4,7 +4,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -14,10 +13,8 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.tile.ModelSMine;
|
||||
import defense.client.render.RenderUtils;
|
||||
import defense.common.DefenseTech;
|
||||
import defense.common.Reference;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.ExplosiveRegistry;
|
||||
import defense.common.tile.TileExplosive;
|
||||
@@ -25,7 +22,6 @@ import defense.common.tile.TileExplosive;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderBombBlock extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public static final ResourceLocation TEXTURE_FILE = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "s-mine.png");
|
||||
public static final int ID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
@@ -33,13 +29,29 @@ public class RenderBombBlock extends TileEntitySpecialRenderer implements ISimpl
|
||||
{
|
||||
if(modelID == ID)
|
||||
{
|
||||
if(metadata == Explosive.sMine.getID())
|
||||
Explosive explosive = ExplosiveRegistry.get(metadata);
|
||||
|
||||
if(explosive != null && explosive.getBlockModel() != null && explosive.getBlockResource() != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1.5F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE_FILE);
|
||||
ModelSMine.INSTANCE.render(0.0625F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(explosive.getBlockResource());
|
||||
|
||||
if(explosive.usesTntBundleModel())
|
||||
{
|
||||
// Match Mekanism's Obsidian TNT inventory transform. The
|
||||
// tile transform places this model far outside an item slot.
|
||||
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(180.0F, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 1.5F, 0.0F);
|
||||
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
explosive.getBlockModel().render(0.0625F);
|
||||
RenderUtils.setTerrainTexture();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -10,11 +10,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.tile.ModelLauncherBaseT1;
|
||||
import defense.client.model.tile.ModelLauncherBaseT2;
|
||||
import defense.client.model.tile.ModelLauncherBaseT3;
|
||||
import defense.client.model.tile.ModelLauncherRailT1;
|
||||
import defense.client.model.tile.ModelLauncherRailT2;
|
||||
import defense.client.model.tile.ModelLauncherRailT3;
|
||||
import defense.common.Reference;
|
||||
import defense.common.tile.TileLauncherBase;
|
||||
|
||||
@@ -25,14 +21,8 @@ public class RenderLauncherBase extends TileEntitySpecialRenderer
|
||||
public static final ResourceLocation TEXTURE_FILE_1 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_1.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_2 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_2.png");
|
||||
|
||||
public static final ModelLauncherBaseT1 modelBase0 = new ModelLauncherBaseT1();
|
||||
public static final ModelLauncherRailT1 modelRail0 = new ModelLauncherRailT1();
|
||||
|
||||
public static final ModelLauncherBaseT2 modelBase1 = new ModelLauncherBaseT2();
|
||||
public static final ModelLauncherRailT2 modelRail1 = new ModelLauncherRailT2();
|
||||
|
||||
public static final ModelLauncherBaseT3 modelBase2 = new ModelLauncherBaseT3();
|
||||
public static final ModelLauncherRailT3 modelRail2 = new ModelLauncherRailT3();
|
||||
public static final ModelLauncherBaseT1 MODEL_BASE = new ModelLauncherBaseT1();
|
||||
public static final ModelLauncherRailT1 MODEL_RAIL = new ModelLauncherRailT1();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f)
|
||||
@@ -52,31 +42,24 @@ public class RenderLauncherBase extends TileEntitySpecialRenderer
|
||||
GL11.glRotatef(90F, 0F, 180F, 1.0F);
|
||||
}
|
||||
|
||||
// The missile launcher screen
|
||||
if (tileEntity.getTier() == 0)
|
||||
{
|
||||
this.bindTexture(TEXTURE_FILE_0);
|
||||
modelBase0.render(0.0625F);
|
||||
modelRail0.render(0.0625F);
|
||||
}
|
||||
else if (tileEntity.getTier() == 1)
|
||||
{
|
||||
this.bindTexture(TEXTURE_FILE_1);
|
||||
modelBase1.render(0.0625F);
|
||||
modelRail1.render(0.0625F);
|
||||
GL11.glRotatef(180F, 0F, 180F, 1.0F);
|
||||
modelRail1.render(0.0625F);
|
||||
}
|
||||
else if (tileEntity.getTier() == 2)
|
||||
{
|
||||
this.bindTexture(TEXTURE_FILE_2);
|
||||
modelBase2.render(0.0625F);
|
||||
modelRail2.render(0.0625F);
|
||||
GL11.glRotatef(180F, 0F, 180F, 1.0F);
|
||||
modelRail2.render(0.0625F);
|
||||
}
|
||||
this.bindTexture(getTexture(tileEntity.getTier()));
|
||||
MODEL_BASE.render(0.0625F);
|
||||
MODEL_RAIL.render(0.0625F);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
public static ResourceLocation getTexture(int tier)
|
||||
{
|
||||
switch (tier)
|
||||
{
|
||||
case 1:
|
||||
return TEXTURE_FILE_1;
|
||||
case 2:
|
||||
return TEXTURE_FILE_2;
|
||||
default:
|
||||
return TEXTURE_FILE_0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package defense.client.render.tile;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -9,21 +10,20 @@ import org.lwjgl.opengl.GL11;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.tile.ModelLauncherScreenT1;
|
||||
import defense.client.model.tile.ModelLauncherScreenT2;
|
||||
import defense.client.model.tile.ModelLauncherScreenT3;
|
||||
import defense.common.Reference;
|
||||
import defense.common.tile.TileLauncherScreen;
|
||||
import mekanism.client.model.ModelSecurityDesk;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderLauncherScreen extends TileEntitySpecialRenderer
|
||||
{
|
||||
public static final ResourceLocation TEXTURE_FILE_0 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_0.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_1 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_1.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_2 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_2.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_0 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_screen_0.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_1 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_screen_1.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_2 = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_screen_2.png");
|
||||
public static final ResourceLocation TEXTURE_FILE_2_OVERLAY = new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "launcher_screen_2_overlay.png");
|
||||
|
||||
public static final ModelLauncherScreenT1 model0 = new ModelLauncherScreenT1();
|
||||
public static final ModelLauncherScreenT2 model1 = new ModelLauncherScreenT2();
|
||||
public static final ModelLauncherScreenT3 model2 = new ModelLauncherScreenT3();
|
||||
public static final ModelLauncherScreenT1 MODEL_T1 = new ModelLauncherScreenT1();
|
||||
public static final ModelSecurityDesk MODEL_T3 = new ModelSecurityDesk();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity var1, double x, double y, double z, float var8)
|
||||
@@ -33,38 +33,70 @@ public class RenderLauncherScreen extends TileEntitySpecialRenderer
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
switch (tileEntity.facing)
|
||||
if (tileEntity.getTier() == 2)
|
||||
{
|
||||
case 3:
|
||||
GL11.glRotatef(180F, 0.0F, 180F, 1.0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glRotatef(-90F, 0.0F, 180F, 1.0F);
|
||||
break;
|
||||
case 5:
|
||||
GL11.glRotatef(90F, 0.0F, 180F, 1.0F);
|
||||
break;
|
||||
switch (tileEntity.facing)
|
||||
{
|
||||
case 3:
|
||||
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case 5:
|
||||
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
}
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
this.bindTexture(TEXTURE_FILE_2);
|
||||
renderT3(field_147501_a.field_147553_e);
|
||||
}
|
||||
|
||||
switch (tileEntity.getTier())
|
||||
else
|
||||
{
|
||||
case 0:
|
||||
this.bindTexture(TEXTURE_FILE_0);
|
||||
model0.render(0.0625F);
|
||||
break;
|
||||
case 1:
|
||||
this.bindTexture(TEXTURE_FILE_1);
|
||||
model1.render(0.0625F);
|
||||
break;
|
||||
case 2:
|
||||
this.bindTexture(TEXTURE_FILE_2);
|
||||
model2.render(0.0625F);
|
||||
break;
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
switch (tileEntity.facing)
|
||||
{
|
||||
case 3:
|
||||
GL11.glRotatef(180F, 0.0F, 180F, 1.0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glRotatef(-90F, 0.0F, 180F, 1.0F);
|
||||
break;
|
||||
case 5:
|
||||
GL11.glRotatef(90F, 0.0F, 180F, 1.0F);
|
||||
break;
|
||||
}
|
||||
|
||||
this.bindTexture(getTexture(tileEntity.getTier()));
|
||||
MODEL_T1.render(0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static ResourceLocation getTexture(int tier)
|
||||
{
|
||||
return tier == 1 ? TEXTURE_FILE_1 : TEXTURE_FILE_0;
|
||||
}
|
||||
|
||||
public static void renderT3(TextureManager textureManager)
|
||||
{
|
||||
ResourceLocation sharedOverlay = ModelSecurityDesk.OVERLAY;
|
||||
|
||||
try
|
||||
{
|
||||
// ModelSecurityDesk is shared Core code. Swap its public overlay only
|
||||
// for this synchronous render so DefenseTech can supply its own screen
|
||||
// without requiring a new method in the installed Core jar.
|
||||
ModelSecurityDesk.OVERLAY = TEXTURE_FILE_2_OVERLAY;
|
||||
MODEL_T3.render(0.0625F, textureManager);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ModelSecurityDesk.OVERLAY = sharedOverlay;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -293,17 +293,17 @@ public final class DefenseTech
|
||||
// Defuser
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(((ItemEnergized)DefenseTechItems.itemDefuser).getUnchargedItem(), new Object[] { "I ", " W ", " C", 'C', "circuitAdvanced", 'W', MekanismItems.Configurator.getUnchargedItem(), 'I', new ItemStack(MekanismItems.PartTransmitter, 1, 0) }));
|
||||
// Missile Launcher Platform
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherBase(BaseTier.BASIC), new Object[] { "! !", "!C!", "!!!", '!', "ingotIron", 'C', "circuitBasic" }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherBase(BaseTier.ADVANCED), new Object[] { "! !", "!C!", "!@!", '@', DefenseUtils.getLauncherBase(BaseTier.BASIC), '!', "ingotOsmium", 'C', "circuitAdvanced" }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherBase(BaseTier.ELITE), new Object[] { "! !", "!C!", "!@!", '@', DefenseUtils.getLauncherBase(BaseTier.ADVANCED), '!', "ingotGold", 'C', "circuitElite" }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherBase(BaseTier.BASIC), new Object[] { "S S", "SCS", "SIS", 'S', "ingotSteel", 'C', "circuitBasic", 'I', new ItemStack(MekanismBlocks.BasicBlock, 1, 8) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherBase(BaseTier.ADVANCED), new Object[] { "SAS", "CBC", "SSS", 'S', "ingotSteel", 'A', "alloyAdvanced", 'C', "circuitAdvanced", 'B', DefenseUtils.getLauncherBase(BaseTier.BASIC) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherBase(BaseTier.ELITE), new Object[] { "SAS", "CBC", "SSS", 'S', "ingotSteel", 'A', "alloyElite", 'C', "circuitElite", 'B', DefenseUtils.getLauncherBase(BaseTier.ADVANCED) }));
|
||||
// Missile Launcher Panel
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherScreen(BaseTier.BASIC), new Object[] { "!!!", "!#!", "!?!", '#', "circuitBasic", '!', "blockGlass", '?', new ItemStack(MekanismItems.PartTransmitter, 1, 0) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherScreen(BaseTier.ADVANCED), new Object[] { "!$!", "!#!", "!?!", '#', "circuitAdvanced", '!', "ingotOsmium", '?', new ItemStack(MekanismItems.PartTransmitter, 1, 0), '$', DefenseUtils.getLauncherScreen(BaseTier.BASIC) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherScreen(BaseTier.ELITE), new Object[] { "!$!", "!#!", "!?!", '#', "circuitElite", '!', "ingotGold", '?', new ItemStack(MekanismItems.PartTransmitter, 1, 0), '$', DefenseUtils.getLauncherScreen(BaseTier.ADVANCED) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherScreen(BaseTier.BASIC), new Object[] { "SGS", "CIC", "STS", 'S', "ingotSteel", 'G', "blockGlass", 'C', "circuitBasic", 'I', new ItemStack(MekanismBlocks.BasicBlock, 1, 8), 'T', new ItemStack(MekanismItems.PartTransmitter, 1, 0) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherScreen(BaseTier.ADVANCED), new Object[] { "SGS", "CIC", "STS", 'S', "ingotSteel", 'G', "blockGlass", 'C', "circuitAdvanced", 'I', DefenseUtils.getLauncherScreen(BaseTier.BASIC), 'T', "alloyAdvanced" }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherScreen(BaseTier.ELITE), new Object[] { "SAS", "CDC", "STS", 'S', "ingotSteel", 'A', "alloyElite", 'C', "circuitElite", 'D', new ItemStack(MekanismBlocks.BasicBlock2, 1, 9), 'T', DefenseUtils.getLauncherScreen(BaseTier.ADVANCED) }));
|
||||
// Missile Launcher Support Frame
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherFrame(BaseTier.BASIC), new Object[] { "! !", "!!!", "! !", '!', "ingotIron" }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherFrame(BaseTier.ADVANCED), new Object[] { "! !", "!@!", "! !", '!', "ingotOsmium", '@', DefenseUtils.getLauncherFrame(BaseTier.BASIC) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherFrame(BaseTier.ELITE), new Object[] { "! !", "!@!", "! !", '!', "ingotGold", '@', DefenseUtils.getLauncherFrame(BaseTier.ADVANCED) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherFrame(BaseTier.BASIC), new Object[] { "S S", "SCS", "S S", 'S', "ingotSteel", 'C', new ItemStack(MekanismBlocks.BasicBlock, 1, 8) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherFrame(BaseTier.ADVANCED), new Object[] { "SAS", "SFS", "SAS", 'S', "ingotSteel", 'A', "alloyAdvanced", 'F', DefenseUtils.getLauncherFrame(BaseTier.BASIC) }));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(DefenseUtils.getLauncherFrame(BaseTier.ELITE), new Object[] { "SAS", "SFS", "SAS", 'S', "ingotSteel", 'A', "alloyElite", 'F', DefenseUtils.getLauncherFrame(BaseTier.ADVANCED) }));
|
||||
// Radar Station
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(DefenseTechBlocks.blockMachine, 1, 3), new Object[] { "?@?", " ! ", "!#!", '@', ((ItemEnergized)DefenseTechItems.itemRadarGun).getUnchargedItem(), '!', "alloyAdvanced", '#', "circuitBasic", '?', "ingotGold" }));
|
||||
// EMP Tower
|
||||
@@ -415,4 +415,4 @@ public final class DefenseTech
|
||||
proxy.loadConfiguration();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public class Settings
|
||||
public static int MAX_MISSILE_DISTANCE = 10000;
|
||||
public static int ANTIMATTER_SIZE = 55;
|
||||
public static boolean DESTROY_BEDROCK = true;
|
||||
public static int MAX_ROCKET_LAUNCHER_TIER = 2;
|
||||
public static int MAX_ROCKET_LAUNCHER_TIER = 1;
|
||||
public static boolean GENERATE_SULFUR = true;
|
||||
public static int MAX_REDMATTER_LIFESPAN = 3600;
|
||||
public static boolean DO_REDMATTER_DESPAWN = true;
|
||||
@@ -35,7 +35,7 @@ public class Settings
|
||||
MAX_MISSILE_DISTANCE = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Max Missile Distance", 10000).getInt(10000);
|
||||
ANTIMATTER_SIZE = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Antimatter Explosion Size", 55).getInt(55);
|
||||
DESTROY_BEDROCK = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Antimatter Destroy Bedrock", true).getBoolean(true);
|
||||
MAX_ROCKET_LAUNCHER_TIER = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Rocket Launcher Max Missile Tier", 2).getInt(2);
|
||||
MAX_ROCKET_LAUNCHER_TIER = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Rocket Launcher Max Missile Tier", 1).getInt(1);
|
||||
GENERATE_SULFUR = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "Generate Sulfur Ore", true).getBoolean(true);
|
||||
MAX_REDMATTER_LIFESPAN = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "RedMatter Life Span in ticks", 3600).getInt(3600);
|
||||
DO_REDMATTER_DESPAWN = Settings.CONFIGURATION.get(Configuration.CATEGORY_GENERAL, "RedMatter despawn", true).getBoolean(true);
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
package defense.common.block;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -25,9 +21,9 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -38,7 +34,6 @@ import defense.api.ExplosionEvent.ExplosivePreDetonationEvent;
|
||||
import defense.api.ExplosiveType;
|
||||
import defense.client.render.tile.RenderBombBlock;
|
||||
import defense.common.CreativeTabHandler;
|
||||
import defense.common.Reference;
|
||||
import defense.common.entity.EntityExplosive;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.ExplosiveRegistry;
|
||||
@@ -46,9 +41,7 @@ import defense.common.tile.TileExplosive;
|
||||
|
||||
public class BlockExplosive extends BlockBase
|
||||
{
|
||||
public final IIcon[] ICON_TOP = new IIcon[100];
|
||||
public final IIcon[] ICON_SIDE = new IIcon[100];
|
||||
public final IIcon[] ICON_BOTTOM = new IIcon[100];
|
||||
private final Map<Integer, IIcon[]> explosiveIcons = new HashMap<Integer, IIcon[]>();
|
||||
|
||||
public BlockExplosive()
|
||||
{
|
||||
@@ -184,60 +177,40 @@ public class BlockExplosive extends BlockBase
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess par1IBlockAccess, int x, int y, int z, int side)
|
||||
{
|
||||
int explosiveID = ((TileExplosive)par1IBlockAccess.getTileEntity(x, y, z)).explosiveID;
|
||||
return getIcon(side, explosiveID);
|
||||
TileEntity tileEntity = par1IBlockAccess.getTileEntity(x, y, z);
|
||||
return tileEntity instanceof TileExplosive ? getIcon(side, ((TileExplosive)tileEntity).explosiveID) : Blocks.tnt.getIcon(side, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int explosiveID)
|
||||
{
|
||||
if(side == 0)
|
||||
IIcon[] icons = explosiveIcons.get(explosiveID);
|
||||
if(icons == null)
|
||||
{
|
||||
return ICON_BOTTOM[explosiveID];
|
||||
}
|
||||
else if(side == 1)
|
||||
{
|
||||
return ICON_TOP[explosiveID];
|
||||
return Blocks.tnt.getIcon(side, 0);
|
||||
}
|
||||
|
||||
return ICON_SIDE[explosiveID];
|
||||
return icons[side == 0 ? 0 : side == 1 ? 1 : 2];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
/** Register every single texture for all explosives. */
|
||||
for(Explosive zhaPin : ExplosiveRegistry.getExplosives())
|
||||
explosiveIcons.clear();
|
||||
|
||||
for(Explosive explosive : ExplosiveRegistry.getExplosives())
|
||||
{
|
||||
ICON_TOP[zhaPin.getID()] = getIcon(iconRegister, zhaPin, "_top");
|
||||
ICON_SIDE[zhaPin.getID()] = getIcon(iconRegister, zhaPin, "_side");
|
||||
ICON_BOTTOM[zhaPin.getID()] = getIcon(iconRegister, zhaPin, "_bottom");
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IIconRegister iconRegister, Explosive zhaPin, String suffix)
|
||||
{
|
||||
String iconName = "explosive_" + zhaPin.getUnlocalizedName() + suffix;
|
||||
|
||||
try {
|
||||
ResourceLocation resourcelocation = new ResourceLocation(Reference.DOMAIN, Reference.BLOCK_PATH + iconName + ".png");
|
||||
InputStream inputstream = Minecraft.getMinecraft().getResourceManager().getResource(resourcelocation).getInputStream();
|
||||
BufferedImage bufferedimage = ImageIO.read(inputstream);
|
||||
|
||||
if(bufferedimage != null)
|
||||
if(explosive.hasBlockForm() && explosive != Explosive.sMine)
|
||||
{
|
||||
return iconRegister.registerIcon(Reference.PREFIX + iconName);
|
||||
String base = "explosive_" + explosive.getUnlocalizedName() + "_";
|
||||
explosiveIcons.put(explosive.getID(), new IIcon[] {
|
||||
iconRegister.registerIcon("defense:" + base + "bottom"),
|
||||
iconRegister.registerIcon("defense:" + base + "top"),
|
||||
iconRegister.registerIcon("defense:" + base + "side")
|
||||
});
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
|
||||
if(suffix.equals("_bottom"))
|
||||
{
|
||||
return iconRegister.registerIcon(Reference.PREFIX + "explosive_bottom_" + zhaPin.getTier());
|
||||
}
|
||||
|
||||
return iconRegister.registerIcon(Reference.PREFIX + "explosive_base_" + zhaPin.getTier());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,8 +7,8 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelAntiGravitationalMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelRepulsiveMissile;
|
||||
import defense.common.explosive.blast.BlastAntiGravitational;
|
||||
|
||||
public class ExAntiGravitational extends Explosion
|
||||
@@ -22,7 +22,7 @@ public class ExAntiGravitational extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelAntiGravitationalMissile();
|
||||
return new ModelRepulsiveMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ExAntimatter extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelAntimatterMissile();
|
||||
return new ModelAntimatterMissile();
|
||||
}
|
||||
|
||||
/** Called when the explosive is on fuse and going to explode. Called only when the explosive is
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelBreachingMissile;
|
||||
import defense.client.model.missile.ModelCondensedMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.blast.BlastBreech;
|
||||
@@ -24,7 +24,7 @@ public class ExBreaching extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelBreachingMissile();
|
||||
return new ModelCondensedMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelChemicalMissile;
|
||||
import defense.client.model.missile.ModelContagiousMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.common.DefenseTechItems;
|
||||
import defense.common.explosive.Explosive;
|
||||
@@ -30,7 +29,7 @@ public class ExChemical extends Explosion
|
||||
return new ModelChemicalMissile();
|
||||
}
|
||||
else {
|
||||
return new ModelContagiousMissile();
|
||||
return new ModelChemicalMissile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelEMPMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelRepulsiveMissile;
|
||||
import defense.common.explosive.blast.BlastEMP;
|
||||
|
||||
public class ExEMP extends Explosion
|
||||
@@ -23,7 +23,7 @@ public class ExEMP extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelEMPMissile();
|
||||
return new ModelRepulsiveMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,7 +7,7 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelEndothermicMissile;
|
||||
import defense.client.model.missile.ModelChemicalMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.common.explosive.blast.BlastEndothermic;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ExEndothermic extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelEndothermicMissile();
|
||||
return new ModelChemicalMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelExothermicMissile;
|
||||
import defense.client.model.missile.ModelIncendiaryMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.blast.BlastExothermic;
|
||||
@@ -24,7 +24,7 @@ public class ExExothermic extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelExothermicMissile();
|
||||
return new ModelIncendiaryMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,9 +7,8 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelIncendiaryMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelThermobaricMissile;
|
||||
import defense.client.model.missile.ModelNuclearMissile;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.blast.BlastNuclear;
|
||||
|
||||
@@ -24,13 +23,7 @@ public class ExNuclear extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
if(getTier() == 3)
|
||||
{
|
||||
return new ModelNuclearMissile();
|
||||
}
|
||||
else {
|
||||
return new ModelThermobaricMissile();
|
||||
}
|
||||
return new ModelIncendiaryMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,8 +6,8 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelRedMatterMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.common.explosive.blast.BlastRedmatter;
|
||||
|
||||
public class ExRedMatter extends Explosion
|
||||
@@ -21,7 +21,7 @@ public class ExRedMatter extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelRedMatterMissile();
|
||||
return new ModelRedMatterMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,8 +8,8 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelAttractiveMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelRegenMissile;
|
||||
import defense.common.explosive.blast.BlastRegen;
|
||||
|
||||
public class ExRejuvenation extends Explosion
|
||||
@@ -23,7 +23,7 @@ public class ExRejuvenation extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelRegenMissile();
|
||||
return new ModelAttractiveMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,7 +9,6 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelAnvilMissile;
|
||||
import defense.client.model.missile.ModelFragmentationMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelShrapnelMissile;
|
||||
import defense.common.explosive.Explosive;
|
||||
@@ -35,7 +34,7 @@ public class ExShrapnel extends Explosion
|
||||
return new ModelAnvilMissile();
|
||||
}
|
||||
else {
|
||||
return new ModelFragmentationMissile();
|
||||
return new ModelShrapnelMissile();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,8 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelHypersonicMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelSonicMissile;
|
||||
import defense.client.model.missile.ModelRepulsiveMissile;
|
||||
import defense.common.explosive.Explosive;
|
||||
import defense.common.explosive.blast.BlastSonic;
|
||||
|
||||
@@ -24,14 +23,7 @@ public class ExSonic extends Explosion
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
if (this.getTier() == 3)
|
||||
{
|
||||
return new ModelHypersonicMissile();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ModelSonicMissile();
|
||||
}
|
||||
return new ModelRepulsiveMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.api.ITarget;
|
||||
import defense.api.ITarget.TargetType;
|
||||
import defense.client.model.missile.ModelAntiMissileMissile;
|
||||
import defense.client.model.missile.ModelHomingMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.common.Reference;
|
||||
import defense.common.entity.EntityMissile;
|
||||
@@ -30,7 +30,7 @@ public class MissileAntiBallistic extends Missile
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelAntiMissileMissile();
|
||||
return new ModelHomingMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,8 +5,8 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.client.model.missile.ModelClusterMissile;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.missile.ModelShrapnelMissile;
|
||||
import defense.common.entity.EntityMissile;
|
||||
import defense.common.entity.EntityMissile.MissileType;
|
||||
import defense.common.explosive.blast.BlastRepulsive;
|
||||
@@ -27,7 +27,7 @@ public class MissileCluster extends Missile
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getMissileModel()
|
||||
{
|
||||
return new ModelClusterMissile();
|
||||
return new ModelShrapnelMissile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,9 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import defense.api.IExplosive;
|
||||
import defense.client.model.missile.ModelMissileBase;
|
||||
import defense.client.model.tile.ModelExplosiveBundle;
|
||||
import defense.common.DefenseTechBlocks;
|
||||
import defense.common.Reference;
|
||||
import defense.common.explosion.ExAntiGravitational;
|
||||
import defense.common.explosion.ExAntimatter;
|
||||
import defense.common.explosion.ExBreaching;
|
||||
@@ -238,14 +240,29 @@ public abstract class Explosive implements IExplosive
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelMissileBase getBlockModel()
|
||||
{
|
||||
return null;
|
||||
return usesTntBundleModel() ? ModelExplosiveBundle.INSTANCE : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ResourceLocation getBlockResource()
|
||||
{
|
||||
return null;
|
||||
return usesTntBundleModel() ? new ResourceLocation(Reference.DOMAIN, Reference.MODEL_TEXTURE_PATH + "explosive_" + nameID + ".png") : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Physical charge and burst payloads use Mekanism's shared nine-tube
|
||||
* geometry. Specialized field, nuclear and exotic payloads retain the
|
||||
* cube shell represented by their registered top/side/bottom icons.
|
||||
*/
|
||||
public boolean usesTntBundleModel()
|
||||
{
|
||||
return "condensed".equals(nameID)
|
||||
|| "shrapnel".equals(nameID)
|
||||
|| "incendiary".equals(nameID)
|
||||
|| "fragmentation".equals(nameID)
|
||||
|| "breaching".equals(nameID)
|
||||
|| "thermobaric".equals(nameID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -90,7 +90,7 @@ public class ItemRocketLauncher extends ItemEnergized
|
||||
|
||||
if (((Explosion) ex) != null && !evt.isCanceled())
|
||||
{
|
||||
// Limit the missile to tier two.
|
||||
// The handheld launcher is intentionally a T1-only weapon.
|
||||
if (((Explosion) ex).getTier() <= Settings.MAX_ROCKET_LAUNCHER_TIER && ((Explosion) ex).isCruise())
|
||||
{
|
||||
Pos3D launcher = new Pos3D(player).translate(new Pos3D(0, 0.5, 0));
|
||||
|
||||
@@ -24,6 +24,8 @@ import defense.common.item.ItemMissile;
|
||||
|
||||
public class TileCruiseLauncher extends TileLauncherPrefab implements IBlockActivate, IInventory, ILauncherContainer
|
||||
{
|
||||
public static final int MAX_MISSILE_TIER = 2;
|
||||
|
||||
// The missile that this launcher is holding
|
||||
public IMissile daoDan = null;
|
||||
|
||||
@@ -153,7 +155,7 @@ public class TileCruiseLauncher extends TileLauncherPrefab implements IBlockActi
|
||||
if (this.daoDan == null)
|
||||
{
|
||||
|
||||
if (missile.isCruise() && missile.getTier() <= 3)
|
||||
if (missile.isCruise() && missile.getTier() <= MAX_MISSILE_TIER)
|
||||
{
|
||||
Pos3D startingPosition = new Pos3D((this.xCoord + 0.5f), (this.yCoord + 1f), (this.zCoord + 0.5f));
|
||||
this.daoDan = new EntityMissile(this.worldObj, startingPosition, new Pos3D(this), haoMa);
|
||||
@@ -203,7 +205,7 @@ public class TileCruiseLauncher extends TileLauncherPrefab implements IBlockActi
|
||||
{
|
||||
Explosion missile = (Explosion) ExplosiveRegistry.get(this.inventory[0].getItemDamage());
|
||||
|
||||
if (missile != null && missile.getID() == daoDan.getExplosiveType().getID() && missile.isCruise() && missile.getTier() <= 3)
|
||||
if (missile != null && missile.getID() == daoDan.getExplosiveType().getID() && missile.isCruise() && missile.getTier() <= MAX_MISSILE_TIER)
|
||||
{
|
||||
if (getEnergy() == getMaxEnergy())
|
||||
{
|
||||
@@ -304,7 +306,7 @@ public class TileCruiseLauncher extends TileLauncherPrefab implements IBlockActi
|
||||
{
|
||||
Explosion missile = (Explosion) ExplosiveRegistry.get(itemStack.getItemDamage());
|
||||
|
||||
if (missile.isCruise() && missile.getTier() <= 3)
|
||||
if (missile.isCruise() && missile.getTier() <= MAX_MISSILE_TIER)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 620 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 628 B |
|
After Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 6.3 KiB |
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"animation":
|
||||
{
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
||||
"animation": {
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 6.6 KiB |
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"animation":
|
||||
{
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
||||
"animation": {
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 651 B |
|
After Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 622 B |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 639 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 656 B |
|
After Width: | Height: | Size: 597 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 634 B |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 654 B |
|
After Width: | Height: | Size: 641 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 659 B |
|
After Width: | Height: | Size: 612 B |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 630 B |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 650 B |
|
After Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 616 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 646 B |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 576 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 635 B |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 645 B |
|
After Width: | Height: | Size: 607 B |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 639 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 623 B |
|
After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 657 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 609 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 629 B |
|
After Width: | Height: | Size: 649 B |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 675 B |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 638 B |
|
After Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 7.1 KiB |
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"animation":
|
||||
{
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
||||
"animation": {
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 6.7 KiB |