mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Jamesh_2 Today at 22:03
Strapons work ughhfhfd
This commit is contained in:
parent
d625a9a9d9
commit
00f98ac456
@ -265,6 +265,7 @@ public class ModBlocks {
|
||||
public static Block deco_tungsten;
|
||||
public static Block deco_aluminium;
|
||||
public static Block deco_steel;
|
||||
public static Block deco_rusty_steel;
|
||||
public static Block deco_lead;
|
||||
public static Block deco_beryllium;
|
||||
public static Block deco_asbestos;
|
||||
@ -556,6 +557,7 @@ public class ModBlocks {
|
||||
public static Block mine_he;
|
||||
public static Block mine_shrap;
|
||||
public static Block mine_fat;
|
||||
public static Block mine_naval;
|
||||
|
||||
public static Block crate;
|
||||
public static Block crate_weapon;
|
||||
@ -1454,6 +1456,7 @@ public class ModBlocks {
|
||||
deco_tungsten = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_tungsten").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_tungsten");
|
||||
deco_aluminium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_aluminium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_aluminium");
|
||||
deco_steel = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel");
|
||||
deco_rusty_steel = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_rusty_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_rusty_steel");
|
||||
deco_lead = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
|
||||
deco_beryllium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
|
||||
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).noFortune().setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
|
||||
@ -1743,6 +1746,7 @@ public class ModBlocks {
|
||||
mine_he = new Landmine(Material.iron, 2D, 5D).setBlockName("mine_he").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_he");
|
||||
mine_shrap = new Landmine(Material.iron, 1.5D, 1D).setBlockName("mine_shrap").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_shrap");
|
||||
mine_fat = new Landmine(Material.iron, 2.5D, 1D).setBlockName("mine_fat").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_fat");
|
||||
mine_naval = new Landmine(Material.iron, 2.5D, 1D).setBlockName("mine_naval").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_naval");
|
||||
dynamite = new BlockDynamite().setBlockName("dynamite").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":dynamite");
|
||||
tnt = new BlockTNT().setBlockName("tnt_ntm").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":tnt");
|
||||
semtex = new BlockSemtex().setBlockName("semtex").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":semtex");
|
||||
@ -2601,6 +2605,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(deco_tungsten, deco_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_aluminium, deco_aluminium.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_steel, deco_steel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_rusty_steel, deco_rusty_steel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_lead, deco_lead.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_beryllium, deco_beryllium.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_asbestos, deco_asbestos.getUnlocalizedName());
|
||||
@ -2895,6 +2900,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(mine_shrap, mine_shrap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_he, mine_he.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_fat, mine_fat.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mine_naval, mine_naval.getUnlocalizedName());
|
||||
|
||||
//Block Bombs
|
||||
GameRegistry.registerBlock(flame_war, flame_war.getUnlocalizedName());
|
||||
|
||||
@ -68,6 +68,7 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
if(this == ModBlocks.mine_he) this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
|
||||
if(this == ModBlocks.mine_shrap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f);
|
||||
if(this == ModBlocks.mine_fat) this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);
|
||||
if(this == ModBlocks.mine_naval) this.setBlockBounds(5 * f, 0.0F, 10 * f, 10 * f, 10 * f, 10 * f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -162,24 +163,36 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
|
||||
vnt.explode();
|
||||
|
||||
|
||||
ExplosionLarge.spawnShrapnelShower(world, x + 0.5, y + 0.5, z + 0.5, 0, 1D, 0, 45, 0.2D);
|
||||
ExplosionLarge.spawnShrapnels(world, x + 0.5, y + 0.5, z + 0.5, 5);
|
||||
} else if(this == ModBlocks.mine_fat) {
|
||||
|
||||
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 10);
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard(64));
|
||||
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(2, ServerConfig.MINE_NUKE_DAMAGE.get()).withRangeMod(1.5F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.explode();
|
||||
|
||||
|
||||
XFactoryCatapult.incrementRad(world, x, y, z, 1.5F);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "muke");
|
||||
data.setBoolean("balefire", MainRegistry.polaroidID == 11 || world.rand.nextInt(100) == 0);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.5, y + 0.5, z + 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 250));
|
||||
|
||||
} else if(this == ModBlocks.mine_naval) {
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 5, y + 5, z + 5, 25F);
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard(64));
|
||||
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, ServerConfig.MINE_NAVAL_DAMAGE.get()).setupPiercing(5F, 0.2F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
|
||||
vnt.explode();
|
||||
|
||||
ExplosionLarge.spawnParticlesRadial(world, x + 0.5, y + 2, z + 0.5, 10);
|
||||
ExplosionLarge.spawnRubble(world,x + 0.5, y + 0.5, z + 0.5, 5 );
|
||||
ExplosionLarge.spawnSplash(world, x + 0.5, y + 0.5, z + 0.5, 30);
|
||||
ExplosionLarge.spawnFoam(world, x + 0.5, y + 0.5, z + 0.5, 50);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ public class ServerConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Float> MINE_HE_DAMAGE = new ConfigWrapper(35F);
|
||||
public static ConfigWrapper<Float> MINE_SHRAP_DAMAGE = new ConfigWrapper(7.5F);
|
||||
public static ConfigWrapper<Float> MINE_NUKE_DAMAGE = new ConfigWrapper(100F);
|
||||
public static ConfigWrapper<Float> MINE_NAVAL_DAMAGE = new ConfigWrapper(60F);
|
||||
public static ConfigWrapper<Boolean> TAINT_TRAILS = new ConfigWrapper(false);
|
||||
|
||||
private static void initDefaults() {
|
||||
@ -23,6 +24,7 @@ public class ServerConfig extends RunningConfig {
|
||||
configMap.put("MINE_HE_DAMAGE", MINE_HE_DAMAGE);
|
||||
configMap.put("MINE_SHRAP_DAMAGE", MINE_SHRAP_DAMAGE);
|
||||
configMap.put("MINE_NUKE_DAMAGE", MINE_NUKE_DAMAGE);
|
||||
configMap.put("MINE_NAVAL_DAMAGE", MINE_NAVAL_DAMAGE);
|
||||
configMap.put("TAINT_TRAILS", TAINT_TRAILS);
|
||||
}
|
||||
|
||||
|
||||
@ -40,6 +40,24 @@ public class ExplosionLarge {
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 250));
|
||||
}
|
||||
|
||||
public static void spawnSplash(World world, double x, double y, double z, int count) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "smoke");
|
||||
data.setString("mode", "waterSplash");
|
||||
data.setInteger("count", count);
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 250));
|
||||
}
|
||||
|
||||
public static void spawnFoam(World world, double x, double y, double z, int count) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "smoke");
|
||||
data.setString("mode", "foamSplash");
|
||||
data.setInteger("count", count);
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 250));
|
||||
}
|
||||
|
||||
public static void spawnShock(World world, double x, double y, double z, int count, double strength) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
@ -1055,8 +1055,52 @@ public class ClientProxy extends ServerProxy {
|
||||
vec.rotateAroundY(360 / count);
|
||||
}
|
||||
}
|
||||
|
||||
if("waterSplash".equals(mode)) {
|
||||
|
||||
double strength = data.getDouble("range");
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(strength, 0, 0);
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
vec.rotateAroundY((float) Math.toRadians(rand.nextFloat() * 360F));
|
||||
|
||||
ParticleWater fx = new ParticleWater(man, world, x + vec.xCoord, y, z + vec.zCoord);
|
||||
fx.maxAge = 50;
|
||||
fx.motionY = 0;
|
||||
fx.motionX = 0;
|
||||
fx.motionZ = 0;
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
|
||||
vec.rotateAroundY(360 / count);
|
||||
}
|
||||
}
|
||||
|
||||
if("foamSplash".equals(mode)) {
|
||||
|
||||
double strength = data.getDouble("range");
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(strength, 0, 0);
|
||||
|
||||
for(int i = 0; i < count; i++) {
|
||||
|
||||
vec.rotateAroundY((float) Math.toRadians(rand.nextFloat() * 360F));
|
||||
|
||||
ParticleFoam fx = new ParticleFoam(man, world, x + vec.xCoord, y, z + vec.zCoord);
|
||||
fx.maxAge = 50;
|
||||
fx.motionY = 0;
|
||||
fx.motionX = 0;
|
||||
fx.motionZ = 0;
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
|
||||
vec.rotateAroundY(360 / count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if("exhaust".equals(type)) {
|
||||
|
||||
String mode = data.getString("mode");
|
||||
|
||||
@ -61,6 +61,8 @@ public class ResourceManager {
|
||||
public static final IModelCustom mine_ap = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/ap_mine.obj")).asVBO();
|
||||
public static final IModelCustom mine_marelet = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/marelet.obj")).asVBO();
|
||||
public static final IModelCustom mine_fat = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_fat.obj"));
|
||||
public static final IModelCustom mine_naval = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/NMine.obj"));
|
||||
|
||||
|
||||
//Oil Pumps
|
||||
public static final IModelCustom derrick = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/derrick.obj")).asVBO();
|
||||
@ -444,6 +446,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation mine_marelet_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/mine_marelet.png");
|
||||
public static final ResourceLocation mine_shrap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/mine_shrapnel.png");
|
||||
public static final ResourceLocation mine_fat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_fat.png");
|
||||
public static final ResourceLocation mine_naval_tex = new ResourceLocation(RefStrings.MODID, "textures/models/NMine.png");
|
||||
|
||||
//Heaters
|
||||
public static final ResourceLocation heater_firebox_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/firebox.png");
|
||||
|
||||
89
src/main/java/com/hbm/particle/ParticleFoam.java
Normal file
89
src/main/java/com/hbm/particle/ParticleFoam.java
Normal file
@ -0,0 +1,89 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import com.hbm.main.ModEventHandlerClient;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleFoam extends EntityFX {
|
||||
|
||||
private int age;
|
||||
public int maxAge;
|
||||
private float baseScale = 1.0F;
|
||||
private float maxScale = 1.0F;
|
||||
|
||||
public ParticleFoam(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_) {
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
particleIcon = ModEventHandlerClient.particleBase;
|
||||
maxAge = 500 + rand.nextInt(5);
|
||||
particleGravity = 0.1F;
|
||||
}
|
||||
|
||||
public void setBaseScale(float f) { this.baseScale = f; }
|
||||
public void setMaxScale(float f) { this.maxScale = f; }
|
||||
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
particleAlpha = 1 - ((float) age / (float) maxAge);
|
||||
|
||||
++this.age;
|
||||
|
||||
if (this.age == this.maxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
if (this.age < maxAge / 4) {
|
||||
this.motionY = 3;
|
||||
} else {
|
||||
this.motionY -= 0.05 * (1 - (float) this.age /maxAge);
|
||||
}
|
||||
|
||||
this.motionY -= this.particleGravity;
|
||||
|
||||
this.motionX += rand.nextGaussian() * 0.1;
|
||||
this.motionZ += rand.nextGaussian() * 0.1;
|
||||
|
||||
this.moveEntity(this.motionX, motionY, this.motionZ);
|
||||
|
||||
motionX *= 0.925;
|
||||
motionY *= 0.925;
|
||||
motionZ *= 0.925;
|
||||
|
||||
this.particleAge++;
|
||||
if(this.onGround || this.isInWeb) this.setDead();
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
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_) {
|
||||
|
||||
Random urandom = new Random(this.getEntityId());
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
p_70539_1_.setColorRGBA_F(255F, 255F, 255F, this.particleAlpha);
|
||||
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
|
||||
float scale = urandom.nextFloat() + 0.5F;
|
||||
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double)p_70539_2_ - interpPosX) + (urandom.nextGaussian() - 1D) * 0.75F);
|
||||
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double)p_70539_2_ - interpPosY) + (urandom.nextGaussian() - 1D) * 0.75F);
|
||||
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double)p_70539_2_ - interpPosZ) + (urandom.nextGaussian() - 1D) * 0.75F);
|
||||
|
||||
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), particleIcon.getMaxU(), particleIcon.getMaxV());
|
||||
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), particleIcon.getMaxU(), particleIcon.getMinV());
|
||||
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), particleIcon.getMinU(), particleIcon.getMinV());
|
||||
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), particleIcon.getMinU(), particleIcon.getMaxV());
|
||||
}
|
||||
}
|
||||
}
|
||||
102
src/main/java/com/hbm/particle/ParticleWater.java
Normal file
102
src/main/java/com/hbm/particle/ParticleWater.java
Normal file
@ -0,0 +1,102 @@
|
||||
package com.hbm.particle;
|
||||
|
||||
import com.hbm.main.ModEventHandlerClient;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.Random;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ParticleWater extends EntityFX {
|
||||
|
||||
private int age;
|
||||
public int maxAge;
|
||||
private float baseScale = 1.0F;
|
||||
private float maxScale = 1.0F;
|
||||
|
||||
public ParticleWater(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_) {
|
||||
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
|
||||
particleIcon = ModEventHandlerClient.particleBase;
|
||||
maxAge = 10 + rand.nextInt(5);
|
||||
particleGravity = 0.2F;
|
||||
|
||||
double speed = 0.1 + rand.nextDouble() *2;
|
||||
double theta = rand.nextDouble() * 2 * Math.PI;
|
||||
double phi = rand.nextDouble() * Math.PI / 2;
|
||||
|
||||
double motionX1 = speed * Math.cos(theta) * Math.sin(phi);
|
||||
|
||||
this.motionX = motionX1;
|
||||
this.motionZ = motionX1;
|
||||
}
|
||||
|
||||
public void setBaseScale(float f) { this.baseScale = f; }
|
||||
public void setMaxScale(float f) { this.maxScale = f; }
|
||||
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
particleAlpha = 1 - ((float) age / (float) maxAge);
|
||||
|
||||
++this.age;
|
||||
|
||||
if (this.age == this.maxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
if (this.age < maxAge / 4) {
|
||||
this.motionY = 4;
|
||||
} else {
|
||||
this.motionY -= 0.2 * (1 - (float) this.age /maxAge);
|
||||
}
|
||||
|
||||
this.motionY -= this.particleGravity;
|
||||
|
||||
this.motionX += rand.nextGaussian() * 0.2 * 2;
|
||||
this.motionZ += rand.nextGaussian() * 0.2 * 2;
|
||||
|
||||
this.moveEntity(this.motionX, motionY, this.motionZ);
|
||||
|
||||
motionX *= 0.925;
|
||||
motionY *= 0.925;
|
||||
motionZ *= 0.925;
|
||||
|
||||
this.particleAge++;
|
||||
if(this.onGround || this.isInWeb) this.setDead();
|
||||
}
|
||||
|
||||
public int getFXLayer() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
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_) {
|
||||
|
||||
Random urandom = new Random(this.getEntityId());
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
this.particleRed = this.particleGreen = this.particleBlue = urandom.nextFloat() * 0.25F + 0.25F;
|
||||
|
||||
p_70539_1_.setColorRGBA_F(this.particleRed, this.particleGreen, 185F, this.particleAlpha);
|
||||
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
|
||||
float scale = urandom.nextFloat() + 0.5F;
|
||||
float pX = (float) ((this.prevPosX + (this.posX - this.prevPosX) * (double)p_70539_2_ - interpPosX) + (urandom.nextGaussian() - 1D) * 0.75F);
|
||||
float pY = (float) ((this.prevPosY + (this.posY - this.prevPosY) * (double)p_70539_2_ - interpPosY) + (urandom.nextGaussian() - 1D) * 0.75F);
|
||||
float pZ = (float) ((this.prevPosZ + (this.posZ - this.prevPosZ) * (double)p_70539_2_ - interpPosZ) + (urandom.nextGaussian() - 1D) * 0.75F);
|
||||
|
||||
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), particleIcon.getMaxU(), particleIcon.getMaxV());
|
||||
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), particleIcon.getMaxU(), particleIcon.getMinV());
|
||||
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), particleIcon.getMinU(), particleIcon.getMinV());
|
||||
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), particleIcon.getMinU(), particleIcon.getMaxV());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -54,6 +54,12 @@ public class RenderLandmine extends TileEntitySpecialRenderer {
|
||||
bindTexture(ResourceManager.mine_fat_tex);
|
||||
ResourceManager.mine_fat.renderAll();
|
||||
}
|
||||
if(block == ModBlocks.mine_naval) {
|
||||
GL11.glScaled(0.5D, 0.5D, 0.5D);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
bindTexture(ResourceManager.mine_naval_tex);
|
||||
ResourceManager.mine_naval.renderAll();
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -5333,6 +5333,7 @@ tile.deco_pipe_rim_green_rusted.name=Rusty Green Steel Pipe (Rimmed)
|
||||
tile.deco_pipe_rim_red.name=Red Steel Pipe (Rimmed)
|
||||
tile.deco_pipe_rim_marked.name=Gas Pipe (Rimmed)
|
||||
tile.deco_steel.name=Steel Deco Block
|
||||
tile.deco_rusty_steel.name=Rusty Steel Deco Block
|
||||
tile.deco_titanium.name=Titanium Deco Block
|
||||
tile.deco_toaster.name=Broken Toaster
|
||||
tile.deco_tungsten.name=Tungsten Deco Block
|
||||
@ -5735,6 +5736,7 @@ tile.meteor_polished.name=Polished Meteor Block
|
||||
tile.meteor_spawner.name=Cyber Crab Assembler
|
||||
tile.mine_ap.name=Anti-Personell Mine
|
||||
tile.mine_fat.name=Fat Mine
|
||||
tile.mine_naval.name=Naval Mine
|
||||
tile.mine_he.name=Anti-Tank Mine
|
||||
tile.mine_shrap.name=Shrapnel Mine
|
||||
tile.moon_turf.name=Moon Turf
|
||||
|
||||
8481
src/main/resources/assets/hbm/models/NMine.obj
Normal file
8481
src/main/resources/assets/hbm/models/NMine.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
src/main/resources/assets/hbm/textures/blocks/mine_naval.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/mine_naval.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 428 B |
BIN
src/main/resources/assets/hbm/textures/models/ModelUboinik.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/ModelUboinik.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/resources/assets/hbm/textures/models/NMine.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/NMine.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
Loading…
x
Reference in New Issue
Block a user