Finished EVERYTHING for the final release, nuka grenade, guide book

This commit is contained in:
HbmMods 2016-02-14 19:55:39 +01:00
parent ba789728d2
commit 0e1732882a
24 changed files with 160 additions and 217 deletions

View File

@ -3,6 +3,9 @@ itemGroup.tabParts=Nuclear Tech Mod Bauteile
itemGroup.tabBlocks=Nuclear Tech Mod Blöcke
itemGroup.tabNuke=Nuclear Tech Mod Bomben
death.attack.nuclearBlast=%1$s wurde von einer Atomexplosion weggeblasen.
death.attack.revolverBullet=%1$s wurde von %2$s in den Kopf geschossen.
item.redstone_sword.name=Redstoneschwert
item.big_sword.name=Großes Schwert
item.test_nuke_igniter.name=Zünder
@ -356,6 +359,7 @@ item.grenade_poison.name=Giftgranate
item.grenade_gas.name=Gasgranate
item.grenade_schrabidium.name=Schrabidiumgranate
item.grenade_nuke.name=Mark VI Bohrgranate
item.grenade_nuclear.name=Nuka-Granate
item.rod_uranium_fuel.name=Urankernbrennstoffzelle
item.rod_dual_uranium_fuel.name=Doppelte Urankernbrennstoffzelle
@ -535,9 +539,9 @@ item.warhead_mirvlet.name=MIRV
item.warhead_mirv.name=Achtfacher MIRV-Sprengkopf
item.warhead_thermo_endo.name=Endothermischer Sprengkopf
item.warhead_thermo_exo.name=Exothermischer Sprengkopf
item.fuel_tank_small.name=Kleiner Triebstofftank
item.fuel_tank_medium.name=Mittlerer Triebstofftank
item.fuel_tank_large.name=Großer Triebstofftank
item.fuel_tank_small.name=Kleiner Treibstofftank
item.fuel_tank_medium.name=Mittlerer Treibstofftank
item.fuel_tank_large.name=Großer Treibstofftank
item.thruster_small.name=Kleines Raketentriebwerk
item.thruster_medium.name=Mittleres Raketentriebwerk
item.thruster_large.name=Großes Raketentriebwerk

View File

@ -3,6 +3,9 @@ itemGroup.tabParts=Nuclear Tech Mod Parts
itemGroup.tabBlocks=Nuclear Tech Mod Blocks
itemGroup.tabNuke=Nuclear Tech Mod Nukes
death.attack.nuclearBlast=%1$s was blown away by a nuclear explosion.
death.attack.revolverBullet=%1$s was shot in the head by %2$s.
item.redstone_sword.name=Redstone Sword
item.big_sword.name=Great Sword
item.test_nuke_igniter.name=Igniter
@ -357,6 +360,7 @@ item.grenade_poison.name=Poison Grenade
item.grenade_gas.name=Gas Grenade
item.grenade_schrabidium.name=Schrabidium Grenade
item.grenade_nuke.name=Mark VI Drill Grenade
item.grenade_nuclear.name=Nuka Grenade
item.rod_uranium_fuel.name=Uranium Fuel Rod
item.rod_dual_uranium_fuel.name=Uranium Dual Fuel Rod

View File

