the duchess gambit

This commit is contained in:
HbmMods 2019-02-13 16:41:41 +01:00
parent 82b5203f46
commit 4fd6fc3c89
13 changed files with 1478 additions and 16 deletions

File diff suppressed because it is too large Load Diff

View File

@ -106,6 +106,7 @@
"weapon.shotgunReload": {"category": "player", "sounds": ["weapon/shotgunReload1", "weapon/shotgunReload2", "weapon/shotgunReload3"]},
"weapon.magReload": {"category": "player", "sounds": [{"name": "weapon/magReload", "stream": false}]},
"weapon.rpgReload": {"category": "player", "sounds": [{"name": "weapon/rpgReload", "stream": false}]},
"weapon.boat": {"category": "player", "sounds": [{"name": "weapon/boat", "stream": false}]},
"weapon.reloadTurret": {"category": "player", "sounds": [{"name": "weapon/reloadTurret", "stream": false}]},
"weapon.switchmode1": {"category": "player", "sounds": [{"name": "weapon/switchmode1", "stream": false}]},
@ -152,5 +153,6 @@
"alarm.nostromoSiren": {"category": "record", "sounds": [{"name": "alarm/nostromoSiren", "stream": false}]},
"alarm.easAlarm": {"category": "record", "sounds": [{"name": "alarm/easAlarm", "stream": false}]},
"alarm.airRaid": {"category": "record", "sounds": [{"name": "alarm/airRaid", "stream": true}]},
"alarm.classic": {"category": "record", "sounds": [{"name": "alarm/classicSiren", "stream": true}]}
"alarm.classic": {"category": "record", "sounds": [{"name": "alarm/classicSiren", "stream": true}]},
"alarm.gambit": {"category": "record", "sounds": [{"name": "alarm/gambit", "stream": true}]}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -206,6 +206,7 @@ public class ModBlocks {
public static Block crate_red;
public static Block boxcar;
public static Block boat;
public static Block bomber;
public static Block seal_frame;
@ -1000,6 +1001,7 @@ public class ModBlocks {
safe = new BlockStorageCrate(Material.iron).setBlockName("safe").setStepSound(Block.soundTypeMetal).setHardness(7.5F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
boxcar = new DecoBlock(Material.iron).setBlockName("boxcar").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":boxcar");
boat = new DecoBlock(Material.iron).setBlockName("boat").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":boat");
bomber = new DecoBlock(Material.iron).setBlockName("bomber").setStepSound(Block.soundTypeMetal).setHardness(10.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":code");
machine_well = new MachineOilWell(Material.iron).setBlockName("machine_well").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_well");
@ -1363,6 +1365,7 @@ public class ModBlocks {
//Junk
GameRegistry.registerBlock(boxcar, boxcar.getUnlocalizedName());
GameRegistry.registerBlock(boat, boat.getUnlocalizedName());
GameRegistry.registerBlock(bomber, bomber.getUnlocalizedName());
//Machines

View File

@ -13,6 +13,8 @@ import com.hbm.entity.particle.EntityTSmokeFX;
import com.hbm.explosion.ExplosionChaos;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionNukeGeneric;
import com.hbm.explosion.ExplosionParticle;
import com.hbm.explosion.ExplosionParticleB;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.lib.Library;
@ -413,6 +415,20 @@ public class EntityBulletBase extends Entity implements IProjectile {
if(config.nuke > 0 && !worldObj.isRemote) {
worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(worldObj, config.nuke, posX, posY, posZ));
if(MainRegistry.polaroidID == 11) {
if(rand.nextInt(100) >= 0) {
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
}
} else {
if(rand.nextInt(100) == 0) {
ExplosionParticleB.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
} else {
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 3, (int)this.posZ);
}
}
}
if(config.destroysBlocks && !worldObj.isRemote) {
@ -451,20 +467,20 @@ public class EntityBulletBase extends Entity implements IProjectile {
}
if(config.boat && !worldObj.isRemote) {
EntityBoxcar pippo = new EntityBoxcar(worldObj);
EntityDuchessGambit pippo = new EntityDuchessGambit(worldObj);
pippo.posX = e.posX;
pippo.posY = e.posY + 50;
pippo.posZ = e.posZ;
for(int j = 0; j < 50; j++) {
EntityBSmokeFX fx = new EntityBSmokeFX(worldObj, pippo.posX + (rand.nextDouble() - 0.5) * 4, pippo.posY + (rand.nextDouble() - 0.5) * 12, pippo.posZ + (rand.nextDouble() - 0.5) * 4, 0, 0, 0);
for(int j = 0; j < 150; j++) {
EntityBSmokeFX fx = new EntityBSmokeFX(worldObj, pippo.posX + (rand.nextDouble() - 0.5) * 7, pippo.posY + (rand.nextDouble() - 0.5) * 8, pippo.posZ + (rand.nextDouble() - 0.5) * 18, 0, 0, 0);
worldObj.spawnEntityInWorld(fx);
}
worldObj.spawnEntityInWorld(pippo);
worldObj.playSoundEffect(pippo.posX,
pippo.posY + 50,
pippo.posZ, "hbm:alarm.trainHorn", 100F, 1F);
pippo.posZ, "hbm:weapon.boat", 100F, 1F);
}
}

View File

@ -0,0 +1,91 @@
package com.hbm.entity.projectile;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.particle.EntityGasFlameFX;
import com.hbm.entity.particle.EntitySmokeFX;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.world.Meteorite;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class EntityDuchessGambit extends EntityThrowable {
public EntityDuchessGambit(World p_i1582_1_) {
super(p_i1582_1_);
this.ignoreFrustumCheck = true;
this.isImmuneToFire = true;
}
@Override
public void onUpdate() {
this.lastTickPosX = this.prevPosX = posX;
this.lastTickPosY = this.prevPosY = posY;
this.lastTickPosZ = this.prevPosZ = posZ;
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
/*this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;*/
this.motionY -= 0.03;
if(motionY < -1.5)
motionY = -1.5;
if(this.worldObj.getBlock((int)this.posX, (int)this.posY, (int)this.posZ) != Blocks.air)
{
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:alarm.gambit", 10000.0F, 1F);
this.setDead();
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
AxisAlignedBB.getBoundingBox(posX - 5, posY - 2, posZ - 9, posX + 5, posY + 2, posZ + 9));
for(Entity e : list) {
e.attackEntityFrom(ModDamageSource.boxcar, 1000);
}
if(!worldObj.isRemote) {
ExplosionLarge.explode(worldObj, posX, posY, posZ - 6, 2, true, false, false);
ExplosionLarge.explode(worldObj, posX, posY, posZ - 3, 2, true, false, false);
ExplosionLarge.explode(worldObj, posX, posY, posZ, 2, true, false, false);
ExplosionLarge.explode(worldObj, posX, posY, posZ + 3, 2, true, false, false);
ExplosionLarge.explode(worldObj, posX, posY, posZ + 6, 2, true, false, false);
worldObj.setBlock((int)(this.posX - 0.5), (int)(this.posY + 0.5), (int)(this.posZ - 0.5), ModBlocks.boat);
}
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 3);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2.5);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 2);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1.5);
ExplosionLarge.spawnShock(worldObj, posX, posY + 1, posZ, 24, 1);
}
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
}
}

