Skip to content

Commit

Permalink
Changed taint, made radiaition more meaningful, bat fix, tempfolder lore
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Jul 8, 2018
1 parent d2f8ad6 commit 27fd496
Show file tree
Hide file tree
Showing 24 changed files with 299 additions and 164 deletions.
2 changes: 1 addition & 1 deletion com/hbm/blocks/generic/BlockCrate.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer p
{
dropItems(world, x, y, z);
world.setBlockToAir(x, y, z);
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 1.0F, 1.0F);
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
return true;
} else {
if(world.isRemote)
Expand Down
87 changes: 7 additions & 80 deletions com/hbm/blocks/generic/BlockOre.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.PotionEffectRadiation;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
Expand Down Expand Up @@ -190,96 +191,22 @@ public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_,
if (entity instanceof EntityLivingBase && this == ModBlocks.block_trinitite)
{
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
{
/*Library.damageSuit(((EntityPlayer)entity), 0);
Library.damageSuit(((EntityPlayer)entity), 1);
Library.damageSuit(((EntityPlayer)entity), 2);
Library.damageSuit(((EntityPlayer)entity), 3);*/

} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 30 * 20, 2));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 5 * 20, 0));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 15 * 20, 0));
entity.attackEntityFrom(ModDamageSource.radiation, 0.5F);
{ } else {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 45 * 20, 20));
}
}
if (entity instanceof EntityLivingBase && this == ModBlocks.block_waste)
{
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
{
/*Library.damageSuit(((EntityPlayer)entity), 0);
Library.damageSuit(((EntityPlayer)entity), 1);
Library.damageSuit(((EntityPlayer)entity), 2);
Library.damageSuit(((EntityPlayer)entity), 3);*/

} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(entity instanceof EntityCow) {
EntityMooshroom creep = new EntityMooshroom(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
//creep.setRotationYawHead(((EntityCow)entity).rotationYawHead);
if(!entity.isDead)
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 60 * 20, 2));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 30 * 20, 1));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.wither.id, 10 * 20, 0));
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.confusion.id, 20 * 20, 0));
entity.attackEntityFrom(ModDamageSource.radiation, 2.5F);
{ } else {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 60 * 20, 20));
}
}
if (entity instanceof EntityLivingBase && (this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red))
{
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
{
/*Library.damageSuit(((EntityPlayer)entity), 0);
Library.damageSuit(((EntityPlayer)entity), 1);
Library.damageSuit(((EntityPlayer)entity), 2);
Library.damageSuit(((EntityPlayer)entity), 3);*/

} else if(entity instanceof EntityCreeper) {
EntityNuclearCreeper creep = new EntityNuclearCreeper(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
//creep.setRotationYawHead(((EntityCreeper)entity).rotationYawHead);
if(!entity.isDead)
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
entity.setDead();
} else if(entity instanceof EntityVillager) {
EntityZombie creep = new EntityZombie(p_149724_1_);
creep.setLocationAndAngles(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch);
entity.setDead();
if(!p_149724_1_.isRemote)
p_149724_1_.spawnEntityInWorld(creep);
} else if(!(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie)) {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 5 * 20, 1));
{ } else {
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 30 * 20, 10));
}
}

Expand Down
9 changes: 8 additions & 1 deletion com/hbm/entity/effect/EntityFalloutRain.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public void onUpdate() {

int count = (int)(Math.pow(getScale(), 2) * Math.PI / 500);

if(count > 50)
count = 50;

int maxEff = 15;
int currEff = 0;

for(int i = 0; i < count; i++) {
int x = (int) (posX + rand.nextInt((int) ((getScale() + 1) * 2)) - getScale());
int z = (int) (posZ + rand.nextInt((int) ((getScale() + 1) * 2)) - getScale());
Expand All @@ -49,8 +55,9 @@ public void onUpdate() {

if(dist <= getScale()) {

if(rand.nextInt(50) == 0) {
if(currEff < maxEff && rand.nextInt(30) == 0) {
NukeEnvironmentalEffect.applyStandardAOE(worldObj, x, y, z, 5, 3);
currEff++;

} else if(worldObj.getBlock(x, y, z) == Blocks.grass) {
worldObj.setBlock(x, y, z, ModBlocks.waste_earth);
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/entity/logic/EntityNukeExplosionMK4.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void onUpdate() {
explosion.processTip(1024);
} else if(fallout) {

EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.length * 1.8) * 10);
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.length * 1.8) * 25);
fallout.posX = this.posX;
fallout.posY = this.posY;
fallout.posZ = this.posZ;
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/explosion/ExplosionNukeGeneric.java
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public static boolean dedify(World world, int x, int y, int z, int radius) {

if (!(entity instanceof EntityPlayerMP
&& ((EntityPlayerMP) entity).theItemInWorldManager.getGameType() == GameType.CREATIVE)) {
entity.attackEntityFrom(ModDamageSource.blackhole, 10000F);
entity.attackEntityFrom(ModDamageSource.blackhole, 1000F);
}

if(!(entity instanceof EntityLivingBase) && !(entity instanceof EntityPlayerMP) && !(entity instanceof EntityBlackHole)) {
Expand Down
3 changes: 3 additions & 0 deletions com/hbm/explosion/NukeEnvironmentalEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public static void applyStandardEffect(World world, int x, int y, int z) {

} else if(in == Blocks.clay) {
b = Blocks.hardened_clay;
} else if(in.getMaterial().getCanBurn()) {
b = Blocks.fire;
chance = 100;
}

if(b != null && rand.nextInt(1000) < chance)
Expand Down
5 changes: 3 additions & 2 deletions com/hbm/items/special/ItemBattery.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ public static ItemStack getFullBattery(Item item) {

public static void updateDamage(ItemStack stack) {

if(!stack.hasTagCompound())
stack.stackTagCompound = new NBTTagCompound();
if(!stack.hasTagCompound()) {
stack = getFullBattery(stack.getItem()).copy();
}

stack.setItemDamage(100 - (int)((double)getCharge(stack) / (double)getMaxChargeStatic(stack) * 100D));
}
Expand Down
32 changes: 32 additions & 0 deletions com/hbm/items/special/ItemBlades.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
package com.hbm.items.special;

import java.util.List;

import com.hbm.items.ModItems;
import com.hbm.items.tool.ItemCassette;
import com.hbm.items.tool.ItemCassette.TrackType;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class ItemBlades extends Item {

public ItemBlades(int dura)
{
this.setMaxDamage(dura);
}

@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool)
{
if(this == ModItems.stamp_iron_circuit ||
this == ModItems.stamp_iron_plate ||
this == ModItems.stamp_iron_wire ||
this == ModItems.stamp_obsidian_circuit ||
this == ModItems.stamp_obsidian_plate ||
this == ModItems.stamp_obsidian_wire ||
this == ModItems.stamp_schrabidium_circuit ||
this == ModItems.stamp_schrabidium_plate ||
this == ModItems.stamp_schrabidium_wire ||
this == ModItems.stamp_steel_circuit ||
this == ModItems.stamp_steel_plate ||
this == ModItems.stamp_steel_wire ||
this == ModItems.stamp_titanium_circuit ||
this == ModItems.stamp_titanium_plate ||
this == ModItems.stamp_titanium_wire ||
this == ModItems.stamp_stone_circuit ||
this == ModItems.stamp_stone_plate ||
this == ModItems.stamp_stone_wire)
list.add("[CREATED USING TEMPLATE FOLDER]");
}

}
43 changes: 18 additions & 25 deletions com/hbm/items/special/ItemRadioactive.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.PotionEffectRadiation;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
Expand Down Expand Up @@ -43,9 +44,7 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.pellet_mes ||
this == ModItems.pellet_neptunium ||
this == ModItems.pellet_schrabidium) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 120 * 20, 4));
living.addPotionEffect(new PotionEffect(Potion.wither.id, 30 * 20, 2));
living.attackEntityFrom(ModDamageSource.radiation, 15);
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 80 * 20, 25));
}

//Strong
Expand Down Expand Up @@ -79,9 +78,7 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.gadget_core ||
this == ModItems.man_core ||
this == ModItems.nuclear_waste) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 45 * 20, 4));
living.addPotionEffect(new PotionEffect(Potion.wither.id, 5 * 20, 2));
living.attackEntityFrom(ModDamageSource.radiation, 3);
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 60 * 20, 20));
}

//Strong Nuggets
Expand All @@ -101,9 +98,7 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.rod_uranium_fuel_depleted ||
this == ModItems.rod_plutonium_fuel_depleted ||
this == ModItems.rod_mox_fuel_depleted) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 35 * 20, 4));
living.addPotionEffect(new PotionEffect(Potion.wither.id, 1 * 20, 2));
living.attackEntityFrom(ModDamageSource.radiation, 1);
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 45 * 20, 20));
}

//Medium
Expand All @@ -121,8 +116,7 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.mike_core ||
this == ModItems.tsar_core ||
this == ModItems.trinitite) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 25 * 20, 4));
living.attackEntityFrom(ModDamageSource.radiation, 1);
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 30 * 20, 15));
}

//Medium Nuggets
Expand All @@ -134,7 +128,7 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.rod_pu238 ||
this == ModItems.rod_plutonium ||
this == ModItems.pellet_rtg_weak) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 15 * 20, 2));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 20 * 20, 15));
}

//Weak
Expand All @@ -147,7 +141,7 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.rod_dual_u238 ||
this == ModItems.rod_quad_pu238 ||
this == ModItems.rod_dual_pu238) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 15 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 20 * 20, 5));
}

//Weak Nuggets
Expand All @@ -161,20 +155,19 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.rod_dual_tritium ||
this == ModItems.rod_quad_tritium ||
this == ModItems.powder_yellowcake) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 5 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 10 * 20, 5));
}

//Powder

if (this == ModItems.powder_neptunium ||
this == ModItems.powder_plutonium) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 25 * 20, 4));
living.attackEntityFrom(ModDamageSource.radiation, 1);
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 60 * 20, 20));
living.setFire(5);
}

if (this == ModItems.powder_uranium) {
living.addPotionEffect(new PotionEffect(Potion.poison.id, 15 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 20 * 20, 5));
living.setFire(5);
}

Expand All @@ -197,28 +190,28 @@ public void doRadiationDamage(Entity entity) {
this == ModItems.rod_schrabidium_fuel ||
this == ModItems.rod_dual_schrabidium_fuel ||
this == ModItems.rod_quad_schrabidium_fuel) {
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 2 * 60 * 20, 0));
living.attackEntityFrom(ModDamageSource.radiation, 30);
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 100 * 20, 30));
}

if (this == ModItems.nugget_schrabidium ||
this == ModItems.nugget_solinium ||
this == ModItems.nugget_schrabidium_fuel ||
this == ModItems.nugget_hes ||
this == ModItems.nugget_les) {
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 2 * 60 * 20, 0));
living.attackEntityFrom(ModDamageSource.radiation, 10);
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 75 * 20, 30));
}

if (this == ModItems.plate_schrabidium ||
this == ModItems.wire_schrabidium) {
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 2 * 60 * 20, 0));
living.attackEntityFrom(ModDamageSource.radiation, 15);
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 80 * 20, 30));
}

if (this == ModItems.powder_schrabidium) {
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 2 * 60 * 20, 0));
living.attackEntityFrom(ModDamageSource.radiation, 30);
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
living.addPotionEffect(new PotionEffect(PotionEffectRadiation.instance.id, 100 * 20, 30));
living.setFire(5);
}
}
Expand Down
3 changes: 3 additions & 0 deletions com/hbm/items/tool/ItemAssemblyTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,9 @@ public void addInformation(ItemStack stack, EntityPlayer player, List list, bool
List<ItemStack> stacks = MachineRecipes.getRecipeFromTempate(stack);
ItemStack out = MachineRecipes.getOutputFromTempate(stack);

list.add("[CREATED USING TEMPLATE FOLDER]");
list.add("");

try {
list.add("Output:");
list.add(out.stackSize + "x " + out.getDisplayName());
Expand Down
3 changes: 3 additions & 0 deletions com/hbm/items/tool/ItemCassette.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public void addInformation(ItemStack stack, EntityPlayer player, List list, bool

if(!(stack.getItem() instanceof ItemCassette))
return;

list.add("[CREATED USING TEMPLATE FOLDER]");
list.add("");

list.add("Siren sound cassette:");
list.add(" Name: " + TrackType.getEnum(stack.getItemDamage()).getTrackTitle());
Expand Down
Loading

0 comments on commit 27fd496

Please sign in to comment.