mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
new satellite designator, cancer medication, funny darts
This commit is contained in:
parent
22dca2d355
commit
cf9f837c20
@ -112,6 +112,7 @@ public class ConsumableRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.pill_iodine, 8), new Object[] { "IF", 'I', ModItems.powder_iodine, 'F', ModItems.fluorite });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.plan_c, 1), new Object[] { "PFP", 'P', ModItems.powder_poison, 'F', ModItems.fluorite });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.radx, 1), new Object[] { "P", "F", 'P', ModItems.powder_coal, 'F', ModItems.fluorite });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.siox, 8), new Object[] { "PNF", 'P', ModItems.powder_coal, 'F', ModItems.powder_asbestos, 'N', ModItems.nugget_bismuth });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.xanax, 1), new Object[] { ModItems.powder_coal, ModItems.niter, ModItems.powder_bromine });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.fmn, 1), new Object[] { ModItems.powder_coal, ModItems.powder_polonium, ModItems.powder_strontium });
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.five_htp, 1), new Object[] { ModItems.powder_coal, ModItems.powder_euphemium, ModItems.canteen_fab });
|
||||
|
||||
@ -50,10 +50,6 @@ public class ExplosionNukeSmall {
|
||||
ExplosionNukeGeneric.dealDamage(world, posX, posY, posZ, 45); break;
|
||||
|
||||
case 3: new ExplosionNT(world, null, posX, posY, posZ, 20F).addAllAttrib(ExplosionNT.nukeAttribs).overrideResolution(64).explode();
|
||||
/*new ExplosionNT(world, null, posX + 7, posY, posZ, 10F).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(world, null, posX - 7, posY, posZ, 10F).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(world, null, posX, posY, posZ + 7, 10F).addAllAttrib(ExplosionNT.nukeAttribs).explode();
|
||||
new ExplosionNT(world, null, posX, posY, posZ - 7, 10F).addAllAttrib(ExplosionNT.nukeAttribs).explode();*/
|
||||
ExplosionNukeGeneric.dealDamage(world, posX, posY, posZ, 55); break;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.extprop;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
@ -32,6 +34,8 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
private int asbestos;
|
||||
private float radEnv;
|
||||
private float radBuf;
|
||||
private int bombTimer;
|
||||
private List<ContaminationEffect> contamination = new ArrayList();
|
||||
|
||||
public HbmLivingProps(EntityLivingBase entity) {
|
||||
this.entity = entity;
|
||||
@ -89,6 +93,15 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
getData(entity).radBuf = rad;
|
||||
}
|
||||
|
||||
/// CONTAMINATION ///
|
||||
public static List<ContaminationEffect> getCont(EntityLivingBase entity) {
|
||||
return getData(entity).contamination;
|
||||
}
|
||||
|
||||
public static void addCont(EntityLivingBase entity, ContaminationEffect cont) {
|
||||
getData(entity).contamination.add(cont);
|
||||
}
|
||||
|
||||
/// DIGAMA ///
|
||||
public static float getDigamma(EntityLivingBase entity) {
|
||||
return getData(entity).digamma;
|
||||
@ -160,7 +173,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
public static void setAsbestos(EntityLivingBase entity, int asbestos) {
|
||||
getData(entity).asbestos = asbestos;
|
||||
|
||||
if(asbestos >= 30 * 60 * 20) {
|
||||
if(asbestos >= 60 * 60 * 20) {
|
||||
getData(entity).asbestos = 0;
|
||||
entity.attackEntityFrom(ModDamageSource.asbestos, 1000);
|
||||
}
|
||||
@ -169,6 +182,15 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
public static void incrementAsbestos(EntityLivingBase entity, int asbestos) {
|
||||
setAsbestos(entity, getAsbestos(entity) + asbestos);
|
||||
}
|
||||
|
||||
/// TIME BOMB ///
|
||||
public static int getTimer(EntityLivingBase entity) {
|
||||
return getData(entity).bombTimer;
|
||||
}
|
||||
|
||||
public static void setTimer(EntityLivingBase entity, int bombTimer) {
|
||||
getData(entity).bombTimer = bombTimer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Entity entity, World world) { }
|
||||
@ -181,6 +203,13 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
props.setFloat("hfr_radiation", radiation);
|
||||
props.setFloat("hfr_digamma", digamma);
|
||||
props.setInteger("hfr_asbestos", asbestos);
|
||||
props.setInteger("hfr_bomb", bombTimer);
|
||||
|
||||
props.setInteger("hfr_cont_count", this.contamination.size());
|
||||
|
||||
for(int i = 0; i < this.contamination.size(); i++) {
|
||||
this.contamination.get(i).save(props, i);
|
||||
}
|
||||
|
||||
nbt.setTag("HbmLivingProps", props);
|
||||
}
|
||||
@ -194,6 +223,13 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
radiation = props.getFloat("hfr_radiation");
|
||||
digamma = props.getFloat("hfr_digamma");
|
||||
asbestos = props.getInteger("hfr_asbestos");
|
||||
bombTimer = props.getInteger("hfr_bomb");
|
||||
|
||||
int cont = props.getInteger("hfr_cont_count");
|
||||
|
||||
for(int i = 0; i < cont; i++) {
|
||||
this.contamination.add(ContaminationEffect.load(props, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,5 +249,26 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
public float getRad() {
|
||||
return maxRad * ((float)time / (float)maxTime);
|
||||
}
|
||||
|
||||
public void save(NBTTagCompound nbt, int index) {
|
||||
NBTTagCompound me = new NBTTagCompound();
|
||||
me.setFloat("maxRad", this.maxRad);
|
||||
me.setInteger("maxTime", this.maxTime);
|
||||
me.setInteger("time", this.time);
|
||||
me.setBoolean("ignoreArmor", ignoreArmor);
|
||||
nbt.setTag("cont_" + index, me);
|
||||
}
|
||||
|
||||
public static ContaminationEffect load(NBTTagCompound nbt, int index) {
|
||||
NBTTagCompound me = (NBTTagCompound) nbt.getTag("cont_" + index);
|
||||
float maxRad = me.getFloat("maxRad");
|
||||
int maxTime = nbt.getInteger("maxTime");
|
||||
int time = nbt.getInteger("time");
|
||||
boolean ignoreArmor = nbt.getBoolean("ignoreArmor");
|
||||
|
||||
ContaminationEffect effect = new ContaminationEffect(maxRad, maxTime, ignoreArmor);
|
||||
effect.time = time;
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,6 +164,8 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_titanium, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_tungsten, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_cobalt, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_tantalium, 64), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_bismuth, 16), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_schrabidium, 16), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_euphemium, 8), Requirement.STEEL, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_dineutronium, 1), Requirement.STEEL, 16));
|
||||
@ -192,6 +194,9 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModBlocks.crate_can, 1), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModBlocks.crate_ammo, 1), Requirement.STEEL, 2));
|
||||
special.add(new Offer(new ItemStack(ModItems.crucible, 1, 3), Requirement.STEEL, 10));
|
||||
special.add(new Offer(new ItemStack(ModItems.spawn_chopper, 1), Requirement.STEEL, 10));
|
||||
special.add(new Offer(new ItemStack(ModItems.spawn_worm, 1), Requirement.STEEL, 10));
|
||||
special.add(new Offer(new ItemStack(ModItems.spawn_ufo, 1), Requirement.STEEL, 10));
|
||||
special.add(new Offer(new ItemStack(ModItems.sat_laser, 1), Requirement.HIDDEN, 8));
|
||||
special.add(new Offer(new ItemStack(ModItems.sat_gerald, 1), Requirement.HIDDEN, 32));
|
||||
special.add(new Offer(new ItemStack(ModItems.billet_yharonite, 4), Requirement.HIDDEN, 16));
|
||||
|
||||
@ -165,6 +165,7 @@ public class BulletConfigSyncingUtil {
|
||||
public static int B75_HE = i++;
|
||||
|
||||
public static int NEEDLE_GPS = i++;
|
||||
public static int NEEDLE_NUKE = i++;
|
||||
public static int DART_NORMAL = i++;
|
||||
|
||||
public static int G20_NORMAL_FIRE = i++;
|
||||
@ -398,6 +399,7 @@ public class BulletConfigSyncingUtil {
|
||||
configSet.put(B75_HE, Gun75BoltFactory.get75BoltHEConfig());
|
||||
|
||||
configSet.put(NEEDLE_GPS, GunDartFactory.getGPSConfig());
|
||||
configSet.put(NEEDLE_NUKE, GunDartFactory.getNukeConfig());
|
||||
configSet.put(DART_NORMAL, GunDartFactory.getNERFConfig());
|
||||
|
||||
configSet.put(G20_NORMAL_FIRE, Gun20GaugeFactory.get20GaugeConfig().setToFire(3));
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.handler;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
@ -38,12 +39,22 @@ public class EntityEffectHandler {
|
||||
HbmLivingProps.setRadEnv(entity, 0);
|
||||
}
|
||||
|
||||
|
||||
if(entity instanceof EntityPlayerMP) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
HbmLivingProps props = HbmLivingProps.getData(entity);
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
props.saveNBTData(data);
|
||||
PacketDispatcher.wrapper.sendTo(new ExtPropPacket(data), (EntityPlayerMP) entity);
|
||||
}
|
||||
|
||||
int timer = HbmLivingProps.getTimer(entity);
|
||||
if(timer > 0) {
|
||||
HbmLivingProps.setTimer(entity, timer - 1);
|
||||
|
||||
if(timer == 1) {
|
||||
ExplosionNukeSmall.explode(entity.worldObj, entity.posX, entity.posY, entity.posZ, ExplosionNukeSmall.medium);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleRadiation(entity);
|
||||
|
||||
@ -3,15 +3,18 @@ package com.hbm.handler.guncfg;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.interfaces.IBulletHurtBehavior;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGunDart;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
@ -44,6 +47,7 @@ public class GunDartFactory {
|
||||
|
||||
config.config = new ArrayList();
|
||||
config.config.add(BulletConfigSyncingUtil.NEEDLE_GPS);
|
||||
config.config.add(BulletConfigSyncingUtil.NEEDLE_NUKE);
|
||||
|
||||
return config;
|
||||
}
|
||||
@ -74,6 +78,7 @@ public class GunDartFactory {
|
||||
|
||||
config.config = new ArrayList();
|
||||
config.config.add(BulletConfigSyncingUtil.DART_NORMAL);
|
||||
config.config.add(BulletConfigSyncingUtil.NEEDLE_NUKE);
|
||||
|
||||
return config;
|
||||
}
|
||||
@ -124,6 +129,43 @@ public class GunDartFactory {
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNukeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
bullet.ammo = ModItems.ammo_dart_nuclear;
|
||||
bullet.velocity = 5.0F;
|
||||
bullet.spread = 0;
|
||||
bullet.dmgMin = 1;
|
||||
bullet.dmgMax = 2;
|
||||
bullet.doesRicochet = true;
|
||||
bullet.doesPenetrate = false;
|
||||
bullet.style = bullet.STYLE_FLECHETTE;
|
||||
bullet.leadChance = 0;
|
||||
|
||||
bullet.bHurt = new IBulletHurtBehavior() {
|
||||
|
||||
@Override
|
||||
public void behaveEntityHurt(EntityBulletBase bullet, Entity hit) {
|
||||
|
||||
if(bullet.worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if(hit instanceof EntityLivingBase) {
|
||||
|
||||
EntityLivingBase e = (EntityLivingBase) hit;
|
||||
|
||||
if(HbmLivingProps.getRadiation(e) < 250)
|
||||
HbmLivingProps.setRadiation(e, 250);
|
||||
if(HbmLivingProps.getTimer(e) <= 0)
|
||||
HbmLivingProps.setTimer(e, MainRegistry.polaroidID * 60 * 20);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public static BulletConfiguration getNERFConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
|
||||
|
||||
@ -296,18 +296,16 @@ public class AnvilRecipes {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.circuit_raw),
|
||||
new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_steel, 2)),
|
||||
new AnvilOutput(new ItemStack(ModItems.wire_aluminium, 4)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_steel, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.wire_aluminium, 1)),
|
||||
new AnvilOutput(new ItemStack(Items.redstone, 1))
|
||||
}
|
||||
).setTier(1));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new ComparableStack(ModItems.circuit_aluminium),
|
||||
new AnvilOutput[] {
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_steel, 2)),
|
||||
new AnvilOutput(new ItemStack(ModItems.wire_aluminium, 2)),
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_steel, 1)),
|
||||
new AnvilOutput(new ItemStack(ModItems.wire_aluminium, 1), 0.5F),
|
||||
new AnvilOutput(new ItemStack(ModItems.wire_aluminium, 1), 0.25F),
|
||||
new AnvilOutput(new ItemStack(Items.redstone, 1), 0.25F)
|
||||
}
|
||||
).setTier(1));
|
||||
|
||||
@ -89,6 +89,11 @@ public class MagicRecipes {
|
||||
new OreDictStack("plateSteel"),
|
||||
new ComparableStack(ModItems.ingot_polymer),
|
||||
new OreDictStack("plateGold")));
|
||||
|
||||
recipes.add(new MagicRecipe(new ItemStack(ModItems.ammo_dart_nuclear, 4),
|
||||
new ComparableStack(ModItems.plate_polymer),
|
||||
new ComparableStack(ModItems.nugget_pu239),
|
||||
new ComparableStack(ModItems.circuit_aluminium)));
|
||||
}
|
||||
|
||||
public static List<MagicRecipe> getRecipes() {
|
||||
|
||||
@ -91,8 +91,7 @@ public class GUIRBMKConsole extends GuiScreen {
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 61, guiTop + 70, 10, 10, mouseX, mouseY, new String[]{ "Select all control rods" } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 72, guiTop + 70, 10, 10, mouseX, mouseY, new String[]{ "Deselect all" } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 6, guiTop + 8, 76, 60, mouseX, mouseY, new String[]{ "ignore all this for now" } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 6, guiTop + 96, 76, 38, mouseX, mouseY, new String[]{ "and this too" } );
|
||||
|
||||
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 6, guiTop + 70, 10, 10, mouseX, mouseY, new String[]{ "Select red group" } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 17, guiTop + 70, 10, 10, mouseX, mouseY, new String[]{ "Select yellow group" } );
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 28, guiTop + 70, 10, 10, mouseX, mouseY, new String[]{ "Select green group" } );
|
||||
|
||||
@ -799,6 +799,7 @@ public class ModItems {
|
||||
public static Item radaway_strong;
|
||||
public static Item radaway_flush;
|
||||
public static Item radx;
|
||||
public static Item siox;
|
||||
public static Item xanax;
|
||||
public static Item fmn;
|
||||
public static Item five_htp;
|
||||
@ -1340,6 +1341,7 @@ public class ModItems {
|
||||
public static Item sat_chip;
|
||||
public static Item sat_interface;
|
||||
public static Item sat_coord;
|
||||
public static Item sat_designator;
|
||||
|
||||
public static Item ammo_12gauge;
|
||||
public static Item ammo_12gauge_incendiary;
|
||||
@ -1484,6 +1486,7 @@ public class ModItems {
|
||||
public static Item ammo_fireext_sand;
|
||||
public static Item ammo_cell;
|
||||
public static Item ammo_dart;
|
||||
public static Item ammo_dart_nuclear;
|
||||
public static Item ammo_dart_nerf;
|
||||
|
||||
public static Item gun_rpg;
|
||||
@ -3103,6 +3106,7 @@ public class ModItems {
|
||||
radaway_strong = new ItemSyringe().setUnlocalizedName("radaway_strong").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway_strong");
|
||||
radaway_flush = new ItemSyringe().setUnlocalizedName("radaway_flush").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radaway_flush");
|
||||
radx = new ItemPill(0).setUnlocalizedName("radx").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radx");
|
||||
siox = new ItemPill(0).setUnlocalizedName("siox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":siox");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2");
|
||||
fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet");
|
||||
five_htp = new ItemPill(0).setUnlocalizedName("five_htp").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":5htp");
|
||||
@ -3697,6 +3701,7 @@ public class ModItems {
|
||||
sat_chip = new ItemSatChip().setUnlocalizedName("sat_chip").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_chip");
|
||||
sat_interface = new ItemSatInterface().setUnlocalizedName("sat_interface").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_interface");
|
||||
sat_coord = new ItemSatInterface().setUnlocalizedName("sat_coord").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_coord");
|
||||
sat_designator = new ItemSatDesignator().setUnlocalizedName("sat_designator").setFull3D().setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_designator");
|
||||
|
||||
mp_thruster_10_kerosene = new ItemMissile().makeThruster(FuelType.KEROSENE, 1F, 1.5F, PartSize.SIZE_10).setHealth(10F) .setUnlocalizedName("mp_thruster_10_kerosene");
|
||||
mp_thruster_10_kerosene_tec = new ItemMissile().makeThruster(FuelType.KEROSENE, 1F, 1.5F, PartSize.SIZE_10).setHealth(15F).setRarity(Rarity.COMMON).setUnlocalizedName("mp_thruster_10_kerosene_tec");
|
||||
@ -3990,6 +3995,7 @@ public class ModItems {
|
||||
ammo_fireext_sand = new ItemAmmo().setUnlocalizedName("ammo_fireext_sand").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":ammo_fireext_sand");
|
||||
ammo_cell = new ItemAmmo().setUnlocalizedName("ammo_cell").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_cell");
|
||||
ammo_dart = new ItemAmmo().setUnlocalizedName("ammo_dart").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_dart");
|
||||
ammo_dart_nuclear = new ItemAmmo().setUnlocalizedName("ammo_dart_nuclear").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_dart_nuclear");
|
||||
ammo_dart_nerf = new ItemAmmo().setUnlocalizedName("ammo_dart_nerf").setCreativeTab(MainRegistry.weaponTab).setMaxStackSize(16).setTextureName(RefStrings.MODID + ":ammo_dart_nerf");
|
||||
|
||||
gun_rpg = new ItemGunBase(GunRocketFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
|
||||
@ -6620,6 +6626,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(sat_chip, sat_chip.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_interface, sat_interface.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_coord, sat_coord.getUnlocalizedName());
|
||||
GameRegistry.registerItem(sat_designator, sat_designator.getUnlocalizedName());
|
||||
|
||||
//Guns
|
||||
GameRegistry.registerItem(gun_revolver_iron, gun_revolver_iron.getUnlocalizedName());
|
||||
@ -6837,6 +6844,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_fireext_sand, ammo_fireext_sand.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_cell, ammo_cell.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_dart, ammo_dart.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_dart_nuclear, ammo_dart_nuclear.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_dart_nerf, ammo_dart_nerf.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket, ammo_rocket.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_rocket_he, ammo_rocket_he.getUnlocalizedName());
|
||||
@ -7105,6 +7113,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(radaway_strong, radaway_strong.getUnlocalizedName());
|
||||
GameRegistry.registerItem(radaway_flush, radaway_flush.getUnlocalizedName());
|
||||
GameRegistry.registerItem(radx, radx.getUnlocalizedName());
|
||||
GameRegistry.registerItem(siox, siox.getUnlocalizedName());
|
||||
GameRegistry.registerItem(pill_iodine, pill_iodine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(xanax, xanax.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fmn, fmn.getUnlocalizedName());
|
||||
|
||||
@ -51,6 +51,10 @@ public class ItemPill extends ItemFood {
|
||||
if(this == ModItems.radx) {
|
||||
player.addPotionEffect(new PotionEffect(HbmPotion.radx.id, 3 * 60 * 20, 0));
|
||||
}
|
||||
|
||||
if(this == ModItems.siox) {
|
||||
HbmLivingProps.setAsbestos(player, 0);
|
||||
}
|
||||
|
||||
if(this == ModItems.xanax) {
|
||||
float digamma = HbmLivingProps.getDigamma(player);
|
||||
@ -81,6 +85,9 @@ public class ItemPill extends ItemFood {
|
||||
if(this == ModItems.radx) {
|
||||
list.add("Increases radiation resistance by 0.2 (37%) for 3 minutes");
|
||||
}
|
||||
if(this == ModItems.siox) {
|
||||
list.add("Reverses mesothelioma with the power of Asbestos!");
|
||||
}
|
||||
if(this == ModItems.xanax) {
|
||||
list.add("Removes 500mDRX");
|
||||
}
|
||||
|
||||
46
src/main/java/com/hbm/items/tool/ItemSatDesignator.java
Normal file
46
src/main/java/com/hbm/items/tool/ItemSatDesignator.java
Normal file
@ -0,0 +1,46 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.blocks.bomb.LaunchPad;
|
||||
import com.hbm.items.machine.ItemSatChip;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.saveddata.SatelliteSavedData;
|
||||
import com.hbm.saveddata.satellites.Satellite;
|
||||
import com.hbm.saveddata.satellites.Satellite.Interfaces;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ItemSatDesignator extends ItemSatChip {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
|
||||
Satellite sat = SatelliteSavedData.getData(world).getSatFromFreq(this.getFreq(stack));
|
||||
|
||||
if(sat != null) {
|
||||
MovingObjectPosition pos = Library.rayTrace(player, 300, 1);
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(pos.sideHit);
|
||||
int x = pos.blockX + dir.offsetX;
|
||||
int y = pos.blockY + dir.offsetY;
|
||||
int z = pos.blockZ + dir.offsetZ;
|
||||
|
||||
if(sat.satIface == Interfaces.SAT_COORD) {
|
||||
sat.onCoordAction(world, player, x, y, z);
|
||||
} else if(sat.satIface == Interfaces.SAT_PANEL) {
|
||||
sat.onClick(world, x, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
}
|
||||
@ -46,7 +46,7 @@ public class ItemSatInterface extends ItemSatChip {
|
||||
Satellite sat = SatelliteSavedData.getData(world).getSatFromFreq(this.getFreq(stack));
|
||||
|
||||
if(sat != null && entity.ticksExisted % 2 == 0) {
|
||||
PacketDispatcher.wrapper.sendTo(new SatPanelPacket(sat), (EntityPlayerMP) entity);
|
||||
PacketDispatcher.wrapper.sendTo(new SatPanelPacket(sat), (EntityPlayerMP) entity); //making this one sat that is static might not have been a good idea
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -240,7 +240,7 @@ public class ModEventHandler {
|
||||
event.entity.worldObj.spawnEntityInWorld(foeq);
|
||||
}
|
||||
|
||||
if(event.entity.getUniqueID().toString().equals(Library.HbMinecraft)) {
|
||||
if(event.entity.getUniqueID().toString().equals(Library.HbMinecraft) || event.entity.getCommandSenderName().equals("HbMinecraft")) {
|
||||
event.entity.dropItem(ModItems.book_of_, 1);
|
||||
}
|
||||
|
||||
@ -751,13 +751,11 @@ public class ModEventHandler {
|
||||
|
||||
ArmorUtil.resetFlightTime(player);
|
||||
|
||||
if(!player.isSneaking()) {
|
||||
if(player.fallDistance > 0)
|
||||
player.fallDistance = 0;
|
||||
|
||||
if(player.motionY < -0.4D)
|
||||
player.motionY = -0.4D;
|
||||
}
|
||||
if(player.fallDistance > 0)
|
||||
player.fallDistance = 0;
|
||||
|
||||
if(player.motionY < -0.4D)
|
||||
player.motionY = -0.4D;
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
|
||||
|
||||
@ -83,8 +83,9 @@ public class RenderDeathBlast extends Render {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0);
|
||||
|
||||
double scale = 15 - 15D * (((double)entity.ticksExisted) / ((double)EntityDeathBlast.maxAge));
|
||||
double scale = 10 - 10D * (((double)entity.ticksExisted) / ((double)EntityDeathBlast.maxAge));
|
||||
double alpha = (((double)entity.ticksExisted) / ((double)EntityDeathBlast.maxAge));
|
||||
|
||||
if(scale < 0)
|
||||
@ -97,15 +98,20 @@ public class RenderDeathBlast extends Render {
|
||||
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.glScaled(1.25, 1.25, 1.25);
|
||||
GL11.glColor4d(1.0, 0, 0, alpha * 0.125);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
sphere.renderAll();
|
||||
GL11.glScaled(1.05, 1.05, 1.05);
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
|
||||
GL11.glColor4d(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -26,6 +26,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
private int targetY;
|
||||
private int targetZ;
|
||||
|
||||
public int[] fluxBuffer = new int[20];
|
||||
|
||||
//made this one-dimensional because it's a lot easier to serialize
|
||||
public RBMKColumn[] columns = new RBMKColumn[15 * 15];
|
||||
|
||||
@ -52,6 +54,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
|
||||
private void rescan() {
|
||||
|
||||
double flux = 0;
|
||||
|
||||
for(int i = -7; i <= 7; i++) {
|
||||
for(int j = -7; j <= 7; j++) {
|
||||
|
||||
@ -67,11 +71,22 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
columns[index].data.setDouble("maxHeat", rbmk.maxHeat());
|
||||
if(rbmk.isModerated()) columns[index].data.setBoolean("moderated", true); //false is the default anyway and not setting it when we don't need to reduces cruft
|
||||
|
||||
if(te instanceof TileEntityRBMKRod) {
|
||||
TileEntityRBMKRod fuel = (TileEntityRBMKRod) te;
|
||||
flux += fuel.fluxFast + fuel.fluxSlow;
|
||||
}
|
||||
|
||||
} else {
|
||||
columns[index] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < this.fluxBuffer.length - 1; i++) {
|
||||
this.fluxBuffer[i] = this.fluxBuffer[i + 1];
|
||||
}
|
||||
|
||||
this.fluxBuffer[19] = (int) flux;
|
||||
}
|
||||
|
||||
private void prepareNetworkPack() {
|
||||
@ -86,6 +101,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
}
|
||||
}
|
||||
|
||||
data.setIntArray("flux", this.fluxBuffer);
|
||||
|
||||
this.networkPack(data, 50);
|
||||
}
|
||||
|
||||
@ -100,6 +117,8 @@ public class TileEntityRBMKConsole extends TileEntityMachineBase implements ICon
|
||||
this.columns[i] = new RBMKColumn(ColumnType.values()[data.getShort("type_" + i)], (NBTTagCompound)data.getTag("column_" + i));
|
||||
}
|
||||
}
|
||||
|
||||
this.fluxBuffer = data.getIntArray("flux");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -555,6 +555,7 @@ item.ammo_cell.name=Energiezelle
|
||||
item.ammo_container.name=Munitionsbehälter
|
||||
item.ammo_dart.name=Plastikdart (Withernd)
|
||||
item.ammo_dart_nerf.name=NERF-Dart
|
||||
item.ammo_dart_nuclear.name=Plastikdart (Zeitbombe)
|
||||
item.ammo_dgk.name=Goalkeeper-Zwilling CIWS 200er Gürtel
|
||||
item.ammo_fireext.name=Feuerlöscher-Wassertank
|
||||
item.ammo_fireext_foam.name=Feuerlöscher-Schaumtank
|
||||
@ -2221,6 +2222,7 @@ item.rune_thurisaz.name=Additive Catalyst Matrix
|
||||
item.sat_base.name=Satellitenkörper
|
||||
item.sat_chip.name=Satelliten-ID-Chip
|
||||
item.sat_coord.name=Satelliten-Zielmarkierer
|
||||
item.sat_designator.name=atelliten-Laserzielmarkierer
|
||||
item.sat_foeq.name=PEAF - Mk.I FOEQ Dunasonde mit experimenter nuklearer Schubdüse
|
||||
item.sat_gerald.name=Gerald der Konstruktionsandroid
|
||||
item.sat_head_laser.name=Todesstrahl
|
||||
@ -2269,6 +2271,7 @@ item.singularity.name=Singularität
|
||||
item.singularity_counter_resonant.name=Eingefasste nicht-resonante Singularität
|
||||
item.singularity_spark.name=Spark'sche Singularität
|
||||
item.singularity_super_heated.name=Supererhitzte resonante Singularität
|
||||
item.siox.name=SiOX-Krebsmedikament
|
||||
item.siren_track.name=Sirenentrack
|
||||
item.smashing_hammer.name=Zerschmetterungshammer
|
||||
item.solid_fuel.name=Festbrennstoff
|
||||
|
||||
@ -623,6 +623,7 @@ item.ammo_cell.name=Energy Cell
|
||||
item.ammo_container.name=Ammo Container
|
||||
item.ammo_dart.name=Plastic Dart (Withering)
|
||||
item.ammo_dart_nerf.name=NERF Dart
|
||||
item.ammo_dart_nuclear.name=Plastic Dart (Timed Explosive)
|
||||
item.ammo_dgk.name=Goalkeeper Twin CIWS 200 Round Belt
|
||||
item.ammo_fireext.name=Fire Extinguisher Water Tank
|
||||
item.ammo_fireext_foam.name=Fire Extinguisher Foam Tank
|
||||
@ -2287,6 +2288,7 @@ item.rune_thurisaz.name=Additive Catalyst Matrix
|
||||
item.sat_base.name=Satellite Base
|
||||
item.sat_chip.name=Satellite ID-Chip
|
||||
item.sat_coord.name=Satellite Designator
|
||||
item.sat_designator.name=Satellite Laser Designator
|
||||
item.sat_foeq.name=PEAF - Mk.I FOEQ Duna Probe with experimental Nuclear Propulsion
|
||||
item.sat_gerald.name=Gerald The Construction Android
|
||||
item.sat_head_laser.name=Death Ray
|
||||
@ -2335,6 +2337,7 @@ item.singularity.name=Singularity
|
||||
item.singularity_counter_resonant.name=Contained Counter-Resonant Singularity
|
||||
item.singularity_spark.name=Spark Singularity
|
||||
item.singularity_super_heated.name=Superheated Resonating Singularity
|
||||
item.siox.name=SiOX Cancer Medication
|
||||
item.siren_track.name=Siren Track
|
||||
item.smashing_hammer.name=Smashing Hammer
|
||||
item.solid_fuel.name=Solid Fuel
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 203 B |
BIN
src/main/resources/assets/hbm/textures/items/sat_designator.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/sat_designator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 B |
BIN
src/main/resources/assets/hbm/textures/items/siox.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/siox.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 284 B |
Loading…
x
Reference in New Issue
Block a user