View File

@ -341,6 +341,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityBombletSelena.class, new RenderBombletSelena());
RenderingRegistry.registerEntityRenderingHandler(EntityMeteor.class, new RenderMeteor());
RenderingRegistry.registerEntityRenderingHandler(EntityBoxcar.class, new RenderBoxcar());
RenderingRegistry.registerEntityRenderingHandler(EntityDuchessGambit.class, new RenderBoxcar());
RenderingRegistry.registerEntityRenderingHandler(EntityCarrier.class, new RenderCarrierMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityBooster.class, new RenderBoosterMissile());
RenderingRegistry.registerEntityRenderingHandler(EntityBomber.class, new RenderBomber());

View File

@ -173,6 +173,7 @@ import com.hbm.entity.projectile.EntityBurningFOEQ;
import com.hbm.entity.projectile.EntityChopperMine;
import com.hbm.entity.projectile.EntityCombineBall;
import com.hbm.entity.projectile.EntityDischarge;
import com.hbm.entity.projectile.EntityDuchessGambit;
import com.hbm.entity.projectile.EntityExplosiveBeam;
import com.hbm.entity.projectile.EntityFallingNuke;
import com.hbm.entity.projectile.EntityFire;
@ -910,6 +911,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityBulletBase.class, "entity_bullet_mk2", 131, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityMinerRocket.class, "entity_miner_lander", 132, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityFogFX.class, "entity_nuclear_fog", 133, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityDuchessGambit.class, "entity_duchessgambit", 134, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
@ -1874,9 +1876,9 @@ public class MainRegistry
propBlastSpeed.comment = "Base speed of MK3 system (old and schrabidium) detonations (Blocks / tick)";
blastSpeed = propBlastSpeed.getInt();
//fallout range
Property propFalloutRange = config.get(CATEGORY_NUKE, "6.02_falloutRange", 100);
propFalloutRange.comment = "Radius of fallout area (base radius * value in percent)";
falloutRange = propFalloutRange.getInt();
Property propFalloutRange = config.get(CATEGORY_NUKE, "6.02_blastSpeedNew", 1024);
propFalloutRange.comment = "Base speed of MK4 system (new) detonations (Blocks / tick)";
mk4 = propFalloutRange.getInt();
//fallout speed
Property falloutRangeProp = config.get(CATEGORY_NUKE, "6.03_falloutRange", 100);
falloutRangeProp.comment = "Radius of fallout area (base radius * value in percent)";

