ace combat zero reference

This commit is contained in:
Vaern 2023-02-15 14:40:57 -08:00
parent f5ceaddfbb
commit 5f07bb7896
6 changed files with 39 additions and 3 deletions

View File

@ -6,8 +6,10 @@ import java.util.List;
import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.IPersistentInfoProvider; import com.hbm.blocks.IPersistentInfoProvider;
import com.hbm.entity.projectile.EntityBombletZeta;
import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.inventory.fluid.trait.FT_Flammable;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.tileentity.IPersistentNBT; import com.hbm.tileentity.IPersistentNBT;
import com.hbm.tileentity.IRepairable; import com.hbm.tileentity.IRepairable;
@ -26,6 +28,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.StatList; import net.minecraft.stats.StatList;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.Explosion; import net.minecraft.world.Explosion;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -134,6 +137,15 @@ public class MachineFluidTank extends BlockDummyable implements IPersistentInfoP
if(!tank.hasExploded) { if(!tank.hasExploded) {
tank.explode(); tank.explode();
if(explosion.exploder != null && explosion.exploder instanceof EntityBombletZeta) {
if(tank.tank.getTankType().getTrait(FT_Flammable.class) == null) return;
List<EntityPlayer> players = world.getEntitiesWithinAABB(EntityPlayer.class,
AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5).expand(100, 100, 100));
for(EntityPlayer p : players) p.triggerAchievement(MainRegistry.achInferno);
}
} else { } else {
world.setBlock(pos[0], pos[1], pos[2], Blocks.air); world.setBlock(pos[0], pos[1], pos[2], Blocks.air);
} }

View File

@ -7,6 +7,7 @@ import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ILookOverlay;
import com.hbm.blocks.IPersistentInfoProvider; import com.hbm.blocks.IPersistentInfoProvider;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.entity.projectile.EntityBombletZeta;
import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.fluid.tank.FluidTank; import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
@ -27,6 +28,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.stats.StatList; import net.minecraft.stats.StatList;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.Explosion; import net.minecraft.world.Explosion;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -127,6 +129,13 @@ public class MachineRefinery extends BlockDummyable implements IPersistentInfoPr
if(!refinery.hasExploded) { if(!refinery.hasExploded) {
refinery.explode(world, x, y, z); refinery.explode(world, x, y, z);
if(explosion.exploder != null && explosion.exploder instanceof EntityBombletZeta) {
List<EntityPlayer> players = world.getEntitiesWithinAABB(EntityPlayer.class,
AxisAlignedBB.getBoundingBox(x + 0.5, y + 0.5, z + 0.5, x + 0.5, y + 0.5, z + 0.5).expand(100, 100, 100));
for(EntityPlayer p : players) p.triggerAchievement(MainRegistry.achInferno);
}
} else { } else {
world.setBlock(pos[0], pos[1], pos[2], Blocks.air); world.setBlock(pos[0], pos[1], pos[2], Blocks.air);
} }

View File