@ -1 +1,2 @@
äÄöÖüÜß
[ʃɾɐbidiʊɱ]
(I think that's how "Schrabidium" is pronounced)

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

View File

@ -168,6 +168,8 @@ public class Guide extends Block {
pages1.appendTag(new NBTTagString(Library.book112));
pages1.appendTag(new NBTTagString(Library.book113));
pages1.appendTag(new NBTTagString(Library.book114));
pages1.appendTag(new NBTTagString(Library.book115));
pages1.appendTag(new NBTTagString(Library.book116));
book1.stackTagCompound.setTag("pages", pages1);
player.inventory.addItemStackToInventory(book1);
@ -189,6 +191,8 @@ public class Guide extends Block {
pages2.appendTag(new NBTTagString(Library.book211));
pages2.appendTag(new NBTTagString(Library.book212));
pages2.appendTag(new NBTTagString(Library.book213));
pages2.appendTag(new NBTTagString(Library.book214));
pages2.appendTag(new NBTTagString(Library.book215));
book2.stackTagCompound.setTag("pages", pages2);
player.inventory.addItemStackToInventory(book2);
@ -242,7 +246,11 @@ public class Guide extends Block {
book5.stackTagCompound.setString("author", "HbMinecraft");
book5.stackTagCompound.setString("title", "Hbm's Nuclear Tech Mod Part 5: Misc");
NBTTagList pages5 = new NBTTagList();
pages5.appendTag(new NBTTagString(Library.book41));
pages5.appendTag(new NBTTagString(Library.book51));
pages5.appendTag(new NBTTagString(Library.book52));
pages5.appendTag(new NBTTagString(Library.book53));
pages5.appendTag(new NBTTagString(Library.book54));
pages5.appendTag(new NBTTagString(Library.book55));
book5.stackTagCompound.setTag("pages", pages5);
player.inventory.addItemStackToInventory(book5);

View File

@ -26,6 +26,7 @@ import com.hbm.blocks.DecoBlockAlt;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.RedBarrel;
import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -313,7 +314,6 @@ public class EntityBullet extends Entity implements IProjectile
if (entityplayer.capabilities.disableDamage || this.shootingEntity instanceof EntityPlayer && !((EntityPlayer)this.shootingEntity).canAttackPlayer(entityplayer))
{
movingobjectposition = null;
entityplayer.attackEntityFrom(DamageSource.generic, dmgMin + rand.nextInt(dmgMax - dmgMin));
}
}
@ -336,11 +336,11 @@ public class EntityBullet extends Entity implements IProjectile
if (this.shootingEntity == null)
{
damagesource = DamageSource.causeIndirectMagicDamage(this, this);
damagesource = ModDamageSource.causeBulletDamage(this, this);
}
else
{
damagesource = DamageSource.causeIndirectMagicDamage(this, this);
damagesource = ModDamageSource.causeBulletDamage(this, shootingEntity);
}
if (this.isBurning() && !(movingobjectposition.entityHit instanceof EntityEnderman))

View File

@ -0,0 +1,59 @@
package com.hbm.entity;
import com.hbm.explosion.ExplosionParticle;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class EntityGrenadeNuclear extends EntityThrowable
{
private static final String __OBFID = "CL_00001722";
public EntityGrenadeNuclear(World p_i1773_1_)
{
super(p_i1773_1_);
}
public EntityGrenadeNuclear(World p_i1774_1_, EntityLivingBase p_i1774_2_)
{
super(p_i1774_1_, p_i1774_2_);
}
public EntityGrenadeNuclear(World p_i1775_1_, double p_i1775_2_, double p_i1775_4_, double p_i1775_6_)
{
super(p_i1775_1_, p_i1775_2_, p_i1775_4_, p_i1775_6_);
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_)
{
if (p_70184_1_.entityHit != null)
{
int b0 = 1000;
p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
}
if (!this.worldObj.isRemote)
{
this.setDead();
EntityNukeExplosionAdvanced entity0 = new EntityNukeExplosionAdvanced(this.worldObj);
entity0.posX = this.posX;
entity0.posY = this.posY;
entity0.posZ = this.posZ;
entity0.destructionRange = 25;
entity0.speed = 25;
entity0.coefficient = 10.0F;
this.worldObj.spawnEntityInWorld(entity0);
ExplosionParticle.spawnMush(this.worldObj, (int)this.posX, (int)this.posY - 2, (int)this.posZ);
}
}
}

View File

@ -20,11 +20,13 @@ import net.minecraftforge.common.util.ForgeDirection;
import com.hbm.blocks.DecoBlockAlt;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.EntityGrenadeNuclear;
import com.hbm.entity.EntityMiniNuke;
import com.hbm.entity.EntityMirv;
import com.hbm.entity.EntityNukeCloudSmall;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
public class ExplosionNukeGeneric {
@ -118,7 +120,7 @@ public class ExplosionNukeGeneric {
d6 = entity.posY + entity.getEyeHeight() - y;
d7 = entity.posZ - z;
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall) && !(entity instanceof EntityMirv) && !(entity instanceof EntityMiniNuke) && !(entity instanceof EntityPlayer && Library.checkArmor((EntityPlayer)entity, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)))
if (d9 < wat && !(entity instanceof EntityOcelot) && !(entity instanceof EntityNukeCloudSmall) && !(entity instanceof EntityMirv) && !(entity instanceof EntityMiniNuke) && !(entity instanceof EntityGrenadeNuclear) && !(entity instanceof EntityPlayer && Library.checkArmor((EntityPlayer)entity, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots)))
{
d5 /= d9;
d6 /= d9;
@ -128,8 +130,9 @@ public class ExplosionNukeGeneric {
double d11 = (1.0D - d4);// * d10;
if(!(entity instanceof EntityPlayerMP) || (entity instanceof EntityPlayerMP && ((EntityPlayerMP)entity).theItemInWorldManager.getGameType() != GameType.CREATIVE))
{
entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D)));
entity.setFire(30);
//entity.attackEntityFrom(DamageSource.generic, ((int)((d11 * d11 + d11) / 2.0D * 8.0D * bombStartStrength + 1.0D)));
entity.attackEntityFrom(ModDamageSource.nuclearBlast, 2.5F);
entity.setFire(5);
double d8 = EnchantmentProtection.func_92092_a(entity, d11);
entity.motionX += d5 * d8;
entity.motionY += d6 * d8;

View File

@ -34,7 +34,7 @@ public class MachineRecipes {
}
if(item == ModItems.plate_lead && item2 == ModItems.ingot_copper || item == ModItems.ingot_copper && item2 == ModItems.plate_lead) {
if(item == ModItems.plate_lead && item2 == ModItems.plate_copper || item == ModItems.plate_copper && item2 == ModItems.plate_lead) {
return new ItemStack(ModItems.neutron_reflector, 1);
}

View File

@ -7,6 +7,7 @@ import com.hbm.entity.EntityGrenadeFlare;
import com.hbm.entity.EntityGrenadeFrag;
import com.hbm.entity.EntityGrenadeGas;
import com.hbm.entity.EntityGrenadeGeneric;
import com.hbm.entity.EntityGrenadeNuclear;
import com.hbm.entity.EntityGrenadeNuke;
import com.hbm.entity.EntityGrenadePoison;
import com.hbm.entity.EntityGrenadeSchrabidium;
@ -85,6 +86,10 @@ public class ItemGrenade extends Item {
{
p_77659_2_.spawnEntityInWorld(new EntityGrenadeNuke(p_77659_2_, p_77659_3_));
}
if(this == ModItems.grenade_nuclear)
{
p_77659_2_.spawnEntityInWorld(new EntityGrenadeNuclear(p_77659_2_, p_77659_3_));
}
}
return p_77659_1_;

View File

@ -236,6 +236,7 @@ public class ItemStarterKit extends Item {
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_gas, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_schrabidium, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_nuke, 16));
player.inventory.addItemStackToInventory(new ItemStack(ModItems.grenade_nuclear, 16));
}
if(this == ModItems.fleija_kit)

View File

@ -310,6 +310,7 @@ public class ModItems {
public static Item grenade_gas;
public static Item grenade_schrabidium;
public static Item grenade_nuke;
public static Item grenade_nuclear;
public static Item bomb_waffle;
public static Item schnitzel_vegan;
@ -718,6 +719,7 @@ public class ModItems {
grenade_gas = new ItemGrenade().setUnlocalizedName("grenade_gas").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_gas");
grenade_schrabidium = new ItemGrenade().setUnlocalizedName("grenade_schrabidium").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_schrabidium");
grenade_nuke = new ItemGrenade().setUnlocalizedName("grenade_nuke").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_nuke");
grenade_nuclear = new ItemGrenade().setUnlocalizedName("grenade_nuclear").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":grenade_nuclear");
bomb_waffle = new ItemWaffle(20, false).setUnlocalizedName("bomb_waffle").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":bomb_waffle");
schnitzel_vegan = new ItemSchnitzelVegan(0, true).setUnlocalizedName("schnitzel_vegan").setCreativeTab(MainRegistry.tabNuke).setTextureName(RefStrings.MODID + ":schnitzel_vegan");
@ -1164,6 +1166,7 @@ public class ModItems {
GameRegistry.registerItem(grenade_gas, grenade_gas.getUnlocalizedName());
GameRegistry.registerItem(grenade_schrabidium, grenade_schrabidium.getUnlocalizedName());
GameRegistry.registerItem(grenade_nuke, grenade_nuke.getUnlocalizedName());
GameRegistry.registerItem(grenade_nuclear, grenade_nuclear.getUnlocalizedName());
//Tools
GameRegistry.registerItem(schrabidium_sword, schrabidium_sword.getUnlocalizedName());

View File

@ -245,7 +245,7 @@ public class HbmWorldGen implements IWorldGenerator {
new Bunker().generate(world, rand, x, y, z);
}
if(rand.nextInt(100) == 0)
if(rand.nextInt(1000) == 0)
{
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);
@ -254,7 +254,7 @@ public class HbmWorldGen implements IWorldGenerator {
new Silo().generate(world, rand, x, y, z);
}
if(rand.nextInt(100) == 0)
if(rand.nextInt(1000) == 0)
{
int x = i + rand.nextInt(16);
int z = j + rand.nextInt(16);

View File

@ -28,6 +28,8 @@ public class Library {
public static String book112 = "§lBeryllium§r\nBeryllium is an ingot which can be simply obtained from it's ore. Beryllium is used for Schrabidium-fuel and plutonium cores.";
public static String book113 = "§lLead§r\nLead is a very common ore that can be smelted into an ingot. It can be used to craft breeding reactors, RTG-Units and if combined with copper in the alloy furnace, it can be processed into neutron reflectors.";
public static String book114 = "§lSchrabidium§r\nSchrabidium is a very odd element only found near nuclear testing sites. It has violent behaviours if used the right way, making it perfect for bombs. If a big ammount is hit by neutrons, it will create other elements.";
public static String book115 = "§lAdvanced Alloy§r\nThe advanced alloy is a very durable and useful material, only used for the best factories which can handle four operations at once. It is composed of Minecraft grade copper and steel, combined by an alloy furnace.";
public static String book116 = "§lFuel§r\nFuel is obtained by combining an empty canister and a coal block in the alloy furnace. It is used for crafting explosive barrels and missiles.";
public static String book21 = "§lMachines§r\nAs an essential part of technic mods, Hbm's Nuclear Tech Mod also features many machines. They are either used to smelt or refine items or to store hazardous materials or even generate electricity.";
public static String book22 = "§lAlloy Furnace§r\nThe alloy furnace is the most importand machine as it is used to create alloys like red copper or neutron reflectors. It uses different kinds of fuel such as coal, netherrack, lava or even redstone.";
@ -42,6 +44,8 @@ public class Library {
public static String book211 = "§lEnergy Storage Block§r\nThis battery block will collect electricity from wires. Applying a redstone signal will prevent it from getting more energy and make it release it's electricity again.";
public static String book212 = "§lElectric Furnace§r\nThe electric furnace works like a normal furnace, but uses electricity instead of fuel items. It can be powered either with wires or with battery items.";
public static String book213 = "§lDeuterium Extractor§r\nThis machine needs electricity, water, sulfur and empty cells to extract deuterium from the water. Water will deplete much faster than sulfur.";
public static String book214 = "§lFactories§r\nFactories are big 3x3x3 furnaces on steroids. Depending on what type you use, it can smelt 2 or 4 items at the same time, while having nine additional in and output slots!";
public static String book215 = "§lFactory Schematics§r\nX - Factory Casing\n# - Factory Hatch\nO - Factory Core\n\nXXX X#X XXX\nXXX #O# XXX\nXXX X#X XXX";
public static String book31 = "§lBombs§r\nThis mod also features many different bombs, some of them work like regular TNT, others are nukes and need additional items to ignite.";
public static String book32 = "§lThe Gadget§r\nThe Gadget was the first functional nuclear explosive ever built. It needs four special propellants, a plutonium core and a cable drum. It's crater has a radius up to 150 meters.";
@ -72,10 +76,19 @@ public class Library {
public static String book46 = "§lEndothermic Missile§rA tier 3 missile which works exactly like an endothermic bomb, but has double the effect radius.";
public static String book47 = "§lExothermic Missile§rAnother tier 3 missile with an exothermic warhead and double the radius of it's stationary counterpart.";
public static String book48 = "§lNuclear Missile§rIt's basically a small nuke mounted on a missile. It has an explosion radius of 100 meters, making it the smallest nuke (next to the waffle of mass destruction, the nuclear creeper and the MIRV.)";
public static String book49 = "§lNuclear MIRV Missile§rThe nuclear MIRV is the most destructive intercontinental ballistic missile ever created. It combines a cluster bomb with the destructive force of a nuke, splitting into four small warheads just before impact.";
public static String book49 = "§lNuclear MIRV Missile§rThe nuclear MIRV is the most destructive intercontinental ballistic missile ever created. It combines a cluster bomb with the destructive force of a nuke, splitting into eight small warheads just before impact.";
public static String book51 = "§lMisc§rNext to nuclear technology and weapons of mass destruction, this mod also offers some gimmicks, handguns, different armor sets, randomly generated dungeons and more! (Please, do not touch any objects you don't know. You will probably explode and die.)";
public static String book51 = "§lMisc§r\nNext to nuclear technology and weapons of mass destruction, this mod also offers some gimmicks, handguns, different armor sets, randomly generated dungeons and more! (Please, do not touch any objects you don't know. You will probably explode and die.)";
public static String book52 = "§lRevolvers§r\nLike in the good old Western films, you can shoot with your own revolver! There are four different tiers of revolvers, dealing about 5 - infinite damage, depending on the tier. Note: A revolver can not hurt mobs like the ender dragon!";
public static String book53 = "§lRPG§r\nTo use the RPG, charge it like a bow and release the charge when it reached it's maximum. The rocket will cause a small explosion about half the size of a creeper's explosion.";
public static String book54 = "§lNuke Launcher§r\nThe M42 NNuclear Catapult \"Fat Man\" is the perfect christmas present for every small child! It shoots small tactical nuclear warheads causing chaos and destrucion. (What did you expect?)";
public static String book55 = "§lGrenades§r\nA renade are a very easy-to-use type of explosive. Simply throw it like a snowball and watch the explosion. Remember: Never, NEVER throw a Schrabidium Grenade.";
public static String book56 = "§lSyringes§r\nDon't do drugs! (except in Minecraft) Need some health? Take a Stimpak. You demand damage resistance? Inject a Med-X. Want to go nuts? Take AWESOME (only one dose per hour will help) Warning: Hitting enemies with syinges will give them the effect!";
public static String book57 = "§lMobile Stealth Device§r\nThis useful machine will make you invisibile, even without the annoying particles! Just remember that the effect will wear off in 30 seconds, so don't rely too much on it.";
public static String book58 = "§lFood§r\nSurprisingly enough, this mod offers a great variety of different food. Be sure not to eat anything, you may explode/combust/die of radiation poisoning/starve to death/experience a rare case of waffles taking over the world.";
public static String book61;
public static boolean checkArmor(EntityPlayer player, Item helmet, Item plate, Item legs, Item boots) {
if(player.inventory.armorInventory[0] != null &&

View File

@ -0,0 +1,22 @@
package com.hbm.lib;
import com.hbm.entity.EntityBullet;
import net.minecraft.entity.Entity;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
public class ModDamageSource extends DamageSource {
public static DamageSource nuclearBlast = (new DamageSource("nuclearBlast")).setExplosion();
public ModDamageSource(String p_i1566_1_) {
super(p_i1566_1_);
}
public static DamageSource causeBulletDamage(EntityBullet p_76353_0_, Entity p_76353_1_)
{
return (new EntityDamageSourceIndirect("revolverBullet", p_76353_0_, p_76353_1_)).setProjectile();
}
}

View File

@ -41,6 +41,7 @@ import com.hbm.entity.EntityGrenadeFlare;
import com.hbm.entity.EntityGrenadeFrag;
import com.hbm.entity.EntityGrenadeGas;
import com.hbm.entity.EntityGrenadeGeneric;
import com.hbm.entity.EntityGrenadeNuclear;
import com.hbm.entity.EntityGrenadeNuke;
import com.hbm.entity.EntityGrenadePoison;
import com.hbm.entity.EntityGrenadeSchrabidium;
@ -183,6 +184,7 @@ public class ClientProxy extends ServerProxy
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeGas.class, new RenderSnowball(ModItems.grenade_gas));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeSchrabidium.class, new RenderSnowball(ModItems.grenade_schrabidium));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeNuke.class, new RenderSnowball(ModItems.grenade_nuke));
RenderingRegistry.registerEntityRenderingHandler(EntityGrenadeNuclear.class, new RenderSnowball(ModItems.grenade_nuclear));
RenderingRegistry.registerEntityRenderingHandler(EntitySchrab.class, new RenderFlare());

View File

@ -392,6 +392,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_poison, 2), new Object[] { " G ", "PGP", " P ", 'G', ModItems.grenade_generic, 'P', ModItems.powder_poison });
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_gas, 2), new Object[] { " G ", "CGC", " C ", 'G', ModItems.grenade_generic, 'C', ModItems.pellet_gas });
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_schrabidium, 2), new Object[] { " G ", "CFC", " C ", 'G', ModItems.grenade_generic, 'C', ModItems.ingot_schrabidium, 'F', ModItems.grenade_flare });
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_nuclear, 1), new Object[] {"RS ", "ITI", " I ", 'I', ModItems.plate_iron, 'R', ModItems.wire_red_copper, 'S', ModItems.plate_steel, 'T', ModItems.gun_fatman_ammo });
GameRegistry.addRecipe(new ItemStack(ModItems.bomb_waffle, 1), new Object[] { "WEW", "MPM", "WEW", 'W', Items.wheat, 'E', Items.egg, 'M', Items.milk_bucket, 'P', ModItems.man_core });
GameRegistry.addRecipe(new ItemStack(ModItems.schnitzel_vegan, 3), new Object[] { "RWR", "WPW", "RWR", 'W', ModItems.trinitite, 'R', Items.reeds, 'P', Items.pumpkin_seeds });
@ -476,20 +477,6 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1, 1000), new Object[] { " A ", "PNP", "PSP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium });
GameRegistry.addRecipe(new ItemStack(ModItems.battery_schrabidium, 1, 1000), new Object[] { " A ", "PSP", "PNP", 'A', ModItems.wire_schrabidium, 'P', ModItems.plate_schrabidium, 'S', ModItems.powder_schrabidium, 'N', ModItems.powder_neptunium });
GameRegistry.addRecipe(new ItemStack(ModItems.nuke_starter_kit, 1), new Object[] { " P ", "ISI", "III", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModItems.nuke_advanced_kit, 1), new Object[] { " P ", "ISI", "III", 'P', ModItems.plate_steel, 'I', ModItems.plate_schrabidium, 'S', ModItems.ingot_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModItems.nuke_commercially_kit, 1), new Object[] { " P ", "ISI", "III", 'P', ModItems.plate_steel, 'I', ModItems.plate_copper, 'S', ModItems.ingot_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModItems.nuke_electric_kit, 1), new Object[] { " P ", "ISI", "III", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModItems.gadget_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_titanium, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_gadget) });
GameRegistry.addRecipe(new ItemStack(ModItems.boy_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_boy) });
GameRegistry.addRecipe(new ItemStack(ModItems.man_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_man) });
GameRegistry.addRecipe(new ItemStack(ModItems.mike_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_mike) });
GameRegistry.addRecipe(new ItemStack(ModItems.tsar_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_tsar) });
GameRegistry.addRecipe(new ItemStack(ModItems.fleija_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_fleija) });
GameRegistry.addRecipe(new ItemStack(ModItems.multi_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.bomb_multi) });
GameRegistry.addRecipe(new ItemStack(ModItems.grenade_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', ModItems.grenade_generic });
GameRegistry.addRecipe(new ItemStack(ModItems.prototype_kit, 1), new Object[] { " P ", "ISI", "IDI", 'P', ModItems.plate_steel, 'I', ModItems.plate_iron, 'S', ModItems.ingot_schrabidium, 'D', Item.getItemFromBlock(ModBlocks.nuke_prototype) });
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.ingot_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_plate, 1), new Object[] { "E E", "EEE", "EEE", 'E', ModItems.ingot_schrabidium });
GameRegistry.addRecipe(new ItemStack(ModItems.schrabidium_legs, 1), new Object[] { "EEE", "E E", "E E", 'E', ModItems.ingot_schrabidium });

