finishing up the armor mods, some new radiation funnies
@ -1,4 +1,4 @@
|
||||
package com.hbm.interfaces;
|
||||
package api.hbm.entity;
|
||||
|
||||
public interface IRadiationImmune {
|
||||
|
||||
@ -971,6 +971,11 @@ item.euphemium_plate.name=Euphemiumbrustpanzer
|
||||
item.euphemium_stopper.name=Stopper
|
||||
item.factory_core_advanced.name=Fortgeschrittener Fabrikenergiecluster
|
||||
item.factory_core_titanium.name=Einfacher Fabrikenergiecluster
|
||||
item.fallout.name=Fallouthäufchen
|
||||
item.fau_boots.name=Fau-Stiefel
|
||||
item.fau_helmet.name=Fau-Helm
|
||||
item.fau_legs.name=Fau-Beinschienen
|
||||
item.fau_plate.name=Fau-Brustpanzer
|
||||
item.filter_coal.name=Aktivkohlefilter
|
||||
item.fins_big_steel.name=Große Stahlgitterfinnen
|
||||
item.fins_flat.name=Flache Stahlabdeckung
|
||||
@ -1086,6 +1091,7 @@ item.gun_bolt_action_ammo.name=12x74 Brenneke (LEGACY)
|
||||
item.gun_bolt_action_green.name=Dream-Repetiergewehr (Grün)
|
||||
item.gun_bolt_action_saturnite.name=Saturnitbüchse
|
||||
item.gun_bolter.name=Boltergewehr
|
||||
item.gun_bolter_digamma.name=Digammagewehr
|
||||
item.gun_calamity.name=Calamity
|
||||
item.gun_calamity_ammo.name=.50 BMG Patrone (LEGACY)
|
||||
item.gun_calamity_dual.name=Sattelkanone
|
||||
@ -1287,6 +1293,7 @@ item.ingot_uranium.name=Uranbarren
|
||||
item.ingot_uranium_fuel.name=Urankernbrennstoffbarren
|
||||
item.ingot_verticium.name=Verticiumbarren
|
||||
item.ingot_weidanium.name=Weidaniumbarren
|
||||
item.ink.name=林-Tinte
|
||||
item.insert_du.name=DU-Einlage
|
||||
item.insert_era.name=Explosive Reaktivpaanzerungseinlage
|
||||
item.insert_esapi.name=ESAPI-Einlage
|
||||
@ -2219,6 +2226,7 @@ tile.block_dura_steel.name=Verstärketer Schnellarbeitsstahlblock
|
||||
tile.block_electrical_scrap.name=Elektroschrottblock
|
||||
tile.block_euphemium.name=Euphemiumblock
|
||||
tile.block_euphemium_cluster.name=Euphemiumgeätzter Schrabidium-Cluster
|
||||
tile.block_fallout.name=Fallout-Block
|
||||
tile.block_fiberglass.name=Fiberglasrolle
|
||||
tile.block_fluorite.name=Fluoritblock
|
||||
tile.block_insulator.name=Isolatorrolle
|
||||
@ -2351,6 +2359,7 @@ tile.factory_titanium_conductor.name=Einfacher Fabriksstromanschluss
|
||||
tile.factory_titanium_core.name=Einfache Fabrikkernkomponente
|
||||
tile.factory_titanium_furnace.name=Einfache Fabrikzugriffsluke
|
||||
tile.factory_titanium_hull.name=Einfache Fabrikshülle
|
||||
tile.fallout.name=Fallout
|
||||
tile.fence_metal.name=Maschendrahtzaun
|
||||
tile.fireworks.name=Feuerwerksbatterie
|
||||
tile.fireworks.charges=Ladungen: %s
|
||||
|
||||
@ -971,6 +971,11 @@ item.euphemium_plate.name=Euphemium Chestplate
|
||||
item.euphemium_stopper.name=Stopper
|
||||
item.factory_core_advanced.name=Advanced Factory Energy Cluster
|
||||
item.factory_core_titanium.name=Basic Factory Energy Cluster
|
||||
item.fallout.name=Pile of Fallout
|
||||
item.fau_boots.name=Fau Boots
|
||||
item.fau_helmet.name=Fau Helmet
|
||||
item.fau_legs.name=Fau Leggins
|
||||
item.fau_plate.name=Fau Chestplate
|
||||
item.filter_coal.name=Activated Carbon Filter
|
||||
item.fins_big_steel.name=Big Steel Grid Fins
|
||||
item.fins_flat.name=Flat Steel Casing
|
||||
@ -1086,6 +1091,7 @@ item.gun_bolt_action_ammo.name=12x74 Slug (LEGACY)
|
||||
item.gun_bolt_action_green.name=Dream Bolt-Action Rifle (Green)
|
||||
item.gun_bolt_action_saturnite.name=Saturnite Rifle
|
||||
item.gun_bolter.name=Bolter
|
||||
item.gun_bolter_digamma.name=Digamma Gun
|
||||
item.gun_calamity.name=Calamity
|
||||
item.gun_calamity_ammo.name=.50 BMG Round (LEGACY)
|
||||
item.gun_calamity_dual.name=Saddle Gun
|
||||
@ -1287,6 +1293,7 @@ item.ingot_uranium.name=Uranium Ingot
|
||||
item.ingot_uranium_fuel.name=Ingot of Uranium Fuel
|
||||
item.ingot_verticium.name=Verticium Ingot
|
||||
item.ingot_weidanium.name=Weidanium Ingot
|
||||
item.ink.name=林 Ink
|
||||
item.insert_du.name=DU Insert
|
||||
item.insert_era.name=Explosive Reactive Armor Insert
|
||||
item.insert_esapi.name=ESAPI Insert
|
||||
@ -2219,6 +2226,7 @@ tile.block_dura_steel.name=Reinforced Block of High-Speed Steel
|
||||
tile.block_electrical_scrap.name=Block of Electrical Scrap
|
||||
tile.block_euphemium.name=Block of Euphemium
|
||||
tile.block_euphemium_cluster.name=Euphemium-Etched Schrabidium Cluster
|
||||
tile.block_fallout.name=Block of Fallout
|
||||
tile.block_fiberglass.name=Roll of Fiberglass
|
||||
tile.block_fluorite.name=Block of Fluorite
|
||||
tile.block_insulator.name=Roll of Insulation
|
||||
@ -2351,6 +2359,7 @@ tile.factory_titanium_conductor.name=Basic Factory Electricity Port
|
||||
tile.factory_titanium_core.name=Basic Factory Core Component
|
||||
tile.factory_titanium_furnace.name=Basic Factory Access Hatch
|
||||
tile.factory_titanium_hull.name=Basic Factory Casing
|
||||
tile.fallout.name=Fallout
|
||||
tile.fence_metal.name=Chainlink Fence
|
||||
tile.fireworks.name=Firework Battery
|
||||
tile.fireworks.charges=Charges Loaded: %s
|
||||
|
||||
@ -166,6 +166,7 @@
|
||||
"entity.ducc": {"category": "neutral", "sounds": ["entity/ducc1", "entity/ducc2"]},
|
||||
"entity.slicer": {"category": "neutral", "sounds": ["entity/slicer1", "entity/slicer2", "entity/slicer3", "entity/slicer4"]},
|
||||
"entity.megaquacc": {"category": "hostile", "sounds": [{"name": "entity/megaquacc", "stream": false}]},
|
||||
"entity.vomit": {"category": "player", "sounds": [{"name": "entity/vomit", "stream": false}]},
|
||||
|
||||
"step.metal": {"category": "player", "sounds": [{"name": "footsteps/metal", "stream": false}]},
|
||||
"step.iron_jump": {"category": "player", "sounds": [{"name": "footsteps/iron_jump", "stream": false}]},
|
||||
|
||||
BIN
src/main/java/assets/hbm/sounds/entity/vomit.ogg
Normal file
|
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 964 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 765 B |
BIN
src/main/java/assets/hbm/textures/items/fallout.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
src/main/java/assets/hbm/textures/items/ink.png
Normal file
|
After Width: | Height: | Size: 382 B |
@ -18,6 +18,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFalling;
|
||||
import net.minecraft.block.material.*;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
@ -159,6 +160,7 @@ public class ModBlocks {
|
||||
public static Block block_lithium;
|
||||
public static Block block_white_phosphorus;
|
||||
public static Block block_red_phosphorus;
|
||||
public static Block block_fallout;
|
||||
|
||||
public static Block block_australium;
|
||||
public static Block block_weidanium;
|
||||
@ -282,6 +284,7 @@ public class ModBlocks {
|
||||
public static Block frozen_grass;
|
||||
public static Block frozen_log;
|
||||
public static Block frozen_planks;
|
||||
public static Block fallout;
|
||||
|
||||
public static Block sellafield_slaked;
|
||||
public static Block sellafield_0;
|
||||
@ -1016,6 +1019,7 @@ public class ModBlocks {
|
||||
block_lithium = new BlockLithium(Material.iron).setBlockName("block_lithium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_lithium");
|
||||
block_white_phosphorus = new BlockGeneric(Material.rock).setBlockName("block_white_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_white_phosphorus");
|
||||
block_red_phosphorus = new BlockFalling(Material.sand).setStepSound(Block.soundTypeSand).setBlockName("block_red_phosphorus").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_red_phosphorus");
|
||||
block_fallout = new BlockFalling(Material.ground).setStepSound(Block.soundTypeGravel).setBlockName("block_fallout").setCreativeTab(MainRegistry.blockTab).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":ash");
|
||||
|
||||
block_australium = new BlockGeneric(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
|
||||
block_weidanium = new BlockGeneric(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_weidanium");
|
||||
@ -1128,8 +1132,8 @@ public class ModBlocks {
|
||||
mush_block = new BlockMushHuge(Material.plants).setBlockName("mush_block").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_skin");
|
||||
mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem");
|
||||
|
||||
waste_earth = new WasteEarth(Material.ground, true).setBlockName("waste_earth").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(1.0F).setBlockTextureName(RefStrings.MODID + ":waste_earth");
|
||||
waste_mycelium = new WasteEarth(Material.ground, true).setBlockName("waste_mycelium").setStepSound(Block.soundTypeGrass).setLightLevel(1F).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(1.0F).setBlockTextureName(RefStrings.MODID + ":waste_mycelium_side");
|
||||
waste_earth = new WasteEarth(Material.ground, false).setBlockName("waste_earth").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_earth");
|
||||
waste_mycelium = new WasteEarth(Material.ground, true).setBlockName("waste_mycelium").setStepSound(Block.soundTypeGrass).setLightLevel(1F).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_mycelium_side");
|
||||
waste_trinitite = new BlockOre(Material.sand).setBlockName("waste_trinitite").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":waste_trinitite");
|
||||
waste_trinitite_red = new BlockOre(Material.sand).setBlockName("waste_trinitite_red").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":waste_trinitite_red");
|
||||
waste_log = new WasteLog(Material.wood).setBlockName("waste_log").setStepSound(Block.soundTypeWood).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(2.5F);
|
||||
@ -1138,6 +1142,7 @@ public class ModBlocks {
|
||||
frozen_grass = new WasteEarth(Material.ground, false).setBlockName("frozen_grass").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F);
|
||||
frozen_log = new WasteLog(Material.wood).setBlockName("frozen_log").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F);
|
||||
frozen_planks = new BlockOre(Material.wood).setBlockName("frozen_planks").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(0.5F).setResistance(2.5F).setBlockTextureName(RefStrings.MODID + ":frozen_planks");
|
||||
fallout = new BlockFallout(Material.snow).setBlockName("fallout").setStepSound(Block.soundTypeGravel).setCreativeTab(MainRegistry.blockTab).setHardness(0.1F).setLightOpacity(0).setBlockTextureName(RefStrings.MODID + ":ash");
|
||||
|
||||
sellafield_slaked = new BlockGeneric(Material.rock).setBlockName("sellafield_slaked").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_slaked");
|
||||
sellafield_0 = new BlockOre(Material.rock, 0.5F, 10F).setBlockName("sellafield_0").setStepSound(Block.soundTypeStone).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":sellafield_0");
|
||||
@ -1717,6 +1722,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(block_yellowcake, block_yellowcake.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_scrap, block_scrap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_electrical_scrap, block_electrical_scrap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_fallout, block_fallout.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_insulator, block_insulator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_fiberglass, block_fiberglass.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(block_asbestos, block_asbestos.getUnlocalizedName());
|
||||
@ -1862,6 +1868,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(frozen_dirt, frozen_dirt.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(frozen_log, frozen_log.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(frozen_planks, frozen_planks.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fallout, fallout.getUnlocalizedName());
|
||||
|
||||
//RAD
|
||||
GameRegistry.registerBlock(sellafield_slaked, sellafield_slaked.getUnlocalizedName());
|
||||
|
||||
74
src/main/java/com/hbm/blocks/generic/BlockFallout.java
Normal file
@ -0,0 +1,74 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFallout extends Block {
|
||||
|
||||
public BlockFallout(Material mat) {
|
||||
super(mat);
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
|
||||
}
|
||||
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return ModItems.fallout;
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(world, x, y - 1, z) ? true : (block == this && (world.getBlockMetadata(x, y - 1, z) & 7) == 7 ? true : block.isOpaqueCube() && block.getMaterial().blocksMovement())) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
|
||||
|
||||
if(!world.isRemote && entity instanceof EntityLivingBase) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 1));
|
||||
}
|
||||
}
|
||||
|
||||
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
|
||||
|
||||
if(!world.isRemote) {
|
||||
player.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 1));
|
||||
}
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
|
||||
this.func_150155_m(world, x, y, z);
|
||||
}
|
||||
|
||||
private boolean func_150155_m(World world, int x, int y, int z) {
|
||||
if(!this.canPlaceBlockAt(world, x, y, z)) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isReplaceable(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -25,7 +25,7 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class WasteEarth extends Block {
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -33,15 +33,15 @@ public class WasteEarth extends Block {
|
||||
|
||||
public WasteEarth(Material mat, boolean tick) {
|
||||
super(mat);
|
||||
this.setTickRandomly(tick);
|
||||
this.setTickRandomly(tick);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_earth_top" : (this == ModBlocks.waste_mycelium ? ":waste_mycelium_top" : ":frozen_grass_top")));
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_grass_top" : (this == ModBlocks.waste_mycelium ? ":waste_mycelium_top" : ":frozen_grass_top")));
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_earth_bottom" : (this == ModBlocks.waste_mycelium ? ":waste_earth_bottom" : ":frozen_dirt")));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_earth_side" : (this == ModBlocks.waste_mycelium ? ":waste_mycelium_side" : ":frozen_grass_side")));
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + (this == ModBlocks.waste_earth ? ":waste_grass_side" : (this == ModBlocks.waste_mycelium ? ":waste_mycelium_side" : ":frozen_grass_side")));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -51,148 +51,105 @@ public class WasteEarth extends Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
if(this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium)
|
||||
{
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
if(this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium) {
|
||||
return Item.getItemFromBlock(Blocks.dirt);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.frozen_grass)
|
||||
{
|
||||
|
||||
if(this == ModBlocks.frozen_grass) {
|
||||
return Items.snowball;
|
||||
}
|
||||
|
||||
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random p_149745_1_)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase && this == ModBlocks.waste_earth) {
|
||||
@Override
|
||||
public int quantityDropped(Random p_149745_1_) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 15 * 20, 0));
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLivingBase && this == ModBlocks.frozen_grass) {
|
||||
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2 * 60 * 20, 2));
|
||||
}
|
||||
if (entity instanceof EntityLivingBase && this == ModBlocks.waste_mycelium) {
|
||||
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 3));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onEntityWalking(World p_149724_1_, int p_149724_2_, int p_149724_3_, int p_149724_4_, Entity entity) {
|
||||
if(entity instanceof EntityLivingBase && this == ModBlocks.frozen_grass) {
|
||||
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2 * 60 * 20, 2));
|
||||
}
|
||||
if(entity instanceof EntityLivingBase && this == ModBlocks.waste_mycelium) {
|
||||
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 3));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_)
|
||||
{
|
||||
super.randomDisplayTick(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_, p_149734_5_);
|
||||
public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) {
|
||||
super.randomDisplayTick(p_149734_1_, p_149734_2_, p_149734_3_, p_149734_4_, p_149734_5_);
|
||||
if(this == ModBlocks.waste_mycelium) {
|
||||
p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
if (this == ModBlocks.waste_earth)
|
||||
{
|
||||
p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
if (this == ModBlocks.waste_mycelium)
|
||||
{
|
||||
p_149734_1_.spawnParticle("townaura", p_149734_2_ + p_149734_5_.nextFloat(), p_149734_3_ + 1.1F, p_149734_4_ + p_149734_5_.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if((this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium) && world.getBlock(x, y + 1, z) == Blocks.air && rand.nextInt(10) == 0)
|
||||
{
|
||||
Block b0;
|
||||
int count = 0;
|
||||
for(int i = -5; i < 5; i++) {
|
||||
for(int j = -5; j < 6; j++) {
|
||||
for(int k = -5; k < 5; k++) {
|
||||
b0 = world.getBlock(x + i, y + j, z + k);
|
||||
if((b0 instanceof BlockMushroom) || b0 == ModBlocks.mush)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count > 0 && count < 5)
|
||||
world.setBlock(x, y + 1, z, ModBlocks.mush);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.waste_mycelium && GeneralConfig.enableMycelium)
|
||||
{
|
||||
for(int i = -1; i < 2; i++) {
|
||||
for(int j = -1; j < 2; j++) {
|
||||
for(int k = -1; k < 2; k++) {
|
||||
Block b0 = world.getBlock(x + i, y + j, z + k);
|
||||
Block b1 = world.getBlock(x + i, y + j + 1, z + k);
|
||||
if(!b1.isOpaqueCube() && (b0 == Blocks.dirt || b0 == Blocks.grass || b0 == Blocks.mycelium || b0 == ModBlocks.waste_earth))
|
||||
{
|
||||
world.setBlock(x + i, y + j, z + k, ModBlocks.waste_mycelium);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.nextInt(10) == 0) {
|
||||
Block b0;
|
||||
int count = 0;
|
||||
for(int i = -5; i < 5; i++) {
|
||||
for(int j = -5; j < 6; j++) {
|
||||
for(int k = -5; k < 5; k++) {
|
||||
b0 = world.getBlock(x + i, y + j, z + k);
|
||||
if(b0 == ModBlocks.mush)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count < 5)
|
||||
world.setBlock(x, y + 1, z, ModBlocks.mush);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (world.getBlockLightValue(x, y + 1, z) < 4 && world.getBlockLightOpacity(x, y + 1, z) > 2)
|
||||
{
|
||||
world.setBlock(x, y, z, Blocks.dirt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(GeneralConfig.enableAutoCleanup && (this == ModBlocks.waste_earth | this == ModBlocks.waste_mycelium))
|
||||
if(!world.isRemote)
|
||||
world.setBlock(x, y, z, Blocks.dirt);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
public int tickRate(World world) {
|
||||
|
||||
if(this.radIn > 0)
|
||||
return 20;
|
||||
|
||||
return 100;
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
|
||||
if(this.radIn > 0)
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
}*/
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if((this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium) && world.getBlock(x, y + 1, z) == Blocks.air && rand.nextInt(10) == 0) {
|
||||
Block b0;
|
||||
int count = 0;
|
||||
for(int i = -5; i < 5; i++) {
|
||||
for(int j = -5; j < 6; j++) {
|
||||
for(int k = -5; k < 5; k++) {
|
||||
b0 = world.getBlock(x + i, y + j, z + k);
|
||||
if((b0 instanceof BlockMushroom) || b0 == ModBlocks.mush) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count > 0 && count < 5)
|
||||
world.setBlock(x, y + 1, z, ModBlocks.mush);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.waste_mycelium && GeneralConfig.enableMycelium) {
|
||||
for(int i = -1; i < 2; i++) {
|
||||
for(int j = -1; j < 2; j++) {
|
||||
for(int k = -1; k < 2; k++) {
|
||||
Block b0 = world.getBlock(x + i, y + j, z + k);
|
||||
Block b1 = world.getBlock(x + i, y + j + 1, z + k);
|
||||
if(!b1.isOpaqueCube() && (b0 == Blocks.dirt || b0 == Blocks.grass || b0 == Blocks.mycelium || b0 == ModBlocks.waste_earth)) {
|
||||
world.setBlock(x + i, y + j, z + k, ModBlocks.waste_mycelium);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.nextInt(10) == 0) {
|
||||
Block b0;
|
||||
int count = 0;
|
||||
for(int i = -5; i < 5; i++) {
|
||||
for(int j = -5; j < 6; j++) {
|
||||
for(int k = -5; k < 5; k++) {
|
||||
b0 = world.getBlock(x + i, y + j, z + k);
|
||||
if(b0 == ModBlocks.mush) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(count < 5)
|
||||
world.setBlock(x, y + 1, z, ModBlocks.mush);
|
||||
}
|
||||
}
|
||||
|
||||
if(this == ModBlocks.waste_earth || this == ModBlocks.waste_mycelium) {
|
||||
if(!world.isRemote) {
|
||||
if(world.getBlockLightValue(x, y + 1, z) < 4 && world.getBlockLightOpacity(x, y + 1, z) > 2) {
|
||||
world.setBlock(x, y, z, Blocks.dirt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(GeneralConfig.enableAutoCleanup && (this == ModBlocks.waste_earth | this == ModBlocks.waste_mycelium))
|
||||
if(!world.isRemote)
|
||||
world.setBlock(x, y, z, Blocks.dirt);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,8 +8,6 @@ import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.effect.EntityNukeCloudSmall;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@ -12,6 +12,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
/**
|
||||
* For player armor
|
||||
@ -59,6 +60,10 @@ public class ArmorRecipes {
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ajr_plate, 1), new Object[] { "MPM", "TBT", "PPP", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_ajr, 'T', ModItems.gas_empty, 'B', ModItems.alloy_plate });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ajr_legs, 1), new Object[] { "MPM", "PBP", "P P", 'M', ModItems.motor_desh, 'P', ModItems.plate_armor_ajr, 'B', ModItems.alloy_legs });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.ajr_boots, 1), new Object[] { "P P", "PBP", 'P', ModItems.plate_armor_ajr, 'B', ModItems.alloy_boots });
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ajro_helmet, 1), new Object[] { ModItems.ajr_helmet, "dyeRed", "dyeBlack" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ajro_plate, 1), new Object[] { ModItems.ajr_plate, "dyeRed", "dyeBlack" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ajro_legs, 1), new Object[] { ModItems.ajr_legs, "dyeRed", "dyeBlack" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ajro_boots, 1), new Object[] { ModItems.ajr_boots, "dyeRed", "dyeBlack" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bj_helmet, 1), new Object[] { "SBS", " C ", " I ", 'S', Items.string, 'B', new ItemStack(Blocks.wool, 1, 15), 'C', ModItems.circuit_targeting_tier4, 'I', ModItems.ingot_starmetal });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bj_plate, 1), new Object[] { "N N", "MSM", "NCN", 'N', ModItems.plate_armor_lunar, 'M', ModItems.motor_desh, 'S', ModItems.starmetal_plate, 'C', ModItems.circuit_targeting_tier5 });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bj_plate_jetpack, 1), new Object[] { "NFN", "TPT", "ICI", 'N', ModItems.plate_armor_lunar, 'F', ModItems.fins_quad_titanium, 'T', new ItemStack(ModItems.fluid_tank_full, 1, FluidType.XENON.ordinal()), 'P', ModItems.bj_plate, 'I', ModItems.mp_thruster_10_xenon, 'C', ModItems.crystal_phosphorus });
|
||||
|
||||
@ -8,6 +8,7 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
@ -156,6 +157,8 @@ public class ConsumableRecipes {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.industrial_magnet, 1), new Object[] { "SMS", " B ", "SMS", 'S', "ingotSteel", 'M', ModItems.horseshoe_magnet, 'B', ModBlocks.fusion_conductor }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.heart_container, 1), new Object[] { "HAH", "ACA", "HAH", 'H', ModItems.heart_piece, 'A', "ingotAluminum", 'C', ModItems.coin_creeper }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.heart_booster, 1), new Object[] { "GHG", "MCM", "GHG", 'G', "ingotGold", 'H', ModItems.heart_container, 'M', ModItems.morning_glory, 'C', ModItems.coin_maskman }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ink, 1), new Object[] { "FPF", "PIP", "FPF", 'F', new ItemStack(Blocks.red_flower, 1, OreDictionary.WILDCARD_VALUE), 'P', ModItems.armor_polish, 'I', "dyeBlack" }));
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.bathwater_mk2, 1), new Object[] { "MWM", "WBW", "MWM", 'M', ModItems.bottle_mercury, 'W', ModItems.nuclear_waste, 'B', ModItems.bathwater });
|
||||
|
||||
//Stealth boy
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.stealth_boy, 1), new Object[] { " B", "LI", "LC", 'B', Item.getItemFromBlock(Blocks.stone_button), 'L', Items.leather, 'I', "ingotSteel", 'C', ModItems.circuit_red_copper }));
|
||||
|
||||
@ -29,6 +29,10 @@ public class MineralRecipes {
|
||||
RecipesCommon.add9To1(ModItems.ingot_dineutronium, ModBlocks.block_dineutronium);
|
||||
RecipesCommon.add1To9(ModBlocks.block_dineutronium, ModItems.ingot_dineutronium);
|
||||
|
||||
RecipesCommon.add9To1(ModItems.fallout, ModBlocks.block_fallout);
|
||||
RecipesCommon.add1To9(ModBlocks.block_fallout, ModItems.fallout);
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.fallout, 2), new Object[] { "##", '#', ModItems.fallout });
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_copper), 1), new Object[] { "###", "###", "###", '#', ModItems.ingot_copper });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_fluorite), 1), new Object[] { "###", "###", "###", '#', ModItems.fluorite });
|
||||
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.block_niter), 1), new Object[] { "###", "###", "###", '#', ModItems.niter });
|
||||
|
||||
@ -101,6 +101,16 @@ public class EntityFalloutRain extends Entity {
|
||||
if(b.getMaterial() == Material.air)
|
||||
continue;
|
||||
|
||||
if(b != ModBlocks.fallout && (worldObj.getBlock(x, y + 1, z) == Blocks.air || worldObj.getBlock(x, y + 1, z).isReplaceable(worldObj, x, y + 1, z))) {
|
||||
|
||||
double d = (double) radProgress / (double) getScale() * 0.5;
|
||||
|
||||
double chance = 0.05 - Math.pow((d - 0.6) * 0.5, 2);
|
||||
|
||||
if(chance >= rand.nextDouble() && ModBlocks.fallout.canPlaceBlockAt(worldObj, x, y + 1, z))
|
||||
worldObj.setBlock(x, y + 1, z, ModBlocks.fallout);
|
||||
}
|
||||
|
||||
if(b.isFlammable(worldObj, x, y, z, ForgeDirection.UP)) {
|
||||
if(rand.nextInt(5) == 0)
|
||||
worldObj.setBlock(x, y + 1, z, Blocks.fire);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.hbm.entity.mob;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
||||
@ -3,10 +3,11 @@ package com.hbm.entity.mob;
|
||||
import com.hbm.entity.particle.EntitySmokeFX;
|
||||
import com.hbm.entity.projectile.EntityBullet;
|
||||
import com.hbm.entity.projectile.EntityChopperMine;
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@ -5,10 +5,10 @@ import java.util.List;
|
||||
import com.hbm.entity.mob.ai.EntityAIMaskmanCasualApproach;
|
||||
import com.hbm.entity.mob.ai.EntityAIMaskmanLasergun;
|
||||
import com.hbm.entity.mob.ai.EntityAIMaskmanMinigun;
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAIHurtByTarget;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
|
||||
@ -2,12 +2,12 @@ package com.hbm.entity.mob;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@ -3,8 +3,8 @@ package com.hbm.entity.mob;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.mob.ai.EntityAITaintedCreeperSwell;
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@ -2,8 +2,8 @@ package com.hbm.entity.mob.botprime;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
@ -68,6 +68,16 @@ public class EntityEffectHandler {
|
||||
ContaminationUtil.applyRadData(entity, RadiationConfig.cont * 0.01F);
|
||||
}
|
||||
}
|
||||
|
||||
if(HbmLivingProps.getRadiation(entity) > 600 && world.getTotalWorldTime() % 600 == 0) {
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("type", "vomit");
|
||||
nbt.setInteger("entity", entity.getEntityId());
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
|
||||
|
||||
world.playSoundEffect(ix, iy, iz, "hbm:entity.vomit", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
private static void handleDigamma(EntityLivingBase entity) {
|
||||
|
||||
@ -2,62 +2,66 @@ package com.hbm.handler;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.network.play.server.S21PacketChunkData;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.gen.ChunkProviderServer;
|
||||
|
||||
public class RadiationWorldHandler {
|
||||
|
||||
|
||||
public static void handleWorldDestruction(World world) {
|
||||
|
||||
|
||||
if(!(world instanceof WorldServer))
|
||||
return;
|
||||
|
||||
|
||||
if(!RadiationConfig.worldRadEffects)
|
||||
return;
|
||||
|
||||
WorldServer serv = (WorldServer)world;
|
||||
|
||||
|
||||
WorldServer serv = (WorldServer) world;
|
||||
|
||||
RadiationSavedData data = RadiationSavedData.getData(serv);
|
||||
ChunkProviderServer provider = (ChunkProviderServer) serv.getChunkProvider();
|
||||
|
||||
int count = 50;//MainRegistry.worldRad;
|
||||
int threshold = 5;//MainRegistry.worldRadThreshold;
|
||||
|
||||
|
||||
int count = 50;// MainRegistry.worldRad;
|
||||
int threshold = 5;// MainRegistry.worldRadThreshold;
|
||||
|
||||
Object[] entries = data.contamination.entrySet().toArray();
|
||||
|
||||
|
||||
if(entries.length == 0)
|
||||
return;
|
||||
|
||||
|
||||
Entry<ChunkCoordIntPair, Float> randEnt = (Entry<ChunkCoordIntPair, Float>) entries[world.rand.nextInt(entries.length)];
|
||||
|
||||
|
||||
ChunkCoordIntPair coords = randEnt.getKey();
|
||||
|
||||
|
||||
for(int i = 0; i < 1; i++) {
|
||||
|
||||
|
||||
|
||||
if(randEnt == null || randEnt.getValue() < threshold)
|
||||
continue;
|
||||
|
||||
if(provider.chunkExists(coords.chunkXPos, coords.chunkZPos)) {
|
||||
|
||||
for(int a = 0; a < 16; a ++) {
|
||||
for(int b = 0; b < 16; b ++) {
|
||||
|
||||
if(provider.chunkExists(coords.chunkXPos, coords.chunkZPos)) {
|
||||
|
||||
for(int a = 0; a < 16; a++) {
|
||||
for(int b = 0; b < 16; b++) {
|
||||
|
||||
if(world.rand.nextInt(3) != 0)
|
||||
continue;
|
||||
|
||||
|
||||
int x = coords.getCenterXPos() - 8 + a;
|
||||
int z = coords.getCenterZPosition() - 8 + b;
|
||||
int y = world.getHeightValue(x, z) - world.rand.nextInt(2);
|
||||
|
||||
|
||||
if(world.getBlock(x, y, z) == Blocks.grass) {
|
||||
world.setBlock(x, y, z, Blocks.dirt);
|
||||
world.setBlock(x, y, z, ModBlocks.waste_earth);
|
||||
} else if(world.getBlock(x, y, z) == Blocks.tallgrass) {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
} else if(world.getBlock(x, y, z) == Blocks.leaves) {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IPartiallyFillable;
|
||||
import com.hbm.inventory.gui.GuiInfoContainer;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.armor.JetpackBase;
|
||||
import com.hbm.items.machine.ItemFluidIdentifier;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -13,6 +13,7 @@ import com.hbm.packet.TEFluidPacket;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -128,22 +129,36 @@ public class FluidTank {
|
||||
ItemStack full = null;
|
||||
if(slots[in] != null) {
|
||||
|
||||
if(slots[in].getItem() instanceof IPartiallyFillable) {
|
||||
IPartiallyFillable fillable = (IPartiallyFillable)slots[in].getItem();
|
||||
int speed = fillable.getLoadSpeed(slots[in]);
|
||||
ItemStack partial = slots[in];
|
||||
|
||||
if(partial.getItem() instanceof ItemArmor && ArmorModHandler.hasMods(partial)) {
|
||||
|
||||
if(fillable.getType(slots[in]) == this.type && speed > 0) {
|
||||
partial = ArmorModHandler.pryMods(partial)[ArmorModHandler.plate_only];
|
||||
|
||||
if(partial == null)
|
||||
return;
|
||||
}
|
||||
|
||||
if(partial.getItem() instanceof IPartiallyFillable) {
|
||||
IPartiallyFillable fillable = (IPartiallyFillable)partial.getItem();
|
||||
int speed = fillable.getLoadSpeed(partial);
|
||||
|
||||
if(fillable.getType(partial) == this.type && speed > 0) {
|
||||
|
||||
int toLoad = Math.min(this.fluid, speed);
|
||||
int fill = fillable.getFill(slots[in]);
|
||||
toLoad = Math.min(toLoad, fillable.getMaxFill(slots[in]) - fill);
|
||||
int fill = fillable.getFill(partial);
|
||||
toLoad = Math.min(toLoad, fillable.getMaxFill(partial) - fill);
|
||||
|
||||
if(toLoad > 0) {
|
||||
this.fluid -= toLoad;
|
||||
fillable.setFill(slots[in], fill + toLoad);
|
||||
fillable.setFill(partial, fill + toLoad);
|
||||
}
|
||||
}
|
||||
|
||||
if(slots[in].getItem() instanceof ItemArmor) {
|
||||
ArmorModHandler.applyMod(slots[in], partial);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -93,6 +93,51 @@ public class ContainerArmorTable extends Container {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 8) {
|
||||
if(!this.mergeItemStack(var5, 9, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
} else {
|
||||
var4.onPickupFromSlot(p_82846_1_, var5);
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var5.getItem() instanceof ItemArmor) {
|
||||
if(!this.mergeItemStack(var5, 8, 9, false))
|
||||
return null;
|
||||
|
||||
} else if(this.inventorySlots.get(8) != null && var5.getItem() instanceof ItemArmorMod) {
|
||||
|
||||
ItemArmorMod mod = (ItemArmorMod)var5.getItem();
|
||||
int slot = mod.type;
|
||||
|
||||
if(((Slot) this.inventorySlots.get(slot)).isItemValid(var5)) {
|
||||
if(!this.mergeItemStack(var5, slot, slot + 1, false))
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
|
||||
@ -11,13 +11,12 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerCrystallizer extends Container {
|
||||
|
||||
|
||||
private TileEntityMachineCrystallizer diFurnace;
|
||||
|
||||
|
||||
public ContainerCrystallizer(InventoryPlayer invPlayer, TileEntityMachineCrystallizer tedf) {
|
||||
diFurnace = tedf;
|
||||
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 80, 35));
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 8, 53));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 2, 140, 35));
|
||||
@ -25,57 +24,48 @@ public class ContainerCrystallizer extends Container {
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 4, 26, 53));
|
||||
this.addSlotToContainer(new SlotUpgrade(tedf, 5, 98, 17));
|
||||
this.addSlotToContainer(new SlotUpgrade(tedf, 6, 116, 17));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= diFurnace.getSizeInventory() - 1) {
|
||||
if (!this.mergeItemStack(var5, diFurnace.getSizeInventory(), this.inventorySlots.size(), true))
|
||||
{
|
||||
|
||||
if(par2 <= diFurnace.getSizeInventory() - 1) {
|
||||
if(!this.mergeItemStack(var5, diFurnace.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!this.mergeItemStack(var5, 0, 2, false))
|
||||
if (!this.mergeItemStack(var5, 3, 4, false))
|
||||
if (!this.mergeItemStack(var5, 5, 7, false))
|
||||
|
||||
if(!this.mergeItemStack(var5, 0, 2, false))
|
||||
if(!this.mergeItemStack(var5, 3, 4, false))
|
||||
if(!this.mergeItemStack(var5, 5, 7, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
|
||||
@ -249,6 +249,7 @@ public class ModItems {
|
||||
public static Item powder_uranium;
|
||||
public static Item powder_plutonium;
|
||||
public static Item dust;
|
||||
public static Item fallout;
|
||||
public static Item powder_power;
|
||||
|
||||
public static Item powder_thorium;
|
||||
@ -1825,6 +1826,7 @@ public class ModItems {
|
||||
public static Item bathwater;
|
||||
public static Item bathwater_mk2;
|
||||
public static Item spider_milk;
|
||||
public static Item ink;
|
||||
public static Item heart_piece;
|
||||
public static Item heart_container;
|
||||
public static Item heart_booster;
|
||||
@ -2321,6 +2323,7 @@ public class ModItems {
|
||||
powder_uranium = new ItemRadioactive(0.5F, true).setUnlocalizedName("powder_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_uranium");
|
||||
powder_plutonium = new ItemRadioactive(2.5F, true).setUnlocalizedName("powder_plutonium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_plutonium");
|
||||
dust = new ItemCustomLore().setUnlocalizedName("dust").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":dust");
|
||||
fallout = new ItemRadioactive(0.1F).setUnlocalizedName("fallout").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fallout");
|
||||
powder_advanced_alloy = new Item().setUnlocalizedName("powder_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_advanced_alloy");
|
||||
powder_coal = new Item().setUnlocalizedName("powder_coal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_coal");
|
||||
powder_combine_steel = new Item().setUnlocalizedName("powder_combine_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_combine_steel");
|
||||
@ -2746,6 +2749,7 @@ public class ModItems {
|
||||
bathwater = new ItemModBathwater().setUnlocalizedName("bathwater").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bathwater");
|
||||
bathwater_mk2 = new ItemModBathwater().setUnlocalizedName("bathwater_mk2").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bathwater_mk2");
|
||||
spider_milk = new ItemModMilk().setUnlocalizedName("spider_milk").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":spider_milk");
|
||||
ink = new ItemModInk().setUnlocalizedName("ink").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":ink");
|
||||
heart_piece = new ItemModHealth(5F).setUnlocalizedName("heart_piece").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_piece");
|
||||
heart_container = new ItemModHealth(20F).setUnlocalizedName("heart_container").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_container");
|
||||
heart_booster = new ItemModHealth(40F).setUnlocalizedName("heart_booster").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":heart_booster");
|
||||
@ -3938,12 +3942,16 @@ public class ModItems {
|
||||
fau_helmet = new ArmorDigamma(aMatFau, 7, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).setMod(0.25F).setCap(4.0F).setThreshold(2.0F)
|
||||
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1))
|
||||
.addEffect(new PotionEffect(Potion.jump.id, 20, 0))
|
||||
.setBlastProtection(0.25F)
|
||||
.setMod(0.2F)
|
||||
.setBlastProtection(0.1F)
|
||||
.setMod(0.1F)
|
||||
.setHasGeigerSound(true)
|
||||
.setHasCustomGeiger(true)
|
||||
.enableThermalSight(true)
|
||||
.setStep("hbm:step.metal")
|
||||
.setJump("hbm:step.iron_jump")
|
||||
.setFall("hbm:step.iron_land")
|
||||
.addResistance("fall", 0.5F)
|
||||
.addResistance("onFire", 0F).setUnlocalizedName("fau_helmet").setTextureName(RefStrings.MODID + ":fau_helmet");
|
||||
.setFireproof(true).setUnlocalizedName("fau_helmet").setTextureName(RefStrings.MODID + ":fau_helmet");
|
||||
fau_plate = new ArmorDigamma(aMatFau, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_plate").setTextureName(RefStrings.MODID + ":fau_plate");
|
||||
fau_legs = new ArmorDigamma(aMatFau, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_legs").setTextureName(RefStrings.MODID + ":fau_legs");
|
||||
fau_boots = new ArmorDigamma(aMatFau, 7, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) fau_helmet).setUnlocalizedName("fau_boots").setTextureName(RefStrings.MODID + ":fau_boots");
|
||||
@ -4574,6 +4582,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_dineutronium, powder_dineutronium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(redstone_depleted, redstone_depleted.getUnlocalizedName());
|
||||
GameRegistry.registerItem(dust, dust.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fallout, fallout.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_steel_tiny, powder_steel_tiny.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_lithium_tiny, powder_lithium_tiny.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_neodymium_tiny, powder_neodymium_tiny.getUnlocalizedName());
|
||||
@ -6189,6 +6198,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(bathwater, bathwater.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bathwater_mk2, bathwater_mk2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(spider_milk, spider_milk.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ink, ink.getUnlocalizedName());
|
||||
GameRegistry.registerItem(heart_piece, heart_piece.getUnlocalizedName());
|
||||
GameRegistry.registerItem(heart_container, heart_container.getUnlocalizedName());
|
||||
GameRegistry.registerItem(heart_booster, heart_booster.getUnlocalizedName());
|
||||
|
||||
@ -25,7 +25,6 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
@ -130,6 +130,8 @@ public class ArmorFSBPowered extends ArmorFSB implements IBatteryItem {
|
||||
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
|
||||
super.onArmorTick(world, player, itemStack);
|
||||
|
||||
if(this.drain > 0 && ArmorFSB.hasFSBArmor(player) && !player.capabilities.isCreativeMode) {
|
||||
this.dischargeBattery(itemStack, drain);
|
||||
}
|
||||
|
||||
48
src/main/java/com/hbm/items/armor/ItemModInk.java
Normal file
@ -0,0 +1,48 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
public class ItemModInk extends ItemArmorMod {
|
||||
|
||||
public ItemModInk() {
|
||||
super(ArmorModHandler.extra, true, true, true, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "10% chance to nullify damage");
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + "Flowers!");
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.LIGHT_PURPLE + " " + stack.getDisplayName() + " (10% chance to nullify damage)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modDamage(LivingHurtEvent event, ItemStack armor) {
|
||||
|
||||
if(event.entity.worldObj.rand.nextInt(10) == 0) {
|
||||
event.ammount = 0;
|
||||
|
||||
if(!event.entity.worldObj.isRemote) {
|
||||
|
||||
if(event.entity.worldObj.rand.nextInt(10) == 0)
|
||||
event.entity.entityDropItem(new ItemStack(Blocks.yellow_flower), 1.0F);
|
||||
|
||||
event.entity.entityDropItem(new ItemStack(Blocks.red_flower, 1, event.entity.worldObj.rand.nextInt(9)), 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (3745)";
|
||||
public static final String VERSION = "1.0.27 BETA (3766)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -1072,6 +1072,26 @@ public class ClientProxy extends ServerProxy {
|
||||
}
|
||||
}
|
||||
|
||||
if("vomit".equals(type)) {
|
||||
|
||||
Entity e = world.getEntityByID(data.getInteger("entity"));
|
||||
|
||||
if(e instanceof EntityLivingBase) {
|
||||
|
||||
double ix = e.posX;
|
||||
double iy = e.posY - e.getYOffset() + e.getEyeHeight() + 1;
|
||||
double iz = e.posZ;
|
||||
|
||||
Vec3 vec = e.getLookVec();
|
||||
|
||||
for(int i = 0; i < 25; i++) {
|
||||
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(world, ix, iy, iz, (vec.xCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.yCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.zCoord + rand.nextGaussian() * 0.2) * 0.2, Blocks.redstone_block, 0);
|
||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 150 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if("hadron".equals(type)) {
|
||||
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z));
|
||||
|
||||
@ -1052,6 +1052,10 @@ public class MainRegistry {
|
||||
HazmatRegistry.registerHazmat(ModItems.ajr_plate, 0.8F);
|
||||
HazmatRegistry.registerHazmat(ModItems.ajr_legs, 0.6F);
|
||||
HazmatRegistry.registerHazmat(ModItems.ajr_boots, 0.2F);
|
||||
HazmatRegistry.registerHazmat(ModItems.ajro_helmet, 0.4F);
|
||||
HazmatRegistry.registerHazmat(ModItems.ajro_plate, 0.8F);
|
||||
HazmatRegistry.registerHazmat(ModItems.ajro_legs, 0.6F);
|
||||
HazmatRegistry.registerHazmat(ModItems.ajro_boots, 0.2F);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.bj_helmet, 0.4F);
|
||||
HazmatRegistry.registerHazmat(ModItems.bj_plate, 0.8F);
|
||||
@ -1064,6 +1068,11 @@ public class MainRegistry {
|
||||
HazmatRegistry.registerHazmat(ModItems.hev_legs, 0.7F);
|
||||
HazmatRegistry.registerHazmat(ModItems.hev_boots, 0.3F);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.fau_helmet, 0.5F);
|
||||
HazmatRegistry.registerHazmat(ModItems.fau_plate, 1.0F);
|
||||
HazmatRegistry.registerHazmat(ModItems.fau_legs, 0.7F);
|
||||
HazmatRegistry.registerHazmat(ModItems.fau_boots, 0.3F);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.paa_plate, 0.8F);
|
||||
HazmatRegistry.registerHazmat(ModItems.paa_legs, 0.6F);
|
||||
HazmatRegistry.registerHazmat(ModItems.paa_boots, 0.2F);
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.config.MobConfig;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.entity.missile.EntityMissileBaseAdvanced;
|
||||
import com.hbm.entity.missile.EntityMissileCustom;
|
||||
import com.hbm.entity.mob.EntityCyberCrab;
|
||||
import com.hbm.entity.mob.EntityDuck;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.mob.EntityQuackos;
|
||||
@ -62,6 +63,7 @@ import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntitySpider;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.entity.passive.EntityMooshroom;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
@ -185,10 +187,20 @@ public class ModEventHandler
|
||||
event.entityLiving.dropItem(ModItems.spider_milk, 1);
|
||||
}
|
||||
|
||||
if(event.entityLiving instanceof EntityAnimal && event.entityLiving.getRNG().nextInt(5) == 0) {
|
||||
|
||||
event.entityLiving.dropItem(ModItems.bandaid, 1);
|
||||
}
|
||||
|
||||
if(event.entityLiving instanceof EntitySpider && event.entityLiving.getRNG().nextInt(1000) == 0) {
|
||||
|
||||
event.entityLiving.dropItem(ModItems.heart_piece, 1);
|
||||
}
|
||||
|
||||
if(event.entityLiving instanceof EntityCyberCrab && event.entityLiving.getRNG().nextInt(500) == 0) {
|
||||
|
||||
event.entityLiving.dropItem(ModItems.wd40, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -707,6 +719,14 @@ public class ModEventHandler
|
||||
else
|
||||
e.player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
|
||||
if(!e.player.worldObj.isRemote && e.smelting.getItem() == ModItems.ingot_uranium && e.player.getRNG().nextInt(64) == 0) {
|
||||
|
||||
if(!e.player.inventory.addItemStackToInventory(new ItemStack(ModItems.quartz_plutonium)))
|
||||
e.player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.quartz_plutonium), false);
|
||||
else
|
||||
e.player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@ -181,7 +181,7 @@ public class ModEventHandlerClient {
|
||||
ItemStack stack = player.inventory.armorInventory[2];
|
||||
|
||||
float tot = (float) ((JetpackBase)stack.getItem()).getFuel(stack) / (float) ((JetpackBase)stack.getItem()).getMaxFill(stack);
|
||||
top -= 3;
|
||||
top -= 3;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
tess.startDrawingQuads();
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -20,6 +21,7 @@ public class TileEntityDecon extends TileEntity {
|
||||
if(!entities.isEmpty()) {
|
||||
for(EntityLivingBase e : entities) {
|
||||
HbmLivingProps.incrementRadiation(e, -0.5F);
|
||||
e.removePotionEffect(HbmPotion.radiation.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -377,7 +377,8 @@ public class TileEntityMachineRadGen extends TileEntity implements ISidedInvento
|
||||
|
||||
if(item == Item.getItemFromBlock(ModBlocks.block_yellowcake)) return 1000;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.mush)) return 10;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.waste_earth)) return 25;
|
||||
if(item == ModItems.fallout) return 25;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.block_fallout)) return 250;
|
||||
if(item == Item.getItemFromBlock(ModBlocks.waste_mycelium)) return 150;
|
||||
|
||||
return 0;
|
||||
|
||||
@ -2,10 +2,10 @@ package com.hbm.util;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.HazmatRegistry;
|
||||
import com.hbm.interfaces.IRadiationImmune;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27-3735",
|
||||
"version":"1.0.27-3766",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||