@ -46,11 +46,11 @@ public class EntityBombletZeta extends EntityThrowable {
if(!this.worldObj.isRemote) if(!this.worldObj.isRemote)
{ {
if(type == 0) { if(type == 0) {
ExplosionLarge.explode(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 5.0F, true, false, false); ExplosionLarge.explode(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 5.0F, true, false, false, this);
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.bombDet", 25.0F, 0.8F + rand.nextFloat() * 0.4F); worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.bombDet", 25.0F, 0.8F + rand.nextFloat() * 0.4F);
} }
if(type == 1) { if(type == 1) {
ExplosionLarge.explode(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 2.5F, false, false, false); ExplosionLarge.explode(worldObj, this.posX + 0.5F, this.posY + 0.5F, this.posZ + 0.5F, 2.5F, false, false, false, this);
ExplosionChaos.burn(worldObj, (int)posX, (int)posY, (int)posZ, 9); ExplosionChaos.burn(worldObj, (int)posX, (int)posY, (int)posZ, 9);
ExplosionChaos.flameDeath(worldObj, (int)posX, (int)posY, (int)posZ, 14); ExplosionChaos.flameDeath(worldObj, (int)posX, (int)posY, (int)posZ, 14);
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.bombDet", 25.0F, 1.0F); worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.bombDet", 25.0F, 1.0F);

View File

@ -168,6 +168,16 @@ public class ExplosionLarge {
} }
} }
public static void explode(World world, double x, double y, double z, float strength, boolean cloud, boolean rubble, boolean shrapnel, Entity exploder) {
world.createExplosion(exploder, x, y, z, strength, true);
if(cloud)
spawnParticles(world, x, y, z, cloudFunction((int)strength));
if(rubble)
spawnRubble(world, x, y, z, rubbleFunction((int)strength));
if(shrapnel)
spawnShrapnels(world, x, y, z, shrapnelFunction((int)strength));
}
public static void explode(World world, double x, double y, double z, float strength, boolean cloud, boolean rubble, boolean shrapnel) { public static void explode(World world, double x, double y, double z, float strength, boolean cloud, boolean rubble, boolean shrapnel) {
world.createExplosion(null, x, y, z, strength, true); world.createExplosion(null, x, y, z, strength, true);
if(cloud) if(cloud)

View File

@ -177,6 +177,7 @@ public class MainRegistry {
public static Achievement achSlimeball; public static Achievement achSlimeball;
public static Achievement achSulfuric; public static Achievement achSulfuric;
public static Achievement achWitchtaunter; public static Achievement achWitchtaunter;
public static Achievement achInferno;
public static Achievement bobHidden; public static Achievement bobHidden;
public static Achievement horizonsStart; public static Achievement horizonsStart;
public static Achievement horizonsEnd; public static Achievement horizonsEnd;
@ -621,7 +622,8 @@ public class MainRegistry {
achWitchtaunter = new Achievement("achievement.witchtaunter", "witchtaunter", -8, 7, ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VAMPIRE), null).initIndependentStat().setSpecial().registerStat(); achWitchtaunter = new Achievement("achievement.witchtaunter", "witchtaunter", -8, 7, ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.VAMPIRE), null).initIndependentStat().setSpecial().registerStat();
achSlimeball = new Achievement("achievement.slimeball", "slimeball", -10, 6, Items.slime_ball, null).initIndependentStat().registerStat(); achSlimeball = new Achievement("achievement.slimeball", "slimeball", -10, 6, Items.slime_ball, null).initIndependentStat().registerStat();
achSulfuric = new Achievement("achievement.sulfuric", "sulfuric", -10, 8, ModItems.bucket_sulfuric_acid, achSlimeball).initIndependentStat().setSpecial().registerStat(); achSulfuric = new Achievement("achievement.sulfuric", "sulfuric", -10, 8, ModItems.bucket_sulfuric_acid, achSlimeball).initIndependentStat().setSpecial().registerStat();
achInferno = new Achievement("achievement.inferno", "inferno", -8, 10, ModItems.canister_napalm, null).initIndependentStat().setSpecial().registerStat();
bobHidden = new Achievement("achievement.hidden", "hidden", 15, -4, ModItems.gun_dampfmaschine, null).initIndependentStat().registerStat(); bobHidden = new Achievement("achievement.hidden", "hidden", 15, -4, ModItems.gun_dampfmaschine, null).initIndependentStat().registerStat();
horizonsStart = new Achievement("achievement.horizonsStart", "horizonsStart", -5, 4, ModItems.sat_gerald, null).initIndependentStat().registerStat(); horizonsStart = new Achievement("achievement.horizonsStart", "horizonsStart", -5, 4, ModItems.sat_gerald, null).initIndependentStat().registerStat();
@ -697,6 +699,7 @@ public class MainRegistry {
achRadPoison, achRadPoison,
achRadDeath, achRadDeath,
achWitchtaunter, achWitchtaunter,
achInferno,
achSlimeball, achSlimeball,
achSulfuric, achSulfuric,
bossCreeper, bossCreeper,

View File

@ -66,6 +66,8 @@ achievement.horizonsStart.desc=Send a lad to the moon.
achievement.horizonsStart=Apogee achievement.horizonsStart=Apogee
achievement.impossible.desc=You can't get this achievement. achievement.impossible.desc=You can't get this achievement.
achievement.impossible=Literally impossible achievement.impossible=Literally impossible
achievement.inferno.desc="Turn it to ashes! That's not enough! Drop more bombs!"
achievement.inferno=Operation Cannibal
achievement.manhattan.desc=8:15; August 6th, 1945 achievement.manhattan.desc=8:15; August 6th, 1945
achievement.manhattan=The Manhattan Project achievement.manhattan=The Manhattan Project
achievement.meltdown.desc=You got this far, how could you mess this up? achievement.meltdown.desc=You got this far, how could you mess this up?