mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
new rad method, vault sounds, loot changes, model fix, succ gm1 fix, bup
This commit is contained in:
parent
5ac33e52a1
commit
ee43614e01
@ -19,6 +19,8 @@
|
||||
"block.sonarPing": {"category": "block", "sounds": [{"name": "block/sonarPing", "stream": false}]},
|
||||
"block.reactorStart": {"category": "block", "sounds": [{"name": "block/reactorStart", "stream": false}]},
|
||||
"block.reactorStop": {"category": "block", "sounds": [{"name": "block/reactorStop", "stream": false}]},
|
||||
"block.vaultScrape": {"category": "block", "sounds": [{"name": "block/vaultScrape", "stream": false}]},
|
||||
"block.vaultThud": {"category": "block", "sounds": [{"name": "block/vaultThud", "stream": false}]},
|
||||
|
||||
"item.techBleep": {"category": "player", "sounds": [{"name": "tool/techBleep", "stream": false}]},
|
||||
"item.techBoop": {"category": "player", "sounds": [{"name": "tool/techBoop", "stream": false}]},
|
||||
|
||||
BIN
assets/hbm/sounds/block/vaultScrape.ogg
Normal file
BIN
assets/hbm/sounds/block/vaultScrape.ogg
Normal file
Binary file not shown.
BIN
assets/hbm/sounds/block/vaultThud.ogg
Normal file
BIN
assets/hbm/sounds/block/vaultThud.ogg
Normal file
Binary file not shown.
BIN
assets/hbm/textures/items/gun_rpg_ammo_alt.png
Normal file
BIN
assets/hbm/textures/items/gun_rpg_ammo_alt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 327 B |
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
@ -218,24 +218,15 @@ public class BlockOre extends Block {
|
||||
}
|
||||
if (entity instanceof EntityLivingBase && this == ModBlocks.block_trinitite)
|
||||
{
|
||||
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
|
||||
{ } else {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 45 * 20, 20));
|
||||
}
|
||||
Library.applyRadiation((EntityLivingBase)entity, 45, 19, 30, 14);
|
||||
}
|
||||
if (entity instanceof EntityLivingBase && this == ModBlocks.block_waste)
|
||||
{
|
||||
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
|
||||
{ } else {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 20));
|
||||
}
|
||||
Library.applyRadiation((EntityLivingBase)entity, 60, 19, 40, 14);
|
||||
}
|
||||
if (entity instanceof EntityLivingBase && (this == ModBlocks.waste_trinitite || this == ModBlocks.waste_trinitite_red))
|
||||
{
|
||||
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
|
||||
{ } else {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 10));
|
||||
}
|
||||
Library.applyRadiation((EntityLivingBase)entity, 30, 9, 15, 4);
|
||||
}
|
||||
|
||||
if(this == ModBlocks.block_meteor_molten)
|
||||
|
||||
@ -223,14 +223,8 @@ public class ExplosionNukeGeneric {
|
||||
d5 /= d9;
|
||||
d6 /= d9;
|
||||
d7 /= d9;
|
||||
// double d10 = (double)world.getBlockDensity(vec3,
|
||||
// entity.boundingBox);
|
||||
// if(d10 > 0) isOccupied = true;
|
||||
double d11 = (1.0D - d4);// * d10;
|
||||
if (!(entity instanceof EntityPlayerMP && ((EntityPlayerMP) entity).theItemInWorldManager.getGameType() == GameType.CREATIVE)) {
|
||||
// entity.attackEntityFrom(DamageSource.generic,
|
||||
// ((int)((d11 * d11 + d11) / 2.0D * 8.0D *
|
||||
// bombStartStrength + 1.0D)));
|
||||
|
||||
if (!(entity instanceof EntityPlayer && ((EntityPlayer) entity).capabilities.isCreativeMode)) {
|
||||
double d8 = 0.125 + (random.nextDouble() * 0.25);
|
||||
entity.motionX -= d5 * d8;
|
||||
entity.motionY -= d6 * d8;
|
||||
|
||||
@ -1894,7 +1894,7 @@ public class ModItems {
|
||||
sat_interface = new ItemSatInterface().setUnlocalizedName("sat_interface").setMaxStackSize(1).setCreativeTab(MainRegistry.missileTab).setTextureName(RefStrings.MODID + ":sat_interface");
|
||||
|
||||
gun_rpg = new GunRpg().setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_new");
|
||||
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_new");
|
||||
gun_rpg_ammo = new Item().setUnlocalizedName("gun_rpg_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg_ammo_alt");
|
||||
gun_stinger = new GunStinger().setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
|
||||
gun_skystinger = new GunStinger().setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
|
||||
gun_stinger_ammo = new Item().setUnlocalizedName("gun_stinger_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger_ammo");
|
||||
|
||||
@ -44,7 +44,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.pellet_mes ||
|
||||
this == ModItems.pellet_neptunium ||
|
||||
this == ModItems.pellet_schrabidium) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25));
|
||||
Library.applyRadiation(living, 80, 24, 60, 19);
|
||||
}
|
||||
|
||||
//Strong
|
||||
@ -78,7 +78,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.gadget_core ||
|
||||
this == ModItems.man_core ||
|
||||
this == ModItems.nuclear_waste) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 20));
|
||||
Library.applyRadiation(living, 60, 19, 40, 14);
|
||||
}
|
||||
|
||||
//Strong Nuggets
|
||||
@ -98,7 +98,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.rod_uranium_fuel_depleted ||
|
||||
this == ModItems.rod_plutonium_fuel_depleted ||
|
||||
this == ModItems.rod_mox_fuel_depleted) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 45 * 20, 20));
|
||||
Library.applyRadiation(living, 45, 19, 30, 14);
|
||||
}
|
||||
|
||||
//Medium
|
||||
@ -116,7 +116,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.mike_core ||
|
||||
this == ModItems.tsar_core ||
|
||||
this == ModItems.trinitite) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 15));
|
||||
Library.applyRadiation(living, 30, 14, 15, 9);
|
||||
}
|
||||
|
||||
//Medium Nuggets
|
||||
@ -128,7 +128,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.rod_pu238 ||
|
||||
this == ModItems.rod_plutonium ||
|
||||
this == ModItems.pellet_rtg_weak) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 20 * 20, 15));
|
||||
Library.applyRadiation(living, 20, 14, 5, 9);
|
||||
}
|
||||
|
||||
//Weak
|
||||
@ -141,7 +141,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.rod_dual_u238 ||
|
||||
this == ModItems.rod_quad_pu238 ||
|
||||
this == ModItems.rod_dual_pu238) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 20 * 20, 5));
|
||||
Library.applyRadiation(living, 20, 4, 5, 0);
|
||||
}
|
||||
|
||||
//Weak Nuggets
|
||||
@ -150,24 +150,29 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.nugget_u238 ||
|
||||
this == ModItems.rod_uranium ||
|
||||
this == ModItems.rod_u238 ||
|
||||
this == ModItems.cell_tritium ||
|
||||
this == ModItems.powder_yellowcake) {
|
||||
Library.applyRadiation(living, 10, 4, 0, 0);
|
||||
}
|
||||
|
||||
//Tritium
|
||||
|
||||
if (this == ModItems.cell_tritium ||
|
||||
this == ModItems.rod_tritium ||
|
||||
this == ModItems.rod_dual_tritium ||
|
||||
this == ModItems.rod_quad_tritium ||
|
||||
this == ModItems.powder_yellowcake) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 10 * 20, 5));
|
||||
this == ModItems.rod_quad_tritium) {
|
||||
Library.applyRadiation(living, 10, 4, 0, 0);
|
||||
}
|
||||
|
||||
//Powder
|
||||
|
||||
if (this == ModItems.powder_neptunium ||
|
||||
this == ModItems.powder_plutonium) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 60 * 20, 20));
|
||||
Library.applyRadiation(living, 60, 19, 45, 14);
|
||||
living.setFire(5);
|
||||
}
|
||||
|
||||
if (this == ModItems.powder_uranium) {
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 20 * 20, 5));
|
||||
Library.applyRadiation(living, 20, 4, 0, 0);
|
||||
living.setFire(5);
|
||||
}
|
||||
|
||||
@ -191,7 +196,7 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.rod_dual_schrabidium_fuel ||
|
||||
this == ModItems.rod_quad_schrabidium_fuel) {
|
||||
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 100 * 20, 30));
|
||||
Library.applyRadiation(living, 100, 29, 75, 24);
|
||||
}
|
||||
|
||||
if (this == ModItems.nugget_schrabidium ||
|
||||
@ -200,18 +205,18 @@ public class ItemRadioactive extends Item {
|
||||
this == ModItems.nugget_hes ||
|
||||
this == ModItems.nugget_les) {
|
||||
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 75 * 20, 30));
|
||||
Library.applyRadiation(living, 75, 29, 60, 24);
|
||||
}
|
||||
|
||||
if (this == ModItems.plate_schrabidium ||
|
||||
this == ModItems.wire_schrabidium) {
|
||||
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 30));
|
||||
Library.applyRadiation(living, 80, 29, 60, 24);
|
||||
}
|
||||
|
||||
if (this == ModItems.powder_schrabidium) {
|
||||
living.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 20, 0));
|
||||
living.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 100 * 20, 30));
|
||||
Library.applyRadiation(living, 100, 29, 75, 24);
|
||||
living.setFire(5);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
|
||||
@ -13,60 +14,83 @@ public class HbmChestContents {
|
||||
static Random rand = new Random();
|
||||
|
||||
private static WeightedRandomChestContent[] modGeneric = new WeightedRandomChestContent[] {
|
||||
new WeightedRandomChestContent(ModItems.ingot_steel, 0, 10, 15, 5),
|
||||
new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 5, 10, 3),
|
||||
new WeightedRandomChestContent(ModItems.ingot_tungsten, 0, 5, 15, 3),
|
||||
new WeightedRandomChestContent(ModItems.ingot_beryllium, 0, 1, 5, 2),
|
||||
new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 7, 10, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_ammo, 0, 2, 6, 2),
|
||||
new WeightedRandomChestContent(Items.bread, 0, 1, 5, 8),
|
||||
new WeightedRandomChestContent(Items.iron_ingot, 0, 2, 6, 10),
|
||||
new WeightedRandomChestContent(ModItems.ingot_steel, 0, 2, 5, 7),
|
||||
new WeightedRandomChestContent(ModItems.ingot_beryllium, 0, 1, 2, 4),
|
||||
new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_aluminium, 0, 1, 2, 7),
|
||||
new WeightedRandomChestContent(ModItems.circuit_targeting_tier1, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_ammo, 0, 2, 6, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_lever_action, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_lever_action_ammo, 0, 2, 6, 3),
|
||||
new WeightedRandomChestContent(ModItems.battery_generic, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_titanium), 0, 0, 3, 1) };
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.scrap, 0, 1, 3, 10),
|
||||
new WeightedRandomChestContent(ModItems.dust, 0, 2, 4, 9),
|
||||
new WeightedRandomChestContent(ModItems.bottle_opener, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 4),
|
||||
new WeightedRandomChestContent(ModItems.bottle_cherry, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.cap_nuka, 0, 1, 15, 7),
|
||||
new WeightedRandomChestContent(ModItems.canister_fuel, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.canister_biofuel, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 2) };
|
||||
|
||||
private static WeightedRandomChestContent[] antenna = new WeightedRandomChestContent[] {
|
||||
new WeightedRandomChestContent(ModItems.ingot_steel, 0, 3, 7, 5),
|
||||
new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 3, 10, 3),
|
||||
new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 3, 5, 4),
|
||||
new WeightedRandomChestContent(ModItems.wire_red_copper, 0, 3, 7, 4),
|
||||
new WeightedRandomChestContent(ModItems.circuit_aluminium, 0, 1, 5, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_copper, 0, 1, 3, 2),
|
||||
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.battery_generic, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.ingot_steel, 0, 1, 2, 7),
|
||||
new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.ingot_titanium, 0, 1, 3, 5),
|
||||
new WeightedRandomChestContent(ModItems.wire_red_copper, 0, 2, 3, 7),
|
||||
new WeightedRandomChestContent(ModItems.circuit_aluminium, 0, 1, 3, 6),
|
||||
new WeightedRandomChestContent(ModItems.circuit_targeting_tier1, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.circuit_copper, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.battery_generic, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.powder_iodine, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.powder_bromine, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.block_titanium), 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_poles), 0, 4, 9, 5),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_scaffold), 0, 4, 6, 3),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_top), 0, 2, 4, 4),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_satellite_receiver), 0, 3, 5, 3) };
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_poles), 0, 1, 4, 8),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.steel_scaffold), 0, 1, 3, 8),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_top), 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.pole_satellite_receiver), 0, 1, 1, 7),
|
||||
new WeightedRandomChestContent(ModItems.scrap, 0, 1, 3, 10),
|
||||
new WeightedRandomChestContent(ModItems.dust, 0, 2, 4, 9),
|
||||
new WeightedRandomChestContent(ModItems.bottle_opener, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 4),
|
||||
new WeightedRandomChestContent(ModItems.bottle_cherry, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.cap_nuka, 0, 1, 15, 7) };
|
||||
|
||||
private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] {
|
||||
new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.circuit_targeting_tier3, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_schrabidium, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.nuke_starter_kit, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.nuke_commercially_kit, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.nuke_electric_kit, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.circuit_targeting_tier4, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_lever_action, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_lever_action_ammo, 0, 2, 6, 6),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_gold, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_gold_ammo, 0, 1, 6, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_lead, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_lead_ammo, 0, 1, 6, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 32, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_rpg_ammo, 0, 1, 4, 5),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 8, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_xvl1456, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_xvl1456_ammo, 0, 16, 64, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced_cell, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.battery_schrabidium, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.syringe_awesome, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 3, 1) };
|
||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 6),
|
||||
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 1, 6),
|
||||
new WeightedRandomChestContent(ModItems.canister_fuel, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.canister_biofuel, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 5) };
|
||||
|
||||
private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] {
|
||||
new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5),
|
||||
@ -79,6 +103,8 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.rod_dual_pu240, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.rod_quad_u238, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.rod_quad_pu240, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 5),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 1, 2) };
|
||||
|
||||
private static WeightedRandomChestContent[] nuclear = new WeightedRandomChestContent[] {
|
||||
@ -105,6 +131,8 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.powder_neptunium, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.powder_strontium, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.powder_cobalt, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 5),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 3, 3) };
|
||||
|
||||
private static WeightedRandomChestContent[] vertibird = new WeightedRandomChestContent[] {
|
||||
@ -112,9 +140,8 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.t45_plate, 0, 1, 1, 15),
|
||||
new WeightedRandomChestContent(ModItems.t45_legs, 0, 1, 1, 15),
|
||||
new WeightedRandomChestContent(ModItems.t45_boots, 0, 1, 1, 15),
|
||||
new WeightedRandomChestContent(ModItems.t45_kit, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.fusion_core, 0, 1, 1, 10),
|
||||
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_ammo, 0, 1, 24, 4),
|
||||
new WeightedRandomChestContent(ModItems.gun_rpg, 0, 1, 1, 3),
|
||||
@ -122,9 +149,13 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.rod_uranium_fuel, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.rod_dual_uranium_fuel, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.rod_quad_uranium_fuel, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman_ammo, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.gun_fatman, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 6),
|
||||
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 7),
|
||||
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 2, 2) };
|
||||
|
||||
private static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] {
|
||||
@ -134,17 +165,8 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.missile_buster, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.missile_strong, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.missile_incendiary_strong, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.missile_cluster_strong, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.missile_buster_strong, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.missile_burst, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.missile_inferno, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.missile_rain, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.missile_drill, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.missile_nuclear, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.missile_nuclear_cluster, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.missile_endo, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.missile_exo, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.launch_pad), 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.designator, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 1),
|
||||
@ -153,7 +175,9 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.thruster_large, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.fuel_tank_medium, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5) };
|
||||
new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.warhead_mirvlet, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.warhead_nuclear, 0, 1, 1, 1) };
|
||||
|
||||
private static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] {
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5),
|
||||
|
||||
@ -25,6 +25,7 @@ import com.hbm.interfaces.ISource;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.tileentity.conductor.TileEntityCable;
|
||||
import com.hbm.tileentity.conductor.TileEntityFluidDuct;
|
||||
import com.hbm.tileentity.conductor.TileEntityGasDuct;
|
||||
@ -44,6 +45,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -215,13 +217,38 @@ public class Library {
|
||||
}
|
||||
}
|
||||
|
||||
//radDura: Radiation duration in seconds
|
||||
//radLevel: Radiation level (0 = I)
|
||||
//maskDura: Radiation duration when wearing gasmask
|
||||
//maskLevel: Radiation level when wearing gasmask
|
||||
public static void applyRadiation(Entity e, int radDura, int radLevel, int maskDura, int maskLevel) {
|
||||
|
||||
if(!(e instanceof EntityLivingBase))
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase)e;
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
|
||||
if(checkForHazmat(player))
|
||||
return;
|
||||
|
||||
if(checkForGasMask(player)) {
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, maskDura * 60, maskLevel));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
entity.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, radDura * 60, radLevel));
|
||||
}
|
||||
|
||||
public static boolean checkForHazmat(EntityPlayer player) {
|
||||
|
||||
if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) ||
|
||||
checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots) ||
|
||||
checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots) ||
|
||||
checkArmor(player, ModItems.schrabidium_helmet, ModItems.schrabidium_plate, ModItems.schrabidium_legs, ModItems.schrabidium_boots) ||
|
||||
checkArmor(player, ModItems.hazmat_paa_helmet, ModItems.hazmat_paa_plate, ModItems.hazmat_paa_legs, ModItems.hazmat_paa_boots))
|
||||
checkForHaz2(player))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -231,7 +258,8 @@ public class Library {
|
||||
|
||||
public static boolean checkForHaz2(EntityPlayer player) {
|
||||
|
||||
if(checkArmor(player, ModItems.hazmat_paa_helmet, ModItems.hazmat_paa_plate, ModItems.hazmat_paa_legs, ModItems.hazmat_paa_boots))
|
||||
if(checkArmor(player, ModItems.hazmat_paa_helmet, ModItems.hazmat_paa_plate, ModItems.hazmat_paa_legs, ModItems.hazmat_paa_boots) ||
|
||||
checkArmor(player, ModItems.euphemium_helmet, ModItems.euphemium_plate, ModItems.euphemium_legs, ModItems.euphemium_boots))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -263,6 +291,10 @@ public class Library {
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.gas_mask_m65, 3))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if(checkArmorPiece(player, ModItems.t45_helmet, 3))
|
||||
{
|
||||
return true;
|
||||
|
||||
@ -1040,6 +1040,7 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.goggles, 1), new Object[] { "P P", "GPG", 'G', "paneGlass", 'P', "plateSteel" }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask, 1), new Object[] { "PPP", "GPG", "FPF", 'G', "paneGlass", 'P', "plateSteel", 'F', ModItems.filter_coal }));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.gas_mask_m65, 1), new Object[] { "PPP", "GPG", "FIF", 'G', "paneGlass", 'P', ModItems.plate_polymer, 'F', ModItems.filter_coal, 'I', "plateIron" }));
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cape_radiation, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 11), 'D', new ItemStack(Items.dye, 1, 11), 'I', ModItems.nuclear_waste });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.cape_gasmask, 1), new Object[] { "W W", "WIW", "WDW", 'W', new ItemStack(Item.getItemFromBlock(Blocks.wool), 1, 4), 'D', new ItemStack(Items.dye, 1, 0), 'I', ModItems.gas_mask });
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.entity.missile.EntityMissileBaseAdvanced;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.entity.projectile.EntityMeteor;
|
||||
@ -15,21 +17,26 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.entity.passive.EntityMooshroom;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.entity.EntityEvent.EnteringChunk;
|
||||
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
|
||||
|
||||
public class ModEventHandler
|
||||
{
|
||||
public static boolean showMessage = true;
|
||||
public static int meteorShower = 0;
|
||||
static Random rand = new Random();
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) {
|
||||
@ -41,6 +48,44 @@ public class ModEventHandler
|
||||
showMessage = !showMessage;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void spawnMob(LivingSpawnEvent event) {
|
||||
EntityLivingBase entity = event.entityLiving;
|
||||
World world = event.world;
|
||||
|
||||
if(entity instanceof EntityZombie) {
|
||||
if(rand.nextInt(64) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(256) == 0)
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.mask_of_infamy, 1, world.rand.nextInt(100)));
|
||||
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.pipe_lead, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.reer_graar, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.pipe_rusty, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.crowbar, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(128) == 0)
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.big_sword, 1, world.rand.nextInt(100)));
|
||||
if(rand.nextInt(256) == 0)
|
||||
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.steel_pickaxe, 1, world.rand.nextInt(300)));
|
||||
}
|
||||
if(entity instanceof EntitySkeleton) {
|
||||
if(rand.nextInt(16) == 0) {
|
||||
entity.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65, 1, world.rand.nextInt(100)));
|
||||
|
||||
if(rand.nextInt(32) == 0) {
|
||||
entity.setCurrentItemOrArmor(0, new ItemStack(ModItems.syringe_poison));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void worldTick(WorldTickEvent event) {
|
||||
|
||||
@ -125,7 +170,7 @@ public class ModEventHandler
|
||||
|
||||
int level = effect.getAmplifier();
|
||||
|
||||
if(level > 15) {
|
||||
if(level > 14) {
|
||||
if(event.world.rand.nextInt(100) == 0)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0));
|
||||
if(event.world.rand.nextInt(300) == 0)
|
||||
@ -136,7 +181,7 @@ public class ModEventHandler
|
||||
entity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 5 * 20, 2));
|
||||
if(event.world.rand.nextInt(500) == 0)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.wither.id, 3 * 20, 4));
|
||||
} else if(level > 10) {
|
||||
} else if(level > 9) {
|
||||
if(event.world.rand.nextInt(150) == 0)
|
||||
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 5 * 20, 0));
|
||||
if(event.world.rand.nextInt(400) == 0)
|
||||
|
||||
@ -80,12 +80,16 @@ public class ModelGasMask extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.mask.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.mask.rotationPointY = this.bipedHead.rotationPointY;
|
||||
|
||||
@ -4,11 +4,6 @@
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -18,114 +13,109 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class ModelGoggles extends ModelBiped
|
||||
{
|
||||
//fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer google;
|
||||
|
||||
public ModelGoggles()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
google = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 9, 3, 1);
|
||||
Shape1.setRotationPoint(-4.5F, -3F - 2, -4.5F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 0, 4);
|
||||
Shape2.addBox(0F, 0F, 0F, 9, 2, 5);
|
||||
Shape2.setRotationPoint(-4.5F, -3F - 2, -3.5F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape2);
|
||||
Shape5 = new ModelRenderer(this, 26, 0);
|
||||
Shape5.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Shape5.setRotationPoint(1F, -2.5F - 2, -5F);
|
||||
Shape5.setTextureSize(64, 32);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape5);
|
||||
Shape6 = new ModelRenderer(this, 20, 0);
|
||||
Shape6.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Shape6.setRotationPoint(-3F, -2.5F - 2, -5F);
|
||||
Shape6.setTextureSize(64, 32);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape6);
|
||||
Shape7 = new ModelRenderer(this, 0, 11);
|
||||
Shape7.addBox(0F, 0F, 0F, 9, 1, 4);
|
||||
Shape7.setRotationPoint(-4.5F, -3F - 2, 0.5F);
|
||||
Shape7.setTextureSize(64, 32);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape7);
|
||||
}
|
||||
|
||||
/*public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
Shape7.render(f5);
|
||||
}*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
if(player.isSneaking())
|
||||
{
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.google.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.google.rotationPointY = this.bipedHead.rotationPointY;
|
||||
this.google.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.google.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
this.google.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public class ModelGoggles extends ModelBiped {
|
||||
// fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer google;
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild)
|
||||
{
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
public ModelGoggles() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
google = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 9, 3, 1);
|
||||
Shape1.setRotationPoint(-4.5F, -3F - 2, -4.5F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 0, 4);
|
||||
Shape2.addBox(0F, 0F, 0F, 9, 2, 5);
|
||||
Shape2.setRotationPoint(-4.5F, -3F - 2, -3.5F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape2);
|
||||
Shape5 = new ModelRenderer(this, 26, 0);
|
||||
Shape5.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Shape5.setRotationPoint(1F, -2.5F - 2, -5F);
|
||||
Shape5.setTextureSize(64, 32);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape5);
|
||||
Shape6 = new ModelRenderer(this, 20, 0);
|
||||
Shape6.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Shape6.setRotationPoint(-3F, -2.5F - 2, -5F);
|
||||
Shape6.setTextureSize(64, 32);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape6);
|
||||
Shape7 = new ModelRenderer(this, 0, 11);
|
||||
Shape7.addBox(0F, 0F, 0F, 9, 1, 4);
|
||||
Shape7.setRotationPoint(-4.5F, -3F - 2, 0.5F);
|
||||
Shape7.setTextureSize(64, 32);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 0F, 0F, 0F);
|
||||
convertToChild(google, Shape7);
|
||||
}
|
||||
|
||||
/*
|
||||
* public void render(Entity entity, float f, float f1, float f2, float f3,
|
||||
* float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
* setRotationAngles(f, f1, f2, f3, f4, f5, entity); Shape1.render(f5);
|
||||
* Shape2.render(f5); Shape5.render(f5); Shape6.render(f5);
|
||||
* Shape7.render(f5); }
|
||||
*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.google.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.google.rotationPointY = this.bipedHead.rotationPointY;
|
||||
this.google.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.google.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
this.google.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) {
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
|
||||
}
|
||||
@ -107,11 +107,14 @@ public class ModelM65 extends ModelBiped {
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
}
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.mask.rotationPointX = this.bipedHead.rotationPointX;
|
||||
|
||||
@ -4,11 +4,6 @@
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -18,131 +13,124 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class ModelT45Boots extends ModelBiped
|
||||
{
|
||||
//fields
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
|
||||
public ModelT45Boots()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
public class ModelT45Boots extends ModelBiped {
|
||||
// fields
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
|
||||
leftleg = new ModelRenderer(this, 0, 0);
|
||||
rightleg = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 4, 2, 6);
|
||||
Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 0, 8);
|
||||
Shape2.addBox(0F, 0F, 0F, 4, 2, 6);
|
||||
Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape2);
|
||||
Shape3 = new ModelRenderer(this, 0, 16);
|
||||
Shape3.addBox(0F, -1F, 0F, 4, 2, 4);
|
||||
Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0.2617994F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape3);
|
||||
Shape4 = new ModelRenderer(this, 0, 22);
|
||||
Shape4.addBox(0F, -1F, 0F, 4, 2, 4);
|
||||
Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
|
||||
Shape4.setTextureSize(64, 32);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0.2617994F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape4);
|
||||
}
|
||||
|
||||
/*public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
}*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
if(player.isSneaking())
|
||||
{
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX;
|
||||
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
|
||||
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
|
||||
this.leftleg.rotateAngleX = this.bipedLeftLeg.rotateAngleX;
|
||||
this.leftleg.rotateAngleY = this.bipedLeftLeg.rotateAngleY;
|
||||
this.leftleg.rotateAngleZ = this.bipedLeftLeg.rotateAngleZ;
|
||||
this.rightleg.rotationPointX = this.bipedRightLeg.rotationPointX;
|
||||
this.rightleg.rotationPointY = this.bipedRightLeg.rotationPointY - 1.5F;
|
||||
this.rightleg.rotationPointZ = this.bipedRightLeg.rotationPointZ;
|
||||
this.rightleg.rotateAngleX = this.bipedRightLeg.rotateAngleX;
|
||||
this.rightleg.rotateAngleY = this.bipedRightLeg.rotateAngleY;
|
||||
this.rightleg.rotateAngleZ = this.bipedRightLeg.rotateAngleZ;
|
||||
|
||||
if(this.isSneak)
|
||||
{
|
||||
this.leftleg.rotationPointZ -= 0.5F;
|
||||
this.rightleg.rotationPointZ -= 0.5F;
|
||||
this.leftleg.rotationPointY += 0.5F;
|
||||
this.rightleg.rotationPointY += 0.5F;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
//this.leftleg.addChild(Shape1);
|
||||
//this.leftleg.addChild(Shape3);
|
||||
this.leftleg.render(par7);
|
||||
|
||||
//this.rightleg.addChild(Shape2);
|
||||
//this.rightleg.addChild(Shape4);
|
||||
this.rightleg.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild)
|
||||
{
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
public ModelT45Boots() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
leftleg = new ModelRenderer(this, 0, 0);
|
||||
rightleg = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 4, 2, 6);
|
||||
Shape1.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 0, 8);
|
||||
Shape2.addBox(0F, 0F, 0F, 4, 2, 6);
|
||||
Shape2.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape2);
|
||||
Shape3 = new ModelRenderer(this, 0, 16);
|
||||
Shape3.addBox(0F, -1F, 0F, 4, 2, 4);
|
||||
Shape3.setRotationPoint(-4F + 2, 0F + 9.5F, -4F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0.2617994F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape3);
|
||||
Shape4 = new ModelRenderer(this, 0, 22);
|
||||
Shape4.addBox(0F, -1F, 0F, 4, 2, 4);
|
||||
Shape4.setRotationPoint(0F - 2, 0F + 9.5F, -4F);
|
||||
Shape4.setTextureSize(64, 32);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0.2617994F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape4);
|
||||
}
|
||||
|
||||
/*
|
||||
* public void render(Entity entity, float f, float f1, float f2, float f3,
|
||||
* float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
* setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5);
|
||||
* Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); }
|
||||
*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX;
|
||||
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
|
||||
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
|
||||
this.leftleg.rotateAngleX = this.bipedLeftLeg.rotateAngleX;
|
||||
this.leftleg.rotateAngleY = this.bipedLeftLeg.rotateAngleY;
|
||||
this.leftleg.rotateAngleZ = this.bipedLeftLeg.rotateAngleZ;
|
||||
this.rightleg.rotationPointX = this.bipedRightLeg.rotationPointX;
|
||||
this.rightleg.rotationPointY = this.bipedRightLeg.rotationPointY - 1.5F;
|
||||
this.rightleg.rotationPointZ = this.bipedRightLeg.rotationPointZ;
|
||||
this.rightleg.rotateAngleX = this.bipedRightLeg.rotateAngleX;
|
||||
this.rightleg.rotateAngleY = this.bipedRightLeg.rotateAngleY;
|
||||
this.rightleg.rotateAngleZ = this.bipedRightLeg.rotateAngleZ;
|
||||
|
||||
if (this.isSneak) {
|
||||
this.leftleg.rotationPointZ -= 0.5F;
|
||||
this.rightleg.rotationPointZ -= 0.5F;
|
||||
this.leftleg.rotationPointY += 0.5F;
|
||||
this.rightleg.rotationPointY += 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
// this.leftleg.addChild(Shape1);
|
||||
// this.leftleg.addChild(Shape3);
|
||||
this.leftleg.render(par7);
|
||||
|
||||
// this.rightleg.addChild(Shape2);
|
||||
// this.rightleg.addChild(Shape4);
|
||||
this.rightleg.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) {
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,9 @@ import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityPigZombie;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -243,6 +246,11 @@ public class ModelT45Chest extends ModelBiped {
|
||||
this.rightarm.rotateAngleX = this.bipedRightArm.rotateAngleX;
|
||||
this.rightarm.rotateAngleY = this.bipedRightArm.rotateAngleY;
|
||||
this.rightarm.rotateAngleZ = this.bipedRightArm.rotateAngleZ;
|
||||
|
||||
if(entity instanceof EntityZombie || entity instanceof EntityPigZombie || entity instanceof EntitySkeleton) {
|
||||
this.leftarm.rotateAngleX -= (90 * Math.PI / 180D);
|
||||
this.rightarm.rotateAngleX -= (90 * Math.PI / 180D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -4,11 +4,6 @@
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -18,145 +13,136 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class ModelT45Helmet extends ModelBiped
|
||||
{
|
||||
//fields
|
||||
ModelRenderer helmet;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
|
||||
public ModelT45Helmet()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
public class ModelT45Helmet extends ModelBiped {
|
||||
// fields
|
||||
ModelRenderer helmet;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
|
||||
helmet = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
|
||||
Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 32, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape2);
|
||||
Shape3 = new ModelRenderer(this, 40, 6);
|
||||
Shape3.addBox(0F, 0F, 0F, 1, 1, 4);
|
||||
Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape3);
|
||||
Shape4 = new ModelRenderer(this, 40, 0);
|
||||
Shape4.addBox(0F, 0F, 0F, 4, 2, 2);
|
||||
Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F);
|
||||
Shape4.setTextureSize(64, 32);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape4);
|
||||
Shape5 = new ModelRenderer(this, 54, 0);
|
||||
Shape5.addBox(0F, 2F, 0F, 2, 1, 2);
|
||||
Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F);
|
||||
Shape5.setTextureSize(64, 32);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape5);
|
||||
Shape6 = new ModelRenderer(this, 0, 16);
|
||||
Shape6.addBox(0F, 0F, 0F, 10, 1, 9);
|
||||
Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F);
|
||||
Shape6.setTextureSize(64, 32);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape6);
|
||||
Shape7 = new ModelRenderer(this, 32, 7);
|
||||
Shape7.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F);
|
||||
Shape7.setTextureSize(64, 32);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape7);
|
||||
Shape8 = new ModelRenderer(this, 32, 5);
|
||||
Shape8.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F);
|
||||
Shape8.setTextureSize(64, 32);
|
||||
Shape8.mirror = true;
|
||||
setRotation(Shape8, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape8);
|
||||
}
|
||||
|
||||
/*public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
Shape7.render(f5);
|
||||
Shape8.render(f5);
|
||||
}*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
if(player.isSneaking())
|
||||
{
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.helmet.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.helmet.rotationPointY = this.bipedHead.rotationPointY;
|
||||
this.helmet.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.helmet.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
GL11.glScalef(1.0625F, 1.0625F, 1.0625F);
|
||||
this.helmet.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public ModelT45Helmet() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild)
|
||||
{
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
helmet = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 8, 8, 8);
|
||||
Shape1.setRotationPoint(-4F, 0F - 8 + 0.0625F / 2, -4F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 32, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 2, 2, 1);
|
||||
Shape2.setRotationPoint(1F, 1F - 8 + 0.0625F / 2 + 1, -5F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape2);
|
||||
Shape3 = new ModelRenderer(this, 40, 6);
|
||||
Shape3.addBox(0F, 0F, 0F, 1, 1, 4);
|
||||
Shape3.setRotationPoint(-5F, 1F - 8 + 0.0625F / 2, -5.466667F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape3);
|
||||
Shape4 = new ModelRenderer(this, 40, 0);
|
||||
Shape4.addBox(0F, 0F, 0F, 4, 2, 2);
|
||||
Shape4.setRotationPoint(-2F, 5F - 8 + 0.0625F / 2, -4F);
|
||||
Shape4.setTextureSize(64, 32);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape4);
|
||||
Shape5 = new ModelRenderer(this, 54, 0);
|
||||
Shape5.addBox(0F, 2F, 0F, 2, 1, 2);
|
||||
Shape5.setRotationPoint(-1F, 5F - 8 + 0.0625F / 2, -4F);
|
||||
Shape5.setTextureSize(64, 32);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape5);
|
||||
Shape6 = new ModelRenderer(this, 0, 16);
|
||||
Shape6.addBox(0F, 0F, 0F, 10, 1, 9);
|
||||
Shape6.setRotationPoint(-5F, 6F - 8 + 0.0625F / 2, -4.5F);
|
||||
Shape6.setTextureSize(64, 32);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
convertToChild(helmet, Shape6);
|
||||
Shape7 = new ModelRenderer(this, 32, 7);
|
||||
Shape7.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape7.setRotationPoint(-1.5F, 5F - 8 + 0.0625F / 2, -4.5F);
|
||||
Shape7.setTextureSize(64, 32);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape7);
|
||||
Shape8 = new ModelRenderer(this, 32, 5);
|
||||
Shape8.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape8.setRotationPoint(0.5F, 5F - 8 + 0.0625F / 2, -4.5F);
|
||||
Shape8.setTextureSize(64, 32);
|
||||
Shape8.mirror = true;
|
||||
setRotation(Shape8, -0.7853982F, 0F, 0F);
|
||||
convertToChild(helmet, Shape8);
|
||||
}
|
||||
|
||||
/*
|
||||
* public void render(Entity entity, float f, float f1, float f2, float f3,
|
||||
* float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
* setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5);
|
||||
* Shape2.render(f5); Shape3.render(f5); Shape4.render(f5);
|
||||
* Shape5.render(f5); Shape6.render(f5); Shape7.render(f5);
|
||||
* Shape8.render(f5); }
|
||||
*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.helmet.rotationPointX = this.bipedHead.rotationPointX;
|
||||
this.helmet.rotationPointY = this.bipedHead.rotationPointY;
|
||||
this.helmet.rotateAngleY = this.bipedHead.rotateAngleY;
|
||||
this.helmet.rotateAngleX = this.bipedHead.rotateAngleX;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
GL11.glScalef(1.0625F, 1.0625F, 1.0625F);
|
||||
this.helmet.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) {
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
|
||||
}
|
||||
@ -4,11 +4,6 @@
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -18,146 +13,137 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class ModelT45Legs extends ModelBiped
|
||||
{
|
||||
//fields
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
|
||||
public ModelT45Legs()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
public class ModelT45Legs extends ModelBiped {
|
||||
// fields
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
|
||||
leftleg = new ModelRenderer(this, 0, 0);
|
||||
rightleg = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 16, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape2);
|
||||
Shape3 = new ModelRenderer(this, 0, 16);
|
||||
Shape3.addBox(0F, -6F, 0F, 5, 6, 4);
|
||||
Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0.1745329F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape3);
|
||||
Shape4 = new ModelRenderer(this, 18, 16);
|
||||
Shape4.addBox(0F, -6F, 0F, 5, 6, 4);
|
||||
Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F);
|
||||
Shape4.setTextureSize(64, 32);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0.1745329F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape4);
|
||||
Shape5 = new ModelRenderer(this, 34, 0);
|
||||
Shape5.addBox(0F, 0F, 0F, 5, 2, 4);
|
||||
Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F);
|
||||
Shape5.setTextureSize(64, 32);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape5);
|
||||
Shape6 = new ModelRenderer(this, 34, 8);
|
||||
Shape6.addBox(0F, 0F, 0F, 5, 2, 4);
|
||||
Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F);
|
||||
Shape6.setTextureSize(64, 32);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape6);
|
||||
}
|
||||
|
||||
/*public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
}*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
public ModelT45Legs() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
if(player.isSneaking())
|
||||
{
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX;
|
||||
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
|
||||
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
|
||||
this.leftleg.rotateAngleX = this.bipedLeftLeg.rotateAngleX;
|
||||
this.leftleg.rotateAngleY = this.bipedLeftLeg.rotateAngleY;
|
||||
this.leftleg.rotateAngleZ = this.bipedLeftLeg.rotateAngleZ;
|
||||
this.rightleg.rotationPointX = this.bipedRightLeg.rotationPointX;
|
||||
this.rightleg.rotationPointY = this.bipedRightLeg.rotationPointY - 1.5F;
|
||||
this.rightleg.rotationPointZ = this.bipedRightLeg.rotationPointZ;
|
||||
this.rightleg.rotateAngleX = this.bipedRightLeg.rotateAngleX;
|
||||
this.rightleg.rotateAngleY = this.bipedRightLeg.rotateAngleY;
|
||||
this.rightleg.rotateAngleZ = this.bipedRightLeg.rotateAngleZ;
|
||||
|
||||
if(this.isSneak)
|
||||
{
|
||||
this.leftleg.rotationPointZ -= 0.5F;
|
||||
this.rightleg.rotationPointZ -= 0.5F;
|
||||
this.leftleg.rotationPointY += 0.5F;
|
||||
this.rightleg.rotationPointY += 0.5F;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
this.leftleg.render(par7);
|
||||
|
||||
this.rightleg.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild)
|
||||
{
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
leftleg = new ModelRenderer(this, 0, 0);
|
||||
rightleg = new ModelRenderer(this, 0, 0);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
Shape1.setRotationPoint(-4F + 2, 0F - 0.5F, -2F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape1);
|
||||
Shape2 = new ModelRenderer(this, 16, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 4, 12, 4);
|
||||
Shape2.setRotationPoint(0F - 2, 0F - 0.5F, -2F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape2);
|
||||
Shape3 = new ModelRenderer(this, 0, 16);
|
||||
Shape3.addBox(0F, -6F, 0F, 5, 6, 4);
|
||||
Shape3.setRotationPoint(-5F + 2, 10F - 0.5F, -2F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0.1745329F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape3);
|
||||
Shape4 = new ModelRenderer(this, 18, 16);
|
||||
Shape4.addBox(0F, -6F, 0F, 5, 6, 4);
|
||||
Shape4.setRotationPoint(0F - 2, 10F - 0.5F, -2F);
|
||||
Shape4.setTextureSize(64, 32);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0.1745329F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape4);
|
||||
Shape5 = new ModelRenderer(this, 34, 0);
|
||||
Shape5.addBox(0F, 0F, 0F, 5, 2, 4);
|
||||
Shape5.setRotationPoint(-5F + 2, 1F - 0.5F, -3F);
|
||||
Shape5.setTextureSize(64, 32);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
convertToChild(rightleg, Shape5);
|
||||
Shape6 = new ModelRenderer(this, 34, 8);
|
||||
Shape6.addBox(0F, 0F, 0F, 5, 2, 4);
|
||||
Shape6.setRotationPoint(0F - 2, 1F - 0.5F, -3F);
|
||||
Shape6.setTextureSize(64, 32);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
convertToChild(leftleg, Shape6);
|
||||
}
|
||||
|
||||
/*
|
||||
* public void render(Entity entity, float f, float f1, float f2, float f3,
|
||||
* float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
* setRotationAngles(f, f1, f2, f3, f4, f5); Shape1.render(f5);
|
||||
* Shape2.render(f5); Shape3.render(f5); Shape4.render(f5);
|
||||
* Shape5.render(f5); Shape6.render(f5); }
|
||||
*/
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if (player.isSneaking()) {
|
||||
this.isSneak = true;
|
||||
} else {
|
||||
this.isSneak = false;
|
||||
}
|
||||
}
|
||||
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
this.leftleg.rotationPointX = this.bipedLeftLeg.rotationPointX;
|
||||
this.leftleg.rotationPointY = this.bipedLeftLeg.rotationPointY - 1.5F;
|
||||
this.leftleg.rotationPointZ = this.bipedLeftLeg.rotationPointZ;
|
||||
this.leftleg.rotateAngleX = this.bipedLeftLeg.rotateAngleX;
|
||||
this.leftleg.rotateAngleY = this.bipedLeftLeg.rotateAngleY;
|
||||
this.leftleg.rotateAngleZ = this.bipedLeftLeg.rotateAngleZ;
|
||||
this.rightleg.rotationPointX = this.bipedRightLeg.rotationPointX;
|
||||
this.rightleg.rotationPointY = this.bipedRightLeg.rotationPointY - 1.5F;
|
||||
this.rightleg.rotationPointZ = this.bipedRightLeg.rotationPointZ;
|
||||
this.rightleg.rotateAngleX = this.bipedRightLeg.rotateAngleX;
|
||||
this.rightleg.rotateAngleY = this.bipedRightLeg.rotateAngleY;
|
||||
this.rightleg.rotateAngleZ = this.bipedRightLeg.rotateAngleZ;
|
||||
|
||||
if (this.isSneak) {
|
||||
this.leftleg.rotationPointZ -= 0.5F;
|
||||
this.rightleg.rotationPointZ -= 0.5F;
|
||||
this.leftleg.rotationPointY += 0.5F;
|
||||
this.rightleg.rotationPointY += 0.5F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.125F, 1.125F, 1.125F);
|
||||
this.leftleg.render(par7);
|
||||
|
||||
this.rightleg.render(par7);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected void convertToChild(ModelRenderer parParent, ModelRenderer parChild) {
|
||||
// move child rotation point to be relative to parent
|
||||
parChild.rotationPointX -= parParent.rotationPointX;
|
||||
parChild.rotationPointY -= parParent.rotationPointY;
|
||||
parChild.rotationPointZ -= parParent.rotationPointZ;
|
||||
// make rotations relative to parent
|
||||
parChild.rotateAngleX -= parParent.rotateAngleX;
|
||||
parChild.rotateAngleY -= parParent.rotateAngleY;
|
||||
parChild.rotateAngleZ -= parParent.rotateAngleZ;
|
||||
// create relationship
|
||||
parParent.addChild(parChild);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -64,17 +64,8 @@ public class TileEntityYellowBarrel extends TileEntity {
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat)
|
||||
{
|
||||
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
|
||||
{
|
||||
/*Library.damageSuit(((EntityPlayer)entity), 0);
|
||||
Library.damageSuit(((EntityPlayer)entity), 1);
|
||||
Library.damageSuit(((EntityPlayer)entity), 2);
|
||||
Library.damageSuit(((EntityPlayer)entity), 3);*/
|
||||
|
||||
} else if(entity instanceof EntityLivingBase && !(entity instanceof EntityNuclearCreeper) && !(entity instanceof EntityMooshroom) && !(entity instanceof EntityZombie))
|
||||
{
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 30 * 20, 14));
|
||||
}
|
||||
if(entity instanceof EntityLivingBase)
|
||||
Library.applyRadiation((EntityLivingBase)entity, 80, 24, 60, 19);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,13 +435,8 @@ public class TileEntityMachineReactorSmall extends TileEntity
|
||||
xCoord + 0.5 + 5, yCoord + 1.5 + 5, zCoord + 0.5 + 5));
|
||||
|
||||
for (Entity e : list) {
|
||||
if (e instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer) e)) {
|
||||
|
||||
} else {
|
||||
if (e instanceof EntityLivingBase)
|
||||
((EntityLivingBase) e)
|
||||
.addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25));
|
||||
}
|
||||
if (e instanceof EntityLivingBase)
|
||||
Library.applyRadiation((EntityLivingBase)e, 80, 24, 60, 19);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.MachineGenerator;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||
import com.hbm.entity.logic.EntityNukeExplosionMK4;
|
||||
import com.hbm.entity.mob.EntityNuclearCreeper;
|
||||
import com.hbm.explosion.ExplosionParticle;
|
||||
@ -499,17 +498,8 @@ public class TileEntityReactorMultiblock extends TileEntity implements ISidedInv
|
||||
double d9 = MathHelper.sqrt_double(d5 * d5 + d6 * d6 + d7 * d7);
|
||||
if (d9 < wat)
|
||||
{
|
||||
if(entity instanceof EntityPlayer && Library.checkForHazmat((EntityPlayer)entity))
|
||||
{
|
||||
/*Library.damageSuit(((EntityPlayer)entity), 0);
|
||||
Library.damageSuit(((EntityPlayer)entity), 1);
|
||||
Library.damageSuit(((EntityPlayer)entity), 2);
|
||||
Library.damageSuit(((EntityPlayer)entity), 3);*/
|
||||
|
||||
} else {
|
||||
if(entity instanceof EntityLivingBase)
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 80 * 20, 25));
|
||||
}
|
||||
if (entity instanceof EntityLivingBase)
|
||||
Library.applyRadiation((EntityLivingBase)entity, 80, 24, 60, 19);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,50 @@ public class TileEntityVaultDoor extends TileEntity {
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(isOpening && state == 1) {
|
||||
if(timer == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultScrape", 1.0F, 1.0F);
|
||||
if(timer == 110)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 130)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 150)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 170)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 190)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 210)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 230)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 249)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
}
|
||||
if(!isOpening && state == 1) {
|
||||
|
||||
if(timer == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 20)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 40)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 60)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 80)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 100)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 120)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
if(timer == 140)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultThud", 1.0F, 1.0F);
|
||||
|
||||
if(timer == 150)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.vaultScrape", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(state != 1) {
|
||||
timer = 0;
|
||||
} else {
|
||||
|
||||
@ -13,9 +13,9 @@ import net.minecraft.world.World;
|
||||
|
||||
public class Spaceship2
|
||||
{
|
||||
Block Block1 = ModBlocks.block_tungsten;
|
||||
Block Block1 = ModBlocks.deco_tungsten;
|
||||
Block Block2 = ModBlocks.fusion_conductor;
|
||||
Block Block3 = ModBlocks.block_steel;
|
||||
Block Block3 = ModBlocks.deco_steel;
|
||||
Block Block4 = ModBlocks.fusion_heater;
|
||||
Block Block5 = ModBlocks.block_meteor;
|
||||
Block Block6 = ModBlocks.reactor_element;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user