mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
some fixes, infinite bounding box block
This commit is contained in:
parent
13c3250005
commit
99e01176b7
@ -52,6 +52,8 @@ public class ModBlocks {
|
||||
public static Block test_conductor;
|
||||
public static Block test_ct;
|
||||
public static Block test_rail;
|
||||
public static Block test_bb_bork;
|
||||
public static Block test_bb_inf;
|
||||
|
||||
public static Block ore_uranium;
|
||||
public static Block ore_uranium_scorched;
|
||||
@ -1251,6 +1253,8 @@ public class ModBlocks {
|
||||
test_conductor = new TestConductor(Material.iron).setBlockName("test_conductor").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":cable_neo");
|
||||
test_ct = new TestCT(Material.iron).setBlockName("test_ct").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_ct");
|
||||
test_rail = new TestRail(Material.iron).setBlockName("test_rail").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_rail");
|
||||
test_bb_bork = new TestRail(Material.iron).setBlockName("test_bb_bork").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_bb_bork");
|
||||
test_bb_inf = new TestBB(Material.iron).setBlockName("test_bb_inf").setCreativeTab(null).setHardness(2.5F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":test_bb_inf");
|
||||
|
||||
ore_uranium = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_uranium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium");
|
||||
ore_uranium_scorched = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_uranium_scorched").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_uranium_scorched");
|
||||
@ -2256,6 +2260,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(test_conductor, test_conductor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_ct, test_ct.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_rail, test_rail.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_bb_bork, test_bb_bork.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(test_bb_inf, test_bb_inf.getUnlocalizedName());
|
||||
|
||||
//Ores
|
||||
GameRegistry.registerBlock(ore_uranium, ore_uranium.getUnlocalizedName());
|
||||
|
||||
18
src/main/java/com/hbm/blocks/test/TestBB.java
Normal file
18
src/main/java/com/hbm/blocks/test/TestBB.java
Normal file
@ -0,0 +1,18 @@
|
||||
package com.hbm.blocks.test;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class TestBB extends Block {
|
||||
|
||||
public TestBB(Material mat) {
|
||||
super(mat);
|
||||
|
||||
if(this == ModBlocks.test_bb_bork)
|
||||
this.setBlockBounds(-1000F, -1000F, -1000F, 1001F, 1001F, 1001F);
|
||||
else
|
||||
this.setBlockBounds(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY);
|
||||
}
|
||||
}
|
||||
@ -78,7 +78,7 @@ public class ArmorRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ajro_boots, 1), new Object[] { ModItems.ajr_boots, KEY_RED, KEY_BLACK });
|
||||
CraftingManager.addRecipeAuto(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', STAR.ingot() });
|
||||
CraftingManager.addRecipeAuto(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 });
|
||||
CraftingManager.addRecipeAuto(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, Fluids.XENON.ordinal()), 'P', ModItems.bj_plate, 'I', ModItems.mp_thruster_10_xenon, 'C', ModItems.crystal_phosphorus });
|
||||
CraftingManager.addRecipeAuto(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, Fluids.XENON.getID()), 'P', ModItems.bj_plate, 'I', ModItems.mp_thruster_10_xenon, 'C', ModItems.crystal_phosphorus });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bj_legs, 1), new Object[] { "MBM", "NSN", "N N", 'N', ModItems.plate_armor_lunar, 'M', ModItems.motor_desh, 'S', ModItems.starmetal_legs, 'B', ModBlocks.block_starmetal });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bj_boots, 1), new Object[] { "N N", "BSB", 'N', ModItems.plate_armor_lunar, 'S', ModItems.starmetal_boots, 'B', ModBlocks.block_starmetal });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.hev_helmet, 1), new Object[] { "PPC", "PBP", "IFI", 'P', ModItems.plate_armor_hev, 'C', ModItems.circuit_targeting_tier4, 'B', ModItems.titanium_helmet, 'I', ModItems.plate_polymer, 'F', ModItems.gas_mask_filter });
|
||||
@ -97,6 +97,10 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rpa_plate, 1), new Object[] { "P P", "MLM", "PKP", 'L', DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2), 'K', ModItems.plate_kevlar, 'P', ModItems.plate_armor_ajr, 'M', ModItems.motor_desh });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rpa_legs, 1), new Object[] { "MPM", "KLK", "P P", 'L', DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2), 'K', ModItems.plate_kevlar, 'P', ModItems.plate_armor_ajr, 'M', ModItems.motor_desh });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.rpa_boots, 1), new Object[] { "KLK", "P P", 'L', DictFrame.fromOne(ModItems.parts_legendary, EnumLegendaryType.TIER2), 'K', ModItems.plate_kevlar, 'P', ModItems.plate_armor_ajr });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_helmet, 1), new Object[] { "DCD", "CXC", " F ", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_helmet, 'F', ModItems.gas_mask_filter });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_plate, 1), new Object[] { "C C", "DXD", "CFC", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_plate, 'F', ModItems.tank_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_legs, 1), new Object[] { "CCC", "DXD", "C C", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_legs, 1), new Object[] { "C C", "DXD", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_boots });
|
||||
|
||||
//Euphemium armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.euphemium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.plate_euphemium });
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.hazard.modifier;
|
||||
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.items.machine.ItemFuelRod;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
@ -27,7 +27,7 @@ public class HazardModifierRBMKRadiation extends HazardModifier {
|
||||
|
||||
} else if(stack.getItem() instanceof ItemRBMKPellet) {
|
||||
|
||||
level = level + (target - level) * (ItemRBMKPellet.rectify(stack.getItemDamage()) / 4F);
|
||||
level = level + (target - level) * ((ItemRBMKPellet.rectify(stack.getItemDamage()) % 5) / 4F);
|
||||
|
||||
if(ItemRBMKPellet.hasXenon(stack.getItemDamage()))
|
||||
level += HazardRegistry.xe135 * HazardRegistry.nugget;
|
||||
|
||||
@ -8,7 +8,9 @@ import com.hbm.items.ModItems;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
public class ItemModPads extends ItemArmorMod {
|
||||
|
||||
@ -40,6 +42,13 @@ public class ItemModPads extends ItemArmorMod {
|
||||
else
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + " " + stack.getDisplayName() + " (-" + Math.round((1F - damageMod) * 100) + "% fall dmg)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modDamage(LivingHurtEvent event, ItemStack armor) {
|
||||
|
||||
if(event.source == DamageSource.fall)
|
||||
event.ammount *= damageMod;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
|
||||
|
||||
@ -9,15 +9,11 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemRBMKPellet extends ItemNuclearWaste {
|
||||
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/blocks/test_bb_bork.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/test_bb_bork.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 191 B |
BIN
src/main/resources/assets/hbm/textures/blocks/test_bb_inf.png
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/test_bb_inf.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 197 B |
Loading…
x
Reference in New Issue
Block a user