mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
2 new sirens, death ray visual effect, jetpacks now need kerosene
This commit is contained in:
parent
912e2db0b6
commit
cf2bf0dc56
@ -104,5 +104,7 @@
|
||||
"alarm.blastDoorAlarm": {"category": "record", "sounds": [{"name": "alarm/blastDoorAlarm", "stream": false}]},
|
||||
"alarm.klaxon": {"category": "record", "sounds": [{"name": "alarm/klaxon", "stream": false}]},
|
||||
"alarm.striderSiren": {"category": "record", "sounds": [{"name": "alarm/striderSiren", "stream": false}]},
|
||||
"alarm.regularSiren": {"category": "record", "sounds": [{"name": "alarm/regularSiren", "stream": false}]}
|
||||
"alarm.regularSiren": {"category": "record", "sounds": [{"name": "alarm/regularSiren", "stream": false}]},
|
||||
"alarm.foKlaxonA": {"category": "record", "sounds": [{"name": "alarm/foKlaxonA", "stream": false}]},
|
||||
"alarm.foKlaxonB": {"category": "record", "sounds": [{"name": "alarm/foKlaxonB", "stream": false}]}
|
||||
}
|
||||
|
||||
BIN
assets/hbm/sounds/alarm/foKlaxonA.ogg
Normal file
BIN
assets/hbm/sounds/alarm/foKlaxonA.ogg
Normal file
Binary file not shown.
BIN
assets/hbm/sounds/alarm/foKlaxonB.ogg
Normal file
BIN
assets/hbm/sounds/alarm/foKlaxonB.ogg
Normal file
Binary file not shown.
@ -81,4 +81,11 @@ public class EntityCloudFleija extends Entity {
|
||||
public int getMaxAge() {
|
||||
return this.dataWatcher.getWatchableObjectInt(16);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 25000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,4 +81,11 @@ public class EntityCloudFleijaRainbow extends Entity {
|
||||
public int getMaxAge() {
|
||||
return this.dataWatcher.getWatchableObjectInt(16);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 25000;
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,4 +89,11 @@ public class EntityNukeCloudSmall extends Entity {
|
||||
return cloud;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 25000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
59
com/hbm/entity/logic/EntityDeathBlast.java
Normal file
59
com/hbm/entity/logic/EntityDeathBlast.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityDeathBlast extends Entity {
|
||||
|
||||
public static final int maxAge = 60;
|
||||
|
||||
public EntityDeathBlast(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
this.ignoreFrustumCheck = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() { }
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) { }
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) { }
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(this.ticksExisted >= maxAge && !worldObj.isRemote) {
|
||||
this.setDead();
|
||||
|
||||
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 25, true, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBrightnessForRender(float p_70070_1_)
|
||||
{
|
||||
return 15728880;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness(float p_70013_1_)
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 25000;
|
||||
}
|
||||
|
||||
}
|
||||
@ -5,6 +5,10 @@ import java.util.Arrays;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.inventory.gui.GuiInfoContainer;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.gear.JetpackBooster;
|
||||
import com.hbm.items.gear.JetpackBreak;
|
||||
import com.hbm.items.gear.JetpackRegular;
|
||||
import com.hbm.items.gear.JetpackVectorized;
|
||||
import com.hbm.items.tool.ItemFluidIdentifier;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -109,6 +113,40 @@ public class FluidTank {
|
||||
ItemStack full = null;
|
||||
if(slots[in] != null) {
|
||||
|
||||
for(int i = 0; i < 25; i++) {
|
||||
if(slots[in].getItem() == ModItems.jetpack_boost && this.type.name().equals(FluidType.KEROSENE.name())) {
|
||||
if(this.fluid > 0 && JetpackBooster.getFuel(slots[in]) < JetpackBooster.maxFuel) {
|
||||
this.fluid--;
|
||||
JetpackBooster.setFuel(slots[in], JetpackBooster.getFuel(slots[in]) + 1);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if(slots[in].getItem() == ModItems.jetpack_break && this.type.name().equals(FluidType.KEROSENE.name())) {
|
||||
if(this.fluid > 0 && JetpackBreak.getFuel(slots[in]) < JetpackBreak.maxFuel) {
|
||||
this.fluid--;
|
||||
JetpackBreak.setFuel(slots[in], JetpackBreak.getFuel(slots[in]) + 1);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if(slots[in].getItem() == ModItems.jetpack_fly && this.type.name().equals(FluidType.KEROSENE.name())) {
|
||||
if(this.fluid > 0 && JetpackRegular.getFuel(slots[in]) < JetpackRegular.maxFuel) {
|
||||
this.fluid--;
|
||||
JetpackRegular.setFuel(slots[in], JetpackRegular.getFuel(slots[in]) + 1);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if(slots[in].getItem() == ModItems.jetpack_vector && this.type.name().equals(FluidType.KEROSENE.name())) {
|
||||
if(this.fluid > 0 && JetpackVectorized.getFuel(slots[in]) < JetpackVectorized.maxFuel) {
|
||||
this.fluid--;
|
||||
JetpackVectorized.setFuel(slots[in], JetpackVectorized.getFuel(slots[in]) + 1);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[in].getItem() == ModItems.fluid_barrel_infinite) {
|
||||
this.fluid = 0;
|
||||
return;
|
||||
|
||||
@ -191,18 +191,18 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor {
|
||||
}
|
||||
|
||||
if (Library.checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs,
|
||||
ModItems.t45_boots)) {
|
||||
ModItems.t45_boots) && !world.isRemote) {
|
||||
if (player.inventory.armorInventory[2] != null
|
||||
&& player.inventory.armorInventory[2].getItem() == ModItems.t45_plate
|
||||
&& player.inventory.armorInventory[2].stackTagCompound != null
|
||||
&& player.inventory.armorInventory[2].stackTagCompound.getInteger("charge") > 0) {
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 20, 0, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 20, 2, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 20, 0, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.jump.id, 30, 0, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 30, 1, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 30, 2, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 30, 0, true));
|
||||
} else {
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 1, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 20, 0, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 30, 1, true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 30, 0, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -212,9 +212,9 @@ public class ArmorT45 extends ItemArmor implements ISpecialArmor {
|
||||
if (itemstack.getItem() == ModItems.t45_plate) {
|
||||
if (itemstack.stackTagCompound != null) {
|
||||
if (itemstack.stackTagCompound.getInteger("charge") != 0)
|
||||
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 50 + 1) + "%");
|
||||
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 2000 + 1) + "%");
|
||||
else
|
||||
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 50) + "%");
|
||||
list.add("Charge: " + (itemstack.stackTagCompound.getInteger("charge") / 2000) + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.gear;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelGoggles;
|
||||
@ -21,11 +23,18 @@ import net.minecraft.world.World;
|
||||
public class JetpackBooster extends ItemArmor {
|
||||
|
||||
private ModelJetPack model;
|
||||
public static int maxFuel = 750;
|
||||
|
||||
public JetpackBooster(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
|
||||
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add("Kerosene: " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
@ -52,7 +61,7 @@ public class JetpackBooster extends ItemArmor {
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
if(player.isSneaking() && this.getBoost(stack) == 0 && this.getCooldown(stack) == 0) {
|
||||
if(player.isSneaking() && this.getBoost(stack) == 0 && this.getCooldown(stack) == 0 && this.getFuel(stack) > 0) {
|
||||
this.setBoost(stack, 15);
|
||||
this.setCooldown(stack, 40);
|
||||
}
|
||||
@ -71,12 +80,17 @@ public class JetpackBooster extends ItemArmor {
|
||||
fx.motionY = -0.1;
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
this.setFuel(stack, this.getFuel(stack) - 1);
|
||||
|
||||
if(player.motionY > 0)
|
||||
player.fallDistance = 0;
|
||||
}
|
||||
|
||||
if(this.getCooldown(stack) > 0)
|
||||
this.setCooldown(stack, this.getCooldown(stack) - 1);
|
||||
|
||||
if(this.getFuel(stack) == 0)
|
||||
this.setBoost(stack, 0);
|
||||
}
|
||||
|
||||
public void setBoost(ItemStack stack, int i) {
|
||||
@ -107,4 +121,23 @@ public class JetpackBooster extends ItemArmor {
|
||||
return stack.stackTagCompound.getInteger("cool");
|
||||
}
|
||||
|
||||
public static int getFuel(ItemStack stack) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return stack.stackTagCompound.getInteger("fuel");
|
||||
|
||||
}
|
||||
|
||||
public static void setFuel(ItemStack stack, int i) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("fuel", i);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.gear;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.render.model.ModelJetPack;
|
||||
|
||||
@ -12,17 +14,25 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class JetpackBreak extends ItemArmor {
|
||||
|
||||
private ModelJetPack model;
|
||||
public static int maxFuel = 1200;
|
||||
|
||||
public JetpackBreak(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
|
||||
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add("Kerosene: " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
@ -49,7 +59,7 @@ public class JetpackBreak extends ItemArmor {
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
if(player.motionY < -0.25) {
|
||||
if(player.motionY < -0.25 && this.getFuel(stack) > 0) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(player.getLookVec().xCoord, 0, player.getLookVec().zCoord);
|
||||
vec.normalize();
|
||||
@ -63,6 +73,27 @@ public class JetpackBreak extends ItemArmor {
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
player.fallDistance = 0;
|
||||
|
||||
this.setFuel(stack, this.getFuel(stack) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getFuel(ItemStack stack) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return stack.stackTagCompound.getInteger("fuel");
|
||||
|
||||
}
|
||||
|
||||
public static void setFuel(ItemStack stack, int i) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("fuel", i);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.gear;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelGoggles;
|
||||
@ -21,11 +23,18 @@ import net.minecraft.world.World;
|
||||
public class JetpackRegular extends ItemArmor {
|
||||
|
||||
private ModelJetPack model;
|
||||
public static int maxFuel = 3000;
|
||||
|
||||
public JetpackRegular(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
|
||||
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add("Kerosene: " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
@ -52,7 +61,7 @@ public class JetpackRegular extends ItemArmor {
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
if(player.isSneaking()) {
|
||||
if(player.isSneaking() && this.getFuel(stack) > 0) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(player.getLookVec().xCoord, 0, player.getLookVec().zCoord);
|
||||
vec.normalize();
|
||||
@ -66,7 +75,28 @@ public class JetpackRegular extends ItemArmor {
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
player.fallDistance = 0;
|
||||
|
||||
this.setFuel(stack, this.getFuel(stack) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getFuel(ItemStack stack) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return stack.stackTagCompound.getInteger("fuel");
|
||||
|
||||
}
|
||||
|
||||
public static void setFuel(ItemStack stack, int i) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("fuel", i);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.items.gear;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.particle.EntityGasFlameFX;
|
||||
import com.hbm.render.model.ModelJetPack;
|
||||
|
||||
@ -12,17 +14,25 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class JetpackVectorized extends ItemArmor {
|
||||
|
||||
private ModelJetPack model;
|
||||
public static int maxFuel = 6000;
|
||||
|
||||
public JetpackVectorized(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
|
||||
super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add("Kerosene: " + this.getFuel(itemstack) + "mB / " + this.maxFuel + "mB");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
|
||||
@ -49,7 +59,7 @@ public class JetpackVectorized extends ItemArmor {
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
if(player.isSneaking()) {
|
||||
if(player.isSneaking() && this.getFuel(stack) > 0) {
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(player.getLookVec().xCoord, 0, player.getLookVec().zCoord);
|
||||
vec.normalize();
|
||||
@ -68,6 +78,27 @@ public class JetpackVectorized extends ItemArmor {
|
||||
world.spawnEntityInWorld(fx);
|
||||
|
||||
player.fallDistance = 0;
|
||||
|
||||
this.setFuel(stack, this.getFuel(stack) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getFuel(ItemStack stack) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
return 0;
|
||||
}
|
||||
|
||||
return stack.stackTagCompound.getInteger("fuel");
|
||||
|
||||
}
|
||||
|
||||
public static void setFuel(ItemStack stack, int i) {
|
||||
if(stack.stackTagCompound == null) {
|
||||
stack.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("fuel", i);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,8 @@ public class ItemCassette extends Item {
|
||||
BLAST_DOOR( "Blast Door Alarm", new ResourceLocation("hbm:alarm.blastDoorAlarm"), SoundType.LOOP, 11665408, 50),
|
||||
APC_LOOP( "APC Siren", new ResourceLocation("hbm:alarm.apcLoop"), SoundType.LOOP, 3565216, 50),
|
||||
KLAXON( "Klaxon", new ResourceLocation("hbm:alarm.klaxon"), SoundType.LOOP, 8421504, 50),
|
||||
KLAXON_A( "Vault Door Alarm", new ResourceLocation("hbm:alarm.foKlaxonA"), SoundType.LOOP, 0x8c810b, 50),
|
||||
KLAXON_B( "Security Alert", new ResourceLocation("hbm:alarm.foKlaxonB"), SoundType.LOOP, 0x76818e, 50),
|
||||
SIREN( "Standard Siren", new ResourceLocation("hbm:alarm.regularSiren"), SoundType.LOOP, 6684672, 100),
|
||||
BANK_ALARM( "Bank Alarm", new ResourceLocation("hbm:alarm.bankAlarm"), SoundType.LOOP, 3572962, 100),
|
||||
BEEP_SIREN( "Beep Siren", new ResourceLocation("hbm:alarm.beepSiren"), SoundType.LOOP, 13882323, 100),
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.entity.effect.*;
|
||||
import com.hbm.entity.grenade.*;
|
||||
import com.hbm.entity.item.EntityMinecartTest;
|
||||
import com.hbm.entity.logic.EntityBomber;
|
||||
import com.hbm.entity.logic.EntityDeathBlast;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionAdvanced;
|
||||
import com.hbm.entity.missile.*;
|
||||
import com.hbm.entity.mob.*;
|
||||
@ -159,6 +160,7 @@ public class ClientProxy extends ServerProxy
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBlackHole.class, new RenderBlackHole());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityVortex.class, new RenderBlackHole());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRagingVortex.class, new RenderBlackHole());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDeathBlast.class, new RenderDeathBlast());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoTapeRecorder.class, new RenderTapeRecorder());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDecoSteelPoles.class, new RenderSteelPoles());
|
||||
|
||||
@ -90,6 +90,7 @@ import com.hbm.entity.grenade.EntityGrenadeTau;
|
||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
||||
import com.hbm.entity.item.EntityMinecartTest;
|
||||
import com.hbm.entity.logic.EntityBomber;
|
||||
import com.hbm.entity.logic.EntityDeathBlast;
|
||||
import com.hbm.entity.logic.EntityMissileTest;
|
||||
import com.hbm.entity.logic.EntityNukeExplosion;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionAdvanced;
|
||||
@ -791,6 +792,7 @@ public class MainRegistry
|
||||
EntityRegistry.registerModEntity(EntityBomber.class, "entity_bomber", 108, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityBombletZeta.class, "entity_zeta", 109, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityOrangeFX.class, "entity_agent_orange", 110, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityDeathBlast.class, "entity_laser_blast", 111, this, 1000, 1, true);
|
||||
|
||||
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
||||
EntityRegistry.registerGlobalEntityID(EntityHunterChopper.class, "entity_mob_hunter_chopper", EntityRegistry.findGlobalUniqueEntityId(), 0x000020, 0x2D2D72);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.packet;
|
||||
|
||||
import com.hbm.entity.logic.EntityDeathBlast;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.saveddata.SatelliteSaveStructure;
|
||||
@ -70,7 +71,13 @@ public class SatLaserPacket implements IMessage {
|
||||
|
||||
int y = p.worldObj.getHeightValue(m.x, m.z);
|
||||
|
||||
ExplosionLarge.explodeFire(p.worldObj, m.x, y, m.z, 50, true, true, true);
|
||||
//ExplosionLarge.explodeFire(p.worldObj, m.x, y, m.z, 50, true, true, true);
|
||||
EntityDeathBlast blast = new EntityDeathBlast(p.worldObj);
|
||||
blast.posX = m.x;
|
||||
blast.posY = y;
|
||||
blast.posZ = m.z;
|
||||
|
||||
p.worldObj.spawnEntityInWorld(blast);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
120
com/hbm/render/entity/RenderDeathBlast.java
Normal file
120
com/hbm/render/entity/RenderDeathBlast.java
Normal file
@ -0,0 +1,120 @@
|
||||
package com.hbm.render.entity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
|
||||
import com.hbm.entity.logic.EntityDeathBlast;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
public class RenderDeathBlast extends Render {
|
||||
|
||||
private static final IModelCustom sphere = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/Sphere.obj"));
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glRotatef((entity.ticksExisted % 360) * 10, 0, 1, 0);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
//GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
GL11.glColor3f(1.0F, 0, 0);
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(0.5D, 0, 0);
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
tessellator.startDrawing(6);
|
||||
tessellator.addVertex(vector.xCoord, 250.0D, vector.zCoord);
|
||||
tessellator.addVertex(vector.xCoord, 0.0D, vector.zCoord);
|
||||
vector.rotateAroundY(45);
|
||||
tessellator.addVertex(vector.xCoord, 0.0D, vector.zCoord);
|
||||
tessellator.addVertex(vector.xCoord, 250.0D, vector.zCoord);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
GL11.glColor3f(1.0F, 0, 1.0F);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
tessellator.startDrawing(6);
|
||||
tessellator.addVertex(vector.xCoord / 2, 250.0D, vector.zCoord / 2);
|
||||
tessellator.addVertex(vector.xCoord / 2, 0.0D, vector.zCoord / 2);
|
||||
vector.rotateAroundY(45);
|
||||
tessellator.addVertex(vector.xCoord / 2, 0.0D, vector.zCoord / 2);
|
||||
tessellator.addVertex(vector.xCoord / 2, 250.0D, vector.zCoord / 2);
|
||||
tessellator.draw();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
renderOrb(entity, x, y, z, p_76986_8_, p_76986_9_);
|
||||
}
|
||||
|
||||
public void renderOrb(Entity entity, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
double scale = 15 - 15D * (((double)entity.ticksExisted) / ((double)EntityDeathBlast.maxAge));
|
||||
double alpha = (((double)entity.ticksExisted) / ((double)EntityDeathBlast.maxAge));
|
||||
|
||||
if(scale < 0)
|
||||
scale = 0;
|
||||
|
||||
GL11.glColor4d(1.0, 0, 1.0, alpha);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
sphere.renderAll();
|
||||
|
||||
GL11.glColor4d(1.0, 0, 0, alpha);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glScaled(1.5, 1.5, 1.5);
|
||||
sphere.renderAll();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glColor4d(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user