le ponge die bob

new rust steel deco block (no more shittium recolor)
updated carrier to use it
naval mine model and texture swapped to legendarydoge30's
new effects for naval mine explosion (out of water and in water both have different effects)
crafting recipies added for all new things
dos uno
This commit is contained in:
Lazzzycatwastaken 2025-03-30 19:00:30 +02:00
parent 1b53215e61
commit 1ecbc015a3
17 changed files with 9671 additions and 10954 deletions

View File

@ -6,11 +6,7 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.config.ServerConfig; import com.hbm.config.ServerConfig;
import com.hbm.explosion.ExplosionLarge; import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.vanillant.ExplosionVNT; import com.hbm.explosion.vanillant.ExplosionVNT;
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard; import com.hbm.explosion.vanillant.standard.*;
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
import com.hbm.interfaces.IBomb; import com.hbm.interfaces.IBomb;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.factory.XFactoryCatapult; import com.hbm.items.weapon.sedna.factory.XFactoryCatapult;
@ -22,10 +18,12 @@ import com.hbm.tileentity.bomb.TileEntityLandmine;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer; import net.minecraft.block.BlockContainer;
import net.minecraft.block.BlockDirectional;
import net.minecraft.block.BlockFence; import net.minecraft.block.BlockFence;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -33,6 +31,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class Landmine extends BlockContainer implements IBomb { public class Landmine extends BlockContainer implements IBomb {
@ -67,9 +66,7 @@ public class Landmine extends BlockContainer implements IBomb {
if(this == ModBlocks.mine_ap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f); if(this == ModBlocks.mine_ap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f);
if(this == ModBlocks.mine_he) this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f); 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_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_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 @Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
@ -134,6 +131,18 @@ public class Landmine extends BlockContainer implements IBomb {
return false; return false;
} }
public boolean isWaterAbove(World world, int x, int y, int z) {
for(int xo = -1; xo <= 1; xo++) {
for(int zo = -1; zo <= 1; zo++) {
Block blockAbove = world.getBlock(x + xo, y + 1, z + zo);
if(blockAbove == Blocks.water || blockAbove == Blocks.flowing_water) {
return true;
}
}
}
return false;
}
@Override @Override
public BombReturnCode explode(World world, int x, int y, int z) { public BombReturnCode explode(World world, int x, int y, int z) {
@ -167,7 +176,6 @@ public class Landmine extends BlockContainer implements IBomb {
ExplosionLarge.spawnShrapnelShower(world, x + 0.5, y + 0.5, z + 0.5, 0, 1D, 0, 45, 0.2D); 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); ExplosionLarge.spawnShrapnels(world, x + 0.5, y + 0.5, z + 0.5, 5);
} else if(this == ModBlocks.mine_fat) { } else if(this == ModBlocks.mine_fat) {
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 10); ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 10);
vnt.setBlockAllocator(new BlockAllocatorStandard(64)); vnt.setBlockAllocator(new BlockAllocatorStandard(64));
vnt.setBlockProcessor(new BlockProcessorStandard()); vnt.setBlockProcessor(new BlockProcessorStandard());
@ -186,13 +194,16 @@ public class Landmine extends BlockContainer implements IBomb {
vnt.setBlockProcessor(new BlockProcessorStandard()); vnt.setBlockProcessor(new BlockProcessorStandard());
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, ServerConfig.MINE_NAVAL_DAMAGE.get()).setupPiercing(5F, 0.2F)); vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, ServerConfig.MINE_NAVAL_DAMAGE.get()).setupPiercing(5F, 0.2F));
vnt.setPlayerProcessor(new PlayerProcessorStandard()); vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F)); vnt.setSFX(new ExplosionEffectWeapon(6, 1F, 0.5F));
vnt.explode(); vnt.explode();
ExplosionLarge.spawnParticlesRadial(world, x + 0.5, y + 2, z + 0.5, 10); ExplosionLarge.spawnParticlesRadial(world, x + 0.5, y + 2, z + 0.5, 30);
ExplosionLarge.spawnRubble(world,x + 0.5, y + 0.5, z + 0.5, 5 ); 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); // Only spawn water effects if there's water above the mine
if (isWaterAbove(world, x, y, z)) {
ExplosionLarge.spawnFoam(world, x + 0.5, y + 0.5, z + 0.5, 60);
}
} }
} }

View File