View File

@ -283,6 +283,7 @@ public class ResourceManager {
//Boxcar
public static final IModelCustom boxcar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/boxcar.obj"));
public static final IModelCustom duchessgambit = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/duchessgambit.obj"));
//Bomber
public static final IModelCustom dornier = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/dornier.obj"));
@ -305,6 +306,7 @@ public class ResourceManager {
//Boxcar
public static final ResourceLocation boxcar_tex = new ResourceLocation(RefStrings.MODID, "textures/models/boxcar.png");
public static final ResourceLocation duchessgambit_tex = new ResourceLocation(RefStrings.MODID, "textures/models/duchessgambit.png");
//Bomber
public static final ResourceLocation dornier_0_tex = new ResourceLocation(RefStrings.MODID, "textures/models/dornier_0.png");

View File

@ -2,6 +2,8 @@ package com.hbm.render.entity;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.projectile.EntityBoxcar;
import com.hbm.entity.projectile.EntityDuchessGambit;
import com.hbm.main.ResourceManager;
import net.minecraft.client.renderer.entity.Render;
@ -16,15 +18,25 @@ public class RenderBoxcar extends Render {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glTranslatef(0, 0, -1.5F);
GL11.glRotated(180, 0, 0, 1);
GL11.glRotated(90, 1, 0, 0);
GL11.glDisable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.boxcar_tex);
ResourceManager.boxcar.renderAll();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
if(p_76986_1_ instanceof EntityBoxcar) {
GL11.glTranslatef(0, 0, -1.5F);
GL11.glRotated(180, 0, 0, 1);
GL11.glRotated(90, 1, 0, 0);
bindTexture(ResourceManager.boxcar_tex);
ResourceManager.boxcar.renderAll();
}
if(p_76986_1_ instanceof EntityDuchessGambit) {
GL11.glTranslatef(0, 0, -1.0F);
bindTexture(ResourceManager.duchessgambit_tex);
ResourceManager.duchessgambit.renderAll();
}
GL11.glPopMatrix();
}

View File

@ -209,6 +209,16 @@ public class RenderDecoBlock extends TileEntitySpecialRenderer {
GL11.glEnable(GL11.GL_CULL_FACE);
}
if(tileentity.getWorldObj().getBlock(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == ModBlocks.boat) {
GL11.glRotatef(180, 0F, 0F, 1F);
GL11.glTranslatef(0, 0, -1.5F);
GL11.glTranslatef(0, 0.5F, 0);
GL11.glEnable(GL11.GL_CULL_FACE);
bindTexture(ResourceManager.duchessgambit_tex);
ResourceManager.duchessgambit.renderAll();
}
if(tileentity instanceof TileEntityBomber)
{
TileEntityBomber bomber = (TileEntityBomber)tileentity;