View File

@ -67,6 +67,7 @@ import com.hbm.entity.EntityGrenadeFlare;
import com.hbm.entity.EntityGrenadeFrag;
import com.hbm.entity.EntityGrenadeGas;
import com.hbm.entity.EntityGrenadeGeneric;
import com.hbm.entity.EntityGrenadeNuclear;
import com.hbm.entity.EntityGrenadeNuke;
import com.hbm.entity.EntityGrenadePoison;
import com.hbm.entity.EntityGrenadeSchrabidium;
@ -243,6 +244,7 @@ public class MainRegistry
EntityRegistry.registerModEntity(EntityMiniNuke.class, "entity_mini_nuke", 36, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntitySmokeFX.class, "entity_smoke_fx", 37, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityNukeCloudBig.class, "entity_nuke_cloud_big", 38, this, 1000, 1, true);
EntityRegistry.registerModEntity(EntityGrenadeNuclear.class, "entity_grenade_nuclear", 39, this, 1000, 1, true);
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
}

View File

@ -64,10 +64,6 @@ public class EntitySmokeFX extends EntityModFX
this.setDead();
}
//his.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge);
//this.motionY += 0.004D;
//this.moveEntity(this.motionX, this.motionY, this.motionZ);
this.motionX *= 0.9599999785423279D;
this.motionY *= 0.9599999785423279D;
this.motionZ *= 0.9599999785423279D;

View File

@ -1,51 +0,0 @@
package com.hbm.particles;
import net.minecraft.client.particle.EntitySmokeFX;
import net.minecraft.world.World;
public class NukeCloudFX extends EntitySmokeFX {
public NukeCloudFX(World world, double x, double y, double z, double moX, double moY, double moZ) {
super(world, x, y, z, moX, moY, moZ, 1.0F);
this.particleMaxAge *= 3;
}
public NukeCloudFX(World world, double x, double y, double z, double moX, double moY, double moZ, float scale) {
super(world, x, y, z, moX, moY, moZ, scale);
this.particleMaxAge *= 3;
}
@Override
public void onUpdate()
{
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge);
//this.motionY += 0.004D;
//this.moveEntity(/*this.motionX, this.motionY, this.motionZ*/1, 1, 1);
/*if (this.posY == this.prevPosY)
{
this.motionX *= 1.1D;
this.motionZ *= 1.1D;
}
this.motionX *= 0.9599999785423279D;
this.motionY *= 0.9599999785423279D;
this.motionZ *= 0.9599999785423279D;
if (this.onGround)
{
this.motionX *= 0.699999988079071D;
this.motionZ *= 0.699999988079071D;
}*/
}
}

View File

@ -1,122 +0,0 @@
package com.hbm.particles;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import com.hbm.lib.RefStrings;
public class NukeSmokeFX extends EntityFX{
double gravity, friction, r_e, g_e, b_e, opacity_e;
private static final ResourceLocation texture1 = new ResourceLocation(RefStrings.MODID + ":/textures/particle/shockwave.png");
public NukeSmokeFX(World w, double xp, double yp, double zp, double xs, double ys, double zs, int siz, int lengt,double gravit, double Ra,double Ga,double Ba,double opacita,double frictio){
// delete double Ra,double Ga,double Ba, and set r_e,g_e,b_e to 1 if you want to have a multicolored texture
super(w, xp, yp, zp, xs, ys, zs);
this.motionX =xs;
this.motionY =ys;
this.motionZ =zs;
this.friction=frictio;
this.particleMaxAge=lengt;
this.particleScale=siz/10;
this.gravity=gravit*0.001;
this.r_e=/*Ra*/1;
this.g_e=/*Ga*/1;
this.b_e=/*Ba*/1;
this.opacity_e=opacita;
}
public NukeSmokeFX(World w, double xp, double yp, double zp, double xs, double ys, double zs, int siz, int lengt){
// use this if you want to use less customization
super(w, xp, yp, zp, xs, ys, zs);
this.motionX = xs;
this.motionY = ys;
this.motionZ = zs;
this.particleMaxAge = lengt;
this.particleScale = siz / 10;
this.friction = 0.98;
this.gravity = 0;
this.r_e = 1;
this.g_e = 1;
this.b_e = 1;
this.opacity_e = 1;
}
public NukeSmokeFX(World w, double xp, double yp, double zp){
super(w, xp, yp, zp);
}
@Override
public void renderParticle(Tessellator tess, float par2, float par3, float par4, float par5, float par6, float par7){
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.5F);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
float PScale = 0.01F*this.particleScale;
float x=(float)(this.prevPosX+(this.posX-this.prevPosX)*par2-interpPosX);
float y=(float)(this.prevPosY+(this.posY-this.prevPosY)*par2-interpPosY);
float z=(float)(this.prevPosZ+(this.posZ-this.prevPosZ)*par2-interpPosZ);
Minecraft.getMinecraft().renderEngine.bindTexture(texture1);
tess.startDrawingQuads();
tess.setColorRGBA_F((float)this.r_e, (float)this.g_e, (float)this.b_e, (float)this.opacity_e);
tess.setBrightness(/*240*/500);
tess.addVertexWithUV(x-par3*PScale-par6*PScale, y-par4*PScale, z-par5*PScale-par7*PScale, 0, 0);
tess.addVertexWithUV(x-par3*PScale+par6*PScale, y+par4*PScale, z-par5*PScale+par7*PScale, 1, 0);
tess.addVertexWithUV(x+par3*PScale+par6*PScale, y+par4*PScale, z+par5*PScale+par7*PScale, 1, 1);
tess.addVertexWithUV(x+par3*PScale-par6*PScale, y-par4*PScale, z+par5*PScale-par7*PScale, 0, 1);
tess.draw();
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.0F);
GL11.glEnable(GL11.GL_LIGHTING);
}
@Override
public int getFXLayer(){return 3;}
@Override
public void onUpdate(){
if(particleAge>particleMaxAge)this.setDead();
if(Minecraft.getMinecraft().gameSettings.particleSetting==2)this.setDead();
if(worldObj.isRemote)this.motionHandeler();
//this.particleScale-=(float)particleMaxAge/10.0;
this.particleScale += particleMaxAge/2.5;
if(this.isDead){
}
this.particleAge++;
}
public void motionHandeler(){
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
//this.motionX*=friction;
//this.motionY*=friction;
//this.motionZ*=friction;
//this.motionY +=this.gravity;
//this.moveEntity(this.motionX, this.motionY, this.motionZ);
}
}

View File

@ -65,42 +65,42 @@ public class ModEffectRenderer extends Render
{
EntitySmokeFX fx = (EntitySmokeFX)p_76986_1_;
if(fx.particleAge < fx.maxAge)
if(fx.particleAge < fx.maxAge && fx.particleAge >= fx.maxAge / 8 * 7)
{
field_94151_a = ModItems.smoke8;
}
if(fx.particleAge < fx.maxAge / 8 * 7)
if(fx.particleAge < fx.maxAge / 8 * 7 && fx.particleAge >= fx.maxAge / 8 * 6)
{
field_94151_a = ModItems.smoke7;
}
if(fx.particleAge < fx.maxAge / 8 * 6)
if(fx.particleAge < fx.maxAge / 8 * 6 && fx.particleAge >= fx.maxAge / 8 * 5)
{
field_94151_a = ModItems.smoke6;
}
if(fx.particleAge < fx.maxAge / 8 * 5)
if(fx.particleAge < fx.maxAge / 8 * 5 && fx.particleAge >= fx.maxAge / 8 * 4)
{
field_94151_a = ModItems.smoke5;
}
if(fx.particleAge < fx.maxAge / 8 * 4)
if(fx.particleAge < fx.maxAge / 8 * 4 && fx.particleAge >= fx.maxAge / 8 * 3)
{
field_94151_a = ModItems.smoke4;
}
if(fx.particleAge < fx.maxAge / 8 * 3)
if(fx.particleAge < fx.maxAge / 8 * 3 && fx.particleAge >= fx.maxAge / 8 * 2)
{
field_94151_a = ModItems.smoke3;
}
if(fx.particleAge < fx.maxAge / 8 * 2)
if(fx.particleAge < fx.maxAge / 8 * 2 && fx.particleAge >= fx.maxAge / 8 * 1)
{
field_94151_a = ModItems.smoke2;
}
if(fx.particleAge < fx.maxAge / 8)
if(fx.particleAge < fx.maxAge / 8 && fx.particleAge >= 0)
{
field_94151_a = ModItems.smoke1;
}

View File

@ -6,6 +6,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.HbmChestContents;
import com.hbm.main.MainRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -79,7 +80,7 @@ public class Factory extends WorldGenerator
public boolean generate_r0(World world, Random rand, int x, int y, int z)
{
if(!LocationIsValidSpawn(world, x, y, z) || !LocationIsValidSpawn(world, x + 14, y, z) || !LocationIsValidSpawn(world, x + 14, y, z + 29) || !LocationIsValidSpawn(world, x, y, z + 29))
if(!LocationIsValidSpawn(world, x + 7, y, z + 15))
{
return false;
}
@ -3119,6 +3120,8 @@ public class Factory extends WorldGenerator
world.setBlock(x + 17, y + 43, z + 10, Blocks.web, 0, 3);
world.setBlock(x + 18, y + 43, z + 10, Blocks.web, 0, 3);
world.setBlock(x + 17, y + 43, z + 11, Blocks.web, 0, 3);
if(MainRegistry.enableDebugMode)
System.out.print("[Debug] Successfully spawned abandoned factory at " + x + " " + y +" " + z + "\n");
return true;
}

View File

@ -6,6 +6,7 @@ import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.HbmChestContents;
import com.hbm.main.MainRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@ -80,7 +81,7 @@ public class Silo extends WorldGenerator
public boolean generate_r0(World world, Random rand, int x, int y, int z)
{
if(!LocationIsValidSpawn(world, x, y, z) || !LocationIsValidSpawn(world, x + 20, y, z) || !LocationIsValidSpawn(world, x + 20, y, z + 19) || !LocationIsValidSpawn(world, x, y, z + 19))
if(!LocationIsValidSpawn(world, x + 10, y, z + 10))
{
return false;
}
@ -2510,6 +2511,8 @@ public class Silo extends WorldGenerator
world.setBlock(x + 9, y + -1, z + 2, Blocks.ladder, 3, 3);
world.setBlock(x + 9, y + 0, z + 2, Blocks.ladder, 3, 3);
world.setBlock(x + 9, y + 1, z + 2, Blocks.ladder, 3, 3);
if(MainRegistry.enableDebugMode)
System.out.print("[Debug] Successfully spawned missile silo at " + x + " " + y +" " + z + "\n");
return true;
}