@ -40,15 +40,6 @@ public class ExplosionLarge {
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 250)); 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) { public static void spawnFoam(World world, double x, double y, double z, int count) {
NBTTagCompound data = new NBTTagCompound(); NBTTagCompound data = new NBTTagCompound();

View File

@ -153,6 +153,7 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.watz_element, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(ZR.ingot(), 2), new OreDictStack(BIGMT.ingot(), 2), new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},200); makeRecipe(new ComparableStack(ModBlocks.watz_element, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(ZR.ingot(), 2), new OreDictStack(BIGMT.ingot(), 2), new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},200);
makeRecipe(new ComparableStack(ModBlocks.watz_cooler, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 2), }, 200); makeRecipe(new ComparableStack(ModBlocks.watz_cooler, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 2), }, 200);
makeRecipe(new ComparableStack(ModBlocks.watz_end, 3), new AStack[] {new OreDictStack(ANY_RESISTANTALLOY.plateWelded()), new OreDictStack(B.ingot(), 3), new OreDictStack(STEEL.plateWelded(), 2), }, 100); makeRecipe(new ComparableStack(ModBlocks.watz_end, 3), new AStack[] {new OreDictStack(ANY_RESISTANTALLOY.plateWelded()), new OreDictStack(B.ingot(), 3), new OreDictStack(STEEL.plateWelded(), 2), }, 100);
makeRecipe(new ComparableStack(ModBlocks.mine_naval, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.block_semtex, 5)},300);
makeRecipe(new ComparableStack(ModBlocks.nuke_gadget, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.fins_flat, 2), new ComparableStack(ModItems.pedestal_steel, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER), new OreDictStack("dyeGray", 8), },300); makeRecipe(new ComparableStack(ModBlocks.nuke_gadget, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.fins_flat, 2), new ComparableStack(ModItems.pedestal_steel, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER), new OreDictStack("dyeGray", 8), },300);
makeRecipe(new ComparableStack(ModBlocks.nuke_boy, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER), new OreDictStack("dyeBlue", 4), },300); makeRecipe(new ComparableStack(ModBlocks.nuke_boy, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER), new OreDictStack("dyeBlue", 4), },300);
makeRecipe(new ComparableStack(ModBlocks.nuke_man, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER), new OreDictStack("dyeYellow", 6), },300); makeRecipe(new ComparableStack(ModBlocks.nuke_man, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER), new OreDictStack("dyeYellow", 6), },300);

View File

@ -390,6 +390,10 @@ public class ChemplantRecipes extends SerializableRecipe {
new ItemStack(ModItems.niter, 3)) new ItemStack(ModItems.niter, 3))
.outputFluids(new FluidStack(Fluids.SALIENT, 250))); .outputFluids(new FluidStack(Fluids.SALIENT, 250)));
recipes.add(new ChemRecipe(104, "RUSTY_DECO_STEEL", 100)
.inputItems(new ComparableStack(ModBlocks.deco_steel, 8))
.inputFluids(new FluidStack(Fluids.WATER, 1000))
.outputItems(new ItemStack(ModBlocks.deco_rusty_steel, 8)));
} }
public static void registerOtherOil() { public static void registerOtherOil() {

View File

@ -648,6 +648,7 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_tungsten, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_tungsten, 1))}).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_tungsten, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_tungsten, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_aluminium, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_aluminium, 1))}).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_aluminium, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_aluminium, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_steel, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_steel, 1))}).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_steel, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_steel, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_rusty_steel, 8), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_steel, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_lead, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_lead, 1))}).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_lead, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_lead, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_beryllium, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_beryllium, 1))}).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_beryllium, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_beryllium, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_asbestos, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_asbestos, 1))}).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_asbestos, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_asbestos, 1))}).setTier(1));

View File

@ -1056,27 +1056,6 @@ public class ClientProxy extends ServerProxy {
} }
} }
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)) { if("foamSplash".equals(mode)) {
double strength = data.getDouble("range"); double strength = data.getDouble("range");

View File

@ -8,6 +8,8 @@ import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
import java.util.Random; import java.util.Random;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@ -16,74 +18,172 @@ public class ParticleFoam extends EntityFX {
private int age; private int age;
public int maxAge; public int maxAge;
private float baseScale = 1.0F; private float baseScale = 1.0F;
private float maxScale = 1.0F; private float maxScale = 1.5F;
// Parameters for the trail effect
private List<TrailPoint> trail = new ArrayList<TrailPoint>();
private int trailLength = 15;
private float initialVelocity;
private float buoyancy = 0.05F;
private float jitter = 0.15F;
private float drag = 0.96F;
private int explosionPhase; // 0=burst up, 1=peak, 2=settle
private static class TrailPoint {
double x, y, z;
float alpha;
public TrailPoint(double x, double y, double z, float alpha) {
this.x = x;
this.y = y;
this.z = z;
this.alpha = alpha;
}
}
public ParticleFoam(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_) { 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_); super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
particleIcon = ModEventHandlerClient.particleBase; particleIcon = ModEventHandlerClient.particleBase;
maxAge = 500 + rand.nextInt(5);
particleGravity = 0.1F; maxAge = 60 + rand.nextInt(60);
particleGravity = 0.005F + rand.nextFloat() * 0.015F;
initialVelocity = 2.0F + rand.nextFloat() * 3.0F;
motionY = initialVelocity;
double angle = rand.nextDouble() * Math.PI * 2;
double strength = rand.nextDouble() * 0.5;
motionX = Math.cos(angle) * strength;
motionZ = Math.sin(angle) * strength;
explosionPhase = 0; // Start in burst phase
particleScale = 0.3F + rand.nextFloat() * 0.7F;
} }
public void setBaseScale(float f) { this.baseScale = f; } public void setBaseScale(float f) { this.baseScale = f; }
public void setMaxScale(float f) { this.maxScale = f; } public void setMaxScale(float f) { this.maxScale = f; }
public void setTrailLength(int length) { this.trailLength = length; }
public void setBuoyancy(float buoyancy) { this.buoyancy = buoyancy; }
public void onUpdate() { public void onUpdate() {
this.prevPosX = this.posX; this.prevPosX = this.posX;
this.prevPosY = this.posY; this.prevPosY = this.posY;
this.prevPosZ = this.posZ; this.prevPosZ = this.posZ;
particleAlpha = 1 - ((float) age / (float) maxAge); trail.add(0, new TrailPoint(posX, posY, posZ, particleAlpha));
while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
}
// Update age and phase
++this.age; ++this.age;
if (this.age == this.maxAge) { if (this.age == this.maxAge) {
this.setDead(); this.setDead();
} }
if (this.age < maxAge / 4) { float phaseRatio = (float) age / (float) maxAge;
this.motionY = 3; if (phaseRatio < 0.3F) {
explosionPhase = 0;
if (phaseRatio < 0.15F) {
motionY += buoyancy * 6.0F;
} else {
motionY += buoyancy * (1.0F - (phaseRatio / 0.3F)) * 2.0F;
}
particleScale = baseScale + (maxScale - baseScale) * (phaseRatio / 0.3F);
} else if (phaseRatio < 0.6F) {
explosionPhase = 1;
motionY *= 0.98F;
particleScale = maxScale;
} else { } else {
this.motionY -= 0.05 * (1 - (float) this.age /maxAge); explosionPhase = 2;
motionY -= particleGravity;
particleScale = maxScale * (1.0F - ((phaseRatio - 0.6F) / 0.4F) * 0.7F);
} }
this.motionY -= this.particleGravity; particleAlpha = 0.8F * (1.0F - phaseRatio * phaseRatio);
this.motionX += rand.nextGaussian() * 0.1; motionX += (rand.nextFloat() - 0.5F) * jitter;
this.motionZ += rand.nextGaussian() * 0.1; motionZ += (rand.nextFloat() - 0.5F) * jitter;
this.moveEntity(this.motionX, motionY, this.motionZ); // drag like ninja drags the low taper fade
motionX *= drag;
motionY *= drag;
motionZ *= drag;
motionX *= 0.925; this.moveEntity(this.motionX, motionY, this.motionZ);
motionY *= 0.925;
motionZ *= 0.925;
this.particleAge++; // Kill particle if it hits ground
if(this.onGround || this.isInWeb) this.setDead(); if (this.onGround || this.isInWeb) {
this.setDead();
}
} }
public int getFXLayer() { public int getFXLayer() {
return 1; return 1;
} }
// ty kercig cuz id kms lol
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_) { 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_) {
renderFoamBubbles(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_,
posX, posY, posZ, particleScale, particleAlpha);
Random urandom = new Random(this.getEntityId()); for (int i = 1; i < trail.size(); i++) {
TrailPoint point = trail.get(i);
float trailScale = particleScale * (1.0F - (float)i / trailLength);
float trailAlpha = particleAlpha * (1.0F - (float)i / trailLength) * 0.7F;
for(int i = 0; i < 6; i++) { renderFoamBubbles(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_,
point.x, point.y, point.z, trailScale, trailAlpha);
}
}
p_70539_1_.setColorRGBA_F(255F, 255F, 255F, this.particleAlpha); private void renderFoamBubbles(Tessellator tessellator, float p_70539_2_, float p_70539_3_, float p_70539_4_,
p_70539_1_.setNormal(0.0F, 1.0F, 0.0F); float p_70539_5_, float p_70539_6_, float p_70539_7_, double x, double y, double z, float scale, float alpha) {
float scale = urandom.nextFloat() + 0.5F; Random urandom = new Random(this.getEntityId() + (long)(x * 100) + (long)(y * 10) + (long)z);
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()); int bubbleCount = explosionPhase == 0 ? 8 : (explosionPhase == 1 ? 6 : 4);
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()); for (int i = 0; i < bubbleCount; i++) {
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()); float whiteness = 0.9F + urandom.nextFloat() * 0.1F;
tessellator.setColorRGBA_F(whiteness, whiteness, whiteness, alpha);
tessellator.setNormal(0.0F, 1.0F, 0.0F);
float bubbleScale = scale * (urandom.nextFloat() * 0.5F + 0.75F);
float offset = explosionPhase == 0 ? 0.4F : (explosionPhase == 1 ? 0.6F : 0.9F);
float pX = (float) ((x - interpPosX) + (urandom.nextGaussian()) * offset);
float pY = (float) ((y - interpPosY) + (urandom.nextGaussian()) * offset * 0.7F);
float pZ = (float) ((z - interpPosZ) + (urandom.nextGaussian()) * offset);
tessellator.addVertexWithUV(
(double)(pX - p_70539_3_ * bubbleScale - p_70539_6_ * bubbleScale),
(double)(pY - p_70539_4_ * bubbleScale),
(double)(pZ - p_70539_5_ * bubbleScale - p_70539_7_ * bubbleScale),
particleIcon.getMaxU(), particleIcon.getMaxV());
tessellator.addVertexWithUV(
(double)(pX - p_70539_3_ * bubbleScale + p_70539_6_ * bubbleScale),
(double)(pY + p_70539_4_ * bubbleScale),
(double)(pZ - p_70539_5_ * bubbleScale + p_70539_7_ * bubbleScale),
particleIcon.getMaxU(), particleIcon.getMinV());
tessellator.addVertexWithUV(
(double)(pX + p_70539_3_ * bubbleScale + p_70539_6_ * bubbleScale),
(double)(pY + p_70539_4_ * bubbleScale),
(double)(pZ + p_70539_5_ * bubbleScale + p_70539_7_ * bubbleScale),
particleIcon.getMinU(), particleIcon.getMinV());
tessellator.addVertexWithUV(
(double)(pX + p_70539_3_ * bubbleScale - p_70539_6_ * bubbleScale),
(double)(pY - p_70539_4_ * bubbleScale),
(double)(pZ + p_70539_5_ * bubbleScale - p_70539_7_ * bubbleScale),
particleIcon.getMinU(), particleIcon.getMaxV());
} }
} }
} }

View File

@ -1,102 +0,0 @@
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());
}
}
}

View File

@ -55,8 +55,8 @@ public class RenderLandmine extends TileEntitySpecialRenderer {
ResourceManager.mine_fat.renderAll(); ResourceManager.mine_fat.renderAll();
} }
if(block == ModBlocks.mine_naval) { if(block == ModBlocks.mine_naval) {
GL11.glScaled(0.5D, 0.5D, 0.5D); GL11.glScaled(1D, 1D, 1D);
GL11.glTranslated(0, 1, 0); GL11.glTranslated(0,0.5,0);
bindTexture(ResourceManager.mine_naval_tex); bindTexture(ResourceManager.mine_naval_tex);
ResourceManager.mine_naval.renderAll(); ResourceManager.mine_naval.renderAll();
} }

View File

@ -794,6 +794,7 @@ public class NBTStructure {
} }
// Each jigsaw block in a structure will instance one of these // Each jigsaw block in a structure will instance one of these
private static class JigsawConnection { private static class JigsawConnection {

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 874 B