Merge branch 'HbmMods:master' into master
15
changelog
@ -10,11 +10,24 @@
|
||||
* No longer has a volatile power buffer, power isn't buffered at all anymore, similar to steam engines and MHD turbines
|
||||
* Steam capacity changes based on compression level, the ratio for turbine cascades is now 1:1:1:1
|
||||
* Comes with a flywheel, energy output slowly ramps up as steam is supplied and slowly goes down as steam cuts out
|
||||
* Recipe is similar to the old inudstrial turbine, but slightly simplified and cheaper
|
||||
* Leviathan turbines no longer have a power buffer
|
||||
* Updated russian and chinese localization
|
||||
* The PWR can now be controlled via RoR
|
||||
* The RoR value reader can read core and hull heat as well as fuel depletion in percent
|
||||
* The RoR controller can set the control rod level in percent as well as jetison all loaded fuel
|
||||
* Having 528, expensive or rampant mode enabled now displays a badge in the top left corner, showing that it is enabled
|
||||
* Badges can be disabled with the `BADGES_HUD` value of `/ntmclient`
|
||||
* The badge only shows up if the "true" configuration is used, 528 requires default settings, expensive requires the precision assembler config to not be modified and rampant needs most of the default settings enabled
|
||||
* If all three modes are enabled, the "328 mode" badge also appears
|
||||
* Removed toothpicks, as they haven't been used in recipes for well over a year
|
||||
* Cleaned up a ton of unused assets
|
||||
* The old crucible smelting rules when not using a template can be restores with the `/ntmserver` value `LEGACY_CRUCIBLE_RULES`
|
||||
* Due to repeated complaints, power armor sounds are now generally more quiet, with 25% volume for steps and 50% volume for jumping and landing
|
||||
|
||||
# Fixed
|
||||
* Fixed proxy tiles that do not use electricity at all visually connecting to cables
|
||||
* Fixed proxy tiles that do not use electricity at all visually connecting to cables
|
||||
* Fixed missing texture for canned horse slime
|
||||
* Fixed incorrect ore dictionary key used by enriched naquadah watz pellet recipe
|
||||
* Fixed out of bounds light level for the RTG blast furnace
|
||||
* Fixed the recipe configs now allowing NBT data for output items, rendering the precision assembler and annihilator configs useless
|
||||
@ -345,6 +345,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block lightstone;
|
||||
public static Block brick_forgotten;
|
||||
public static Block brick_forgotten_lock;
|
||||
|
||||
public static Block concrete_slab;
|
||||
public static Block concrete_double_slab;
|
||||
@ -846,7 +847,6 @@ public class ModBlocks {
|
||||
public static Block barrel_antimatter;
|
||||
|
||||
public static Block machine_transformer;
|
||||
public static Block machine_transformer_dnt;
|
||||
|
||||
public static Block machine_solar_boiler;
|
||||
public static Block solar_mirror;
|
||||
@ -1533,6 +1533,7 @@ public class ModBlocks {
|
||||
|
||||
lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone");
|
||||
brick_forgotten = new BlockPillar(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||
brick_forgotten_lock = new BlockForgottenLock(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten_lock").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten_lock");
|
||||
|
||||
concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
concrete_double_slab = new BlockMultiSlab(concrete_slab, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_double_slab").setCreativeTab(MainRegistry.blockTab);
|
||||
@ -1790,7 +1791,7 @@ public class ModBlocks {
|
||||
machine_difurnace_on = new MachineDiFurnace(true).setBlockName("machine_difurnace_on").setHardness(5.0F).setLightLevel(1.0F).setResistance(10.0F);
|
||||
machine_difurnace_extension = new MachineDiFurnaceExtension().setBlockName("machine_difurnace_extension").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_rtg_off = new MachineDiFurnaceRTG(false).setBlockName("machine_difurnace_rtg_off").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(2.0F).setCreativeTab(null);
|
||||
machine_difurnace_rtg_on = new MachineDiFurnaceRTG(true).setBlockName("machine_difurnace_rtg_on").setHardness(5.0F).setResistance(10.0F).setLightLevel(1.0F).setCreativeTab(null);
|
||||
|
||||
machine_centrifuge = new MachineCentrifuge(Material.iron).setBlockName("machine_centrifuge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_gascent = new MachineGasCent(Material.iron).setBlockName("machine_gascent").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -1969,8 +1970,7 @@ public class ModBlocks {
|
||||
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
||||
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
||||
|
||||
machine_transformer = new MachineTransformer(Material.iron, 10000L, 1).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
machine_transformer_dnt = new MachineTransformer(Material.iron, 1000000000000000L, 1).setBlockName("machine_transformer_dnt").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer");
|
||||
machine_transformer = new MachineTransformer(Material.iron).setBlockName("machine_transformer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_transformer_iron");
|
||||
|
||||
machine_satlinker = new MachineSatLinker(Material.iron).setBlockName("machine_satlinker").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_satlinker_side");
|
||||
machine_keyforge = new MachineKeyForge(Material.iron).setBlockName("machine_keyforge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":machine_keyforge_side");
|
||||
@ -2704,6 +2704,7 @@ public class ModBlocks {
|
||||
register(stones_double_slab, ItemModSlab.class);
|
||||
|
||||
register(brick_forgotten);
|
||||
register(brick_forgotten_lock);
|
||||
|
||||
GameRegistry.registerBlock(concrete_slab, ItemModSlab.class, concrete_slab.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_double_slab, ItemModSlab.class, concrete_double_slab.getUnlocalizedName());
|
||||
@ -3257,7 +3258,6 @@ public class ModBlocks {
|
||||
register(capacitor_tantalium);
|
||||
register(capacitor_schrabidate);
|
||||
GameRegistry.registerBlock(machine_transformer, machine_transformer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_transformer_dnt, machine_transformer_dnt.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_converter_he_rf, machine_converter_he_rf.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_converter_rf_he, machine_converter_rf_he.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_electric_furnace_off, machine_electric_furnace_off.getUnlocalizedName());
|
||||
|
||||
@ -54,21 +54,24 @@ public class BlockCrashedBomb extends BlockEnumMulti implements ITileEntityProvi
|
||||
|
||||
EnumDudType type = EnumUtil.grabEnumSafely(EnumDudType.class, world.getBlockMetadata(x, y, z));
|
||||
|
||||
//TODO: make this less scummy
|
||||
if(type == type.BALEFIRE) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.egg_balefire_shard)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.egg_balefire_shard));
|
||||
}
|
||||
if(type == type.CONVENTIONAL) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 16)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 16));
|
||||
}
|
||||
if(type == type.NUKE) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 8)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.billet_plutonium, 4)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 4));
|
||||
}
|
||||
if(type == type.SALTED) {
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ball_tnt, 8)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.billet_plutonium, 2)));
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ingot_cobalt, 12)));
|
||||
dropItems(world, x, y, z,
|
||||
new ItemStack(ModItems.ball_tnt, 8),
|
||||
new ItemStack(ModItems.billet_plutonium, 2),
|
||||
new ItemStack(ModItems.ingot_cobalt, 12));
|
||||
}
|
||||
|
||||
world.func_147480_a(x, y, z, false);
|
||||
@ -77,6 +80,10 @@ public class BlockCrashedBomb extends BlockEnumMulti implements ITileEntityProvi
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void dropItems(World world, int x, int y, int z, ItemStack... drops) {
|
||||
for(ItemStack drop : drops) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
|
||||
42
src/main/java/com/hbm/blocks/generic/BlockForgottenLock.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import com.hbm.blocks.machine.BlockPillar;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockForgottenLock extends BlockPillar {
|
||||
|
||||
public BlockForgottenLock(Material mat, String top) {
|
||||
super(mat, top);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
// placeholder
|
||||
if(player.getHeldItem() != null) {
|
||||
boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked;
|
||||
if((player.getHeldItem().getItem() == ModItems.key_red || cracked) && side != 0 && side != 1) {
|
||||
if(cracked) player.getHeldItem().stackSize--;
|
||||
if(world.isRemote) return true;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||
|
||||
generate(world, x, y, z, meta, dir);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:block.lockOpen", 1.0F, 1.0F);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void generate(World world, int x, int y, int z, int meta, ForgeDirection dir) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@ public class MachineTransformer extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public MachineTransformer(Material p_i45394_1_, long b, int d) {
|
||||
public MachineTransformer(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@ -26,10 +26,6 @@ public class MachineTransformer extends Block {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top_iron");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_iron");
|
||||
}
|
||||
if(this == ModBlocks.machine_transformer_dnt) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_transformer");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -38,6 +38,7 @@ public class ClientConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_X = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Integer> TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0);
|
||||
public static ConfigWrapper<Boolean> SHOW_BLOCK_META_OVERLAY = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> BADGES_HUD = new ConfigWrapper(true);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
|
||||
@ -65,6 +66,7 @@ public class ClientConfig extends RunningConfig {
|
||||
configMap.put("TOOL_HUD_INDICATOR_X", TOOL_HUD_INDICATOR_X);
|
||||
configMap.put("TOOL_HUD_INDICATOR_Y", TOOL_HUD_INDICATOR_Y);
|
||||
configMap.put("SHOW_BLOCK_META_OVERLAY", SHOW_BLOCK_META_OVERLAY);
|
||||
configMap.put("BADGES_HUD", BADGES_HUD);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import com.hbm.inventory.recipes.PrecAssRecipes;
|
||||
import com.hbm.lib.RefStrings;
|
||||
public class GeneralConfig {
|
||||
|
||||
@ -42,6 +44,10 @@ public class GeneralConfig {
|
||||
public static int normalSoundChannels = 200;
|
||||
|
||||
public static boolean enableExpensiveMode = false;
|
||||
|
||||
public static boolean trueExp() {
|
||||
return enableExpensiveMode && !PrecAssRecipes.INSTANCE.modified;
|
||||
}
|
||||
|
||||
public static boolean enable528 = false;
|
||||
public static boolean enable528ReasimBoilers = true;
|
||||
@ -52,6 +58,11 @@ public class GeneralConfig {
|
||||
public static boolean enable528PressurizedRecipes = true;
|
||||
public static boolean enable528ExplosiveEnergistics = true;
|
||||
public static int coltanRate = 2;
|
||||
|
||||
public static boolean true528() {
|
||||
return enable528 && enable528ReasimBoilers && !enable528ColtanSpawn && enable528BosniaSimulator &&
|
||||
enable528NetherBurn && enable528PressurizedRecipes && enable528ExplosiveEnergistics && coltanRate <= 2;
|
||||
}
|
||||
|
||||
public static boolean enableLBSM = false;
|
||||
public static boolean enableLBSMFullSchrab = true;
|
||||
|
||||
@ -68,6 +68,10 @@ public class MobConfig {
|
||||
public static double rampantSmokeStackOverride = 0.4;
|
||||
public static double pollutionMult = 3;
|
||||
|
||||
public static boolean trueRam() {
|
||||
return rampantMode && rampantNaturalScoutSpawn && scoutThreshold <= 0.1 && rampantExtendedTargetting && rampantDig && rampantGlyphidGuidance;
|
||||
}
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY = CommonConfig.CATEGORY_MOBS;
|
||||
|
||||
@ -21,6 +21,7 @@ public class ServerConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
||||
public static ConfigWrapper<Boolean> ENABLE_MKU = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> LEGACY_CRUCIBLE_RULES = new ConfigWrapper(false);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("DAMAGE_COMPATIBILITY_MODE", DAMAGE_COMPATIBILITY_MODE);
|
||||
@ -34,6 +35,7 @@ public class ServerConfig extends RunningConfig {
|
||||
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
||||
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
||||
configMap.put("ENABLE_MKU", ENABLE_MKU);
|
||||
configMap.put("LEGACY_CRUCIBLE_RULES", LEGACY_CRUCIBLE_RULES);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -158,28 +158,28 @@ public class RodRecipes {
|
||||
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.icf_pellet_empty), new Object[] { "ZLZ", "L L", "ZLZ", 'Z', ZR.wireFine(), 'L', PB.wireFine() });
|
||||
}
|
||||
|
||||
|
||||
public static void registerInit() {
|
||||
/* GT6 */
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadah-Enriched")) addPellet(new DictFrame("Naquadah-Enriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadahEnriched")) addPellet(new DictFrame("NaquadahEnriched"), EnumWatzType.NQD);
|
||||
if(OreDictionary.doesOreNameExist("ingotNaquadria")) addPellet(new DictFrame("Naquadria"), EnumWatzType.NQR);
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with one billet. For fuels only, therefore no unloading or ore dict
|
||||
public static void addFuelRodBillet(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_empty, billet });
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with two billets
|
||||
public static void addDualFuelRodBillet(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_dual_empty, billet, billet });
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with three billets
|
||||
public static void addQuadFuelRodBillet(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_quad_empty, billet, billet, billet, billet });
|
||||
}
|
||||
|
||||
|
||||
//Fill rods with one billet + unload
|
||||
public static void addRodBilletUnload(Item billet, Item out) {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(out), new Object[] { ModItems.rod_empty, billet });
|
||||
|
||||
10
src/main/java/com/hbm/interfaces/HalfLifeType.java
Normal file
@ -0,0 +1,10 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public enum HalfLifeType {
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
@ -1,429 +0,0 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
/**
|
||||
* Interface for customizable warheads or other explosive devices
|
||||
* @author UFFR
|
||||
*
|
||||
*/
|
||||
@Beta
|
||||
@Spaghetti("AAAAAAAA")
|
||||
public interface ICustomWarhead
|
||||
{
|
||||
public static enum EnumCustomWarhead
|
||||
{
|
||||
AMAT,
|
||||
BF,
|
||||
BIO,
|
||||
CHEM,
|
||||
FUSION,
|
||||
GRAV,
|
||||
HE,
|
||||
NUCLEAR,
|
||||
TX,
|
||||
SCHRAB,
|
||||
ZPE;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.".concat(toString()));
|
||||
}
|
||||
|
||||
public enum EnumChemicalType
|
||||
{
|
||||
ACID,
|
||||
CHLORINE,
|
||||
NERVE,
|
||||
TOX;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.CHEM.".concat(toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public enum EnumBioType
|
||||
{
|
||||
ANTHRAX,
|
||||
MKU;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warhead.BIO.".concat(toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
public static enum EnumCustomWarheadTrait
|
||||
{
|
||||
CLEAN,
|
||||
CLEANISH,
|
||||
DIRTY,
|
||||
RAD,
|
||||
SALT;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadTrait.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public static enum EnumWeaponType
|
||||
{
|
||||
DENIAL,
|
||||
STRATEGIC,
|
||||
TACTICAL,
|
||||
WMD;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadType.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public static final String KEY_ANTHRAX = "warheadFuel.ANTHRAX";
|
||||
public static final String KEY_MKU = "warheadFuel.MKU";
|
||||
public static final String KEY_CAUSTIC = "warheadFuel.ACID";
|
||||
public static final String KEY_NERVE = "warheadFuel.NERVE";
|
||||
public static final String KEY_TOX = "warheadFuel.TOX";
|
||||
|
||||
public static final String NBT_GROUP = "NTM_NUKE_INFO";
|
||||
public static final String NBT_YIELD = "YIELD";
|
||||
public static final String NBT_ALTITUDE = "ALTITUDE";
|
||||
public static final String NBT_MASS = "MASS";
|
||||
public static final String NBT_SPECIAL = "SPECIAL_FIELD";
|
||||
public static final String NBT_WARHEAD = "WARHEAD";
|
||||
public static final String NBT_TYPE = "WARHEAD_TYPE";
|
||||
public static final String NBT_TRAIT = "WARHEAD_TRAIT";
|
||||
public static final DecimalFormat df = new DecimalFormat("#.00");
|
||||
|
||||
public static EnumChatFormatting getColorFromWarhead(EnumCustomWarhead warhead)
|
||||
{
|
||||
switch (warhead)
|
||||
{
|
||||
case AMAT:
|
||||
return EnumChatFormatting.DARK_RED;
|
||||
case BF:
|
||||
return EnumChatFormatting.GREEN;
|
||||
case BIO:
|
||||
return EnumChatFormatting.GOLD;
|
||||
case CHEM:
|
||||
return EnumChatFormatting.YELLOW;
|
||||
case FUSION:
|
||||
return EnumChatFormatting.BLUE;
|
||||
case GRAV:
|
||||
return EnumChatFormatting.DARK_GRAY;
|
||||
case HE:
|
||||
return EnumChatFormatting.RED;
|
||||
case NUCLEAR:
|
||||
return EnumChatFormatting.DARK_GREEN;
|
||||
case SCHRAB:
|
||||
return EnumChatFormatting.AQUA;
|
||||
case TX:
|
||||
return EnumChatFormatting.DARK_PURPLE;
|
||||
case ZPE:
|
||||
return (System.currentTimeMillis() % 1000 < 500 ? EnumChatFormatting.DARK_AQUA : EnumChatFormatting.LIGHT_PURPLE);
|
||||
default:
|
||||
return EnumChatFormatting.WHITE;
|
||||
}
|
||||
}
|
||||
|
||||
public default float getYield()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
public default EnumCustomWarhead getWarheadType(NBTTagCompound data)
|
||||
{
|
||||
return EnumCustomWarhead.valueOf(data.getString(NBT_WARHEAD));
|
||||
}
|
||||
public default EnumWeaponType getWeaponType(NBTTagCompound data)
|
||||
{
|
||||
return EnumWeaponType.valueOf(data.getString(NBT_TYPE));
|
||||
}
|
||||
public default EnumCustomWarheadTrait getWeaponTrait(NBTTagCompound data)
|
||||
{
|
||||
return EnumCustomWarheadTrait.valueOf(data.getString(NBT_TRAIT));
|
||||
}
|
||||
public ItemStack constructNew();
|
||||
public ICustomWarhead getInstance();
|
||||
|
||||
public default Item getItem()
|
||||
{
|
||||
return (Item) this;
|
||||
}
|
||||
|
||||
public static ItemStack addData(NBTTagCompound data, Item item)
|
||||
{
|
||||
ItemStack stackOut = new ItemStack(item);
|
||||
|
||||
stackOut.stackTagCompound = new NBTTagCompound();
|
||||
stackOut.stackTagCompound.setTag(NBT_GROUP, data);
|
||||
|
||||
return stackOut.copy();
|
||||
}
|
||||
|
||||
public default NBTTagCompound getWarheadData(ItemStack stack)
|
||||
{
|
||||
return stack.getTagCompound().getCompoundTag(NBT_GROUP);
|
||||
}
|
||||
|
||||
public default ItemStack addFuel(ItemStack stack, Enum<?> fuel, float amount)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
{
|
||||
NBTTagCompound data = getWarheadData(stack);
|
||||
data.setFloat(fuel.toString(), amount);
|
||||
data.setFloat(NBT_MASS, data.getFloat(NBT_MASS) + amount);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public default ItemStack addData(ItemStack stack, String key, String value)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
getWarheadData(stack).setString(key, value);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public default void addCompositionalInfo(NBTTagCompound data, List<String> tooltip, List<Enum<?>> combinedFuels)
|
||||
{
|
||||
for (Enum<?> f : combinedFuels)
|
||||
if (data.getFloat(f.toString()) > 0)
|
||||
tooltip.add(String.format(Locale.US, "%s: %skg (%s)", I18nUtil.resolveKey("warheadFuel.".concat(f.toString())), df.format(data.getFloat(f.toString())), BobMathUtil.toPercentage(data.getFloat(f.toString()), data.getFloat(NBT_MASS))));
|
||||
}
|
||||
|
||||
public default void addTooltip(ItemStack stack, List<String> tooltip)
|
||||
{
|
||||
// tooltip.clear();
|
||||
try {
|
||||
NBTTagCompound data = getWarheadData(stack);
|
||||
|
||||
final ArrayList<Enum<?>> combinedFuels = new ArrayList<>();
|
||||
combinedFuels.addAll(Arrays.asList(FissileFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(FusionFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(SaltedFuel.values()));
|
||||
combinedFuels.addAll(Arrays.asList(EnumCustomWarhead.values()));
|
||||
switch (getWarheadType(data))
|
||||
{
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
case HE:
|
||||
tooltip.add("Composition:");
|
||||
addCompositionalInfo(data, tooltip, combinedFuels);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
final EnumCustomWarhead warhead = getWarheadType(data);
|
||||
tooltip.add(data.getFloat(NBT_MASS) + "kg total");
|
||||
tooltip.add("");
|
||||
switch (warhead)
|
||||
{
|
||||
case CHEM:
|
||||
case BIO:
|
||||
tooltip.add("Type: " + getColorFromWarhead(warhead) + I18nUtil.resolveKey("warhead.".concat(warhead.toString()), I18nUtil.resolveKey(data.getString(NBT_SPECIAL))));
|
||||
break;
|
||||
default:
|
||||
tooltip.add("Type: " + getColorFromWarhead(warhead) + warhead.getLoc());
|
||||
break;
|
||||
}
|
||||
tooltip.add("Function: " + getWeaponType(data).getLoc());
|
||||
switch (warhead)
|
||||
{
|
||||
case AMAT:
|
||||
case BF:
|
||||
case FUSION:
|
||||
case GRAV:
|
||||
case HE:
|
||||
case NUCLEAR:
|
||||
case TX:
|
||||
tooltip.add("Yield: " + BobMathUtil.getShortNumber(data.getInteger(NBT_YIELD)) + "T");
|
||||
break;
|
||||
case BIO:
|
||||
case CHEM:
|
||||
case SCHRAB:
|
||||
tooltip.add("Radius: " + BobMathUtil.getShortNumber(data.getInteger(NBT_YIELD)) + "M");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
tooltip.add("Trait: " + getWeaponTrait(data).getLoc());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainRegistry.logger.catching(Level.ERROR, e);
|
||||
}
|
||||
}
|
||||
|
||||
public enum FissileFuel
|
||||
{
|
||||
U233(15F, 197.5F, HazardRegistry.u233, 19.05F),
|
||||
U235(52F, 202.5F, HazardRegistry.u235, 19.05F),
|
||||
Np237(60F, 202.5F, HazardRegistry.np237, 20.45F),
|
||||
Pu239(10F, 207.1F, HazardRegistry.pu239, 19.86F),
|
||||
Pu241(12, 210F, HazardRegistry.pu241, 19.86F),
|
||||
Am241(66, 210F, HazardRegistry.am241, 13.67F),
|
||||
Am242m(11F, 212F, HazardRegistry.am242, 13.67F),
|
||||
Sa326(1F, 250F, HazardRegistry.sa326, 39.7F);
|
||||
public final float criticalMass;
|
||||
public final float energyReleased;
|
||||
public final float radioactivity;
|
||||
private final float mass;
|
||||
private FissileFuel(float criticalMass, float energyReleased, float radioactivity, float mass)
|
||||
{
|
||||
this.criticalMass = criticalMass;
|
||||
this.energyReleased = energyReleased;
|
||||
this.radioactivity = radioactivity;
|
||||
this.mass = mass;
|
||||
}
|
||||
public float getBlockMass()
|
||||
{
|
||||
return mass * 100;
|
||||
}
|
||||
public float getIngotMass()
|
||||
{
|
||||
return getBlockMass() / 9;
|
||||
}
|
||||
public float getNuggetMass()
|
||||
{
|
||||
return getIngotMass() / 9;
|
||||
}
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadFuel.".concat(toString()));
|
||||
}
|
||||
}
|
||||
public enum FusionFuel
|
||||
{
|
||||
DEUT,
|
||||
TRIT,
|
||||
Li,
|
||||
LiDEUT;
|
||||
public String getLoc()
|
||||
{
|
||||
return I18nUtil.resolveKey("warheadFuel".concat(toString()));
|
||||
}
|
||||
}
|
||||
public enum SaltedFuel
|
||||
{
|
||||
Co59(1.4902F * 0.75F, 5, HalfLifeType.MEDIUM, 8.86F),
|
||||
Co60(1.4902F, 5, HalfLifeType.MEDIUM, 8.86F),
|
||||
Sr90(0.546F, 28, HalfLifeType.MEDIUM, 2.64F),
|
||||
Cs137(1.1737F, 30, HalfLifeType.MEDIUM, 1.93F),
|
||||
Ta181(0.52F * 0.75F, 114, HalfLifeType.SHORT, 16.65F),
|
||||
Ta182(0.52F, 114, HalfLifeType.SHORT, 16.654F),
|
||||
Au197(1.3735F * 0.75F, 2, HalfLifeType.SHORT, 19.32F),
|
||||
Au198(1.3735F, 2, HalfLifeType.SHORT, 19.32F),
|
||||
Pu240(5.25575F, 65, HalfLifeType.LONG, 19.86F),
|
||||
Sa327(0.5F, 100, HalfLifeType.LONG, 39.7F);
|
||||
public final float decayEnergy;
|
||||
public final int halfLife;
|
||||
public final HalfLifeType type;
|
||||
private final float mass;
|
||||
SaltedFuel(float decayEnergy, int halfLife, HalfLifeType type, float mass)
|
||||
{
|
||||
this.decayEnergy = decayEnergy;
|
||||
this.halfLife = halfLife;
|
||||
this.type = type;
|
||||
this.mass = mass;
|
||||
}
|
||||
public enum HalfLifeType
|
||||
{
|
||||
/** Counted in days **/
|
||||
SHORT,
|
||||
/** Counted in years **/
|
||||
MEDIUM,
|
||||
/** Counted in hundreds of years **/
|
||||
LONG;
|
||||
}
|
||||
public float getBlockMass()
|
||||
{
|
||||
return mass * 100;
|
||||
}
|
||||
public float getIngotMass()
|
||||
{
|
||||
return getBlockMass() / 9;
|
||||
}
|
||||
public float getNuggetMass()
|
||||
{
|
||||
return getIngotMass() / 9;
|
||||
}
|
||||
}
|
||||
|
||||
/*public static class CustomWarheadWrapper
|
||||
{
|
||||
public static final ICustomWarhead cWarhead = (ICustomWarhead) ModItems.custom_warhead;
|
||||
public static final ICustomWarhead cCore = (ICustomWarhead) ModItems.custom_core;
|
||||
public static final CustomWarheadWrapper gravimetricBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumCustomWarhead.GRAV, 1000.0F).addData(NBT_TYPE, EnumWeaponType.TACTICAL).addData(NBT_WARHEAD, EnumCustomWarhead.GRAV).addData(NBT_TRAIT, EnumCustomWarheadTrait.CLEAN);
|
||||
public static final CustomWarheadWrapper pureFusionBase = new CustomWarheadWrapper(cWarhead).addFuel(FusionFuel.LiDEUT, 500).addData(NBT_TYPE, EnumWeaponType.TACTICAL).addData(NBT_WARHEAD, EnumCustomWarhead.FUSION).addData(NBT_TRAIT, EnumCustomWarheadTrait.CLEANISH).setStackData(8, 1);
|
||||
public static final CustomWarheadWrapper chemicalBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumChemicalType.NERVE, 15).addData(NBT_TYPE, EnumWeaponType.WMD).addData(NBT_WARHEAD, EnumCustomWarhead.CHEM).addData(NBT_TRAIT, EnumCustomWarheadTrait.DIRTY).addData(NBT_SPECIAL, KEY_NERVE).setStackData(1, 2);
|
||||
public static final CustomWarheadWrapper biologicalBase = new CustomWarheadWrapper(cWarhead).addFuel(EnumBioType.ANTHRAX, 15).addData(NBT_TYPE, EnumWeaponType.WMD).addData(NBT_WARHEAD, EnumCustomWarhead.BIO).addData(NBT_TRAIT, EnumCustomWarheadTrait.DIRTY).addData(NBT_SPECIAL, KEY_ANTHRAX).setStackData(1, 3);
|
||||
public static final CustomWarheadWrapper saltedBase = new CustomWarheadWrapper(cWarhead).addFuel(FissileFuel.U235, 20).addFuel(FissileFuel.Pu239, 5).addFuel(FusionFuel.LiDEUT, 20).addFuel(SaltedFuel.Co59, 10).addData(NBT_TYPE, EnumWeaponType.DENIAL).addData(NBT_WARHEAD, EnumCustomWarhead.TX).addData(NBT_TRAIT, EnumCustomWarheadTrait.SALT).setStackData(1, 4);
|
||||
private ItemStack stack;
|
||||
private ICustomWarhead warhead;
|
||||
public CustomWarheadWrapper(ItemStack stack)
|
||||
{
|
||||
if (stack != null && stack.getItem() instanceof ICustomWarhead)
|
||||
{
|
||||
this.stack = ((ICustomWarhead) stack.getItem()).constructNew();
|
||||
warhead = (ICustomWarhead) stack.getItem();
|
||||
}
|
||||
else
|
||||
throw new IllegalArgumentException("Input stack item is not instance of " + ICustomWarhead.class.toString());
|
||||
}
|
||||
public CustomWarheadWrapper(ICustomWarhead warhead)
|
||||
{
|
||||
stack = warhead.constructNew();
|
||||
this.warhead = warhead;
|
||||
}
|
||||
public CustomWarheadWrapper(Item item)
|
||||
{
|
||||
if (!(item instanceof ICustomWarhead))
|
||||
throw new IllegalArgumentException("Input stack item is not instance of [ICustomWarhead]");
|
||||
stack = ((ICustomWarhead) item).constructNew();
|
||||
warhead = (ICustomWarhead) item;
|
||||
}
|
||||
public CustomWarheadWrapper addFuel(Enum<?> fuel, float amount)
|
||||
{
|
||||
warhead.addFuel(stack, fuel, amount);
|
||||
return this;
|
||||
}
|
||||
public CustomWarheadWrapper addData(String key, String value)
|
||||
{
|
||||
warhead.addData(stack, key, value);
|
||||
return this;
|
||||
}
|
||||
public CustomWarheadWrapper addData(String key, Enum<?> value)
|
||||
{
|
||||
return addData(key, value.toString());
|
||||
}
|
||||
public CustomWarheadWrapper setStackData(int stackSize, int meta)
|
||||
{
|
||||
stack.stackSize = stackSize <= 1 ? 1 : stackSize;
|
||||
stack.setItemDamage(meta <= 0 ? 0 : meta);
|
||||
return this;
|
||||
}
|
||||
public NBTTagCompound regurgitateData()
|
||||
{
|
||||
return (NBTTagCompound) warhead.getWarheadData(getStack()).copy();
|
||||
}
|
||||
public ICustomWarhead getInterface()
|
||||
{
|
||||
return warhead;
|
||||
}
|
||||
public ItemStack getStack()
|
||||
{
|
||||
return stack.copy();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@ -387,7 +387,7 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
.inputItems(new OreDictStack(STEEL.pipe(), 12), new OreDictStack(STEEL.ingot(), 24), new OreDictStack(CU.plate(), 24), new OreDictStack(NB.ingot(), 4), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModBlocks.glass_quartz, 16))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(NB.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModBlocks.glass_quartz, 16)));
|
||||
this.register(new GenericRecipe("ass.iturbine").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_industrial_turbine, 1))
|
||||
.inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 6), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC))
|
||||
.inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 4), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC))
|
||||
.inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 16), new OreDictStack(DURA.pipe(), 16), new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.CIRCUIT)));
|
||||
this.register(new GenericRecipe("ass.leviturbine").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_chungus, 1))
|
||||
.inputItems(new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.plateWelded(), 16), new OreDictStack(TI.plate(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 16), new ComparableStack(ModItems.turbine_tungsten, 5), new ComparableStack(ModItems.turbine_titanium, 3), new ComparableStack(ModItems.flywheel_beryllium, 1), new OreDictStack(GOLD.wireDense(), 48), new OreDictStack(DURA.pipe(), 16), new OreDictStack(STEEL.pipe(), 16))
|
||||
|
||||
@ -25,6 +25,7 @@ import com.hbm.inventory.recipes.*;
|
||||
import com.hbm.inventory.recipes.anvil.AnvilRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import api.hbm.recipe.IRecipeRegisterListener;
|
||||
@ -301,7 +302,7 @@ public abstract class SerializableRecipe {
|
||||
writer.value(comp.nbt != null ? "nbt" : "item"); //NBT identifier
|
||||
writer.value(Item.itemRegistry.getNameForObject(comp.toStack().getItem())); //item name
|
||||
if(comp.stacksize != 1 || comp.meta > 0) writer.value(comp.stacksize); //stack size
|
||||
if(comp.meta > 0) writer.value(comp.meta); //metadata
|
||||
if(comp.meta > 0 || comp.nbt != null) writer.value(comp.meta); //metadata
|
||||
if(comp.nbt != null) writer.value(comp.nbt.toString()); //NBT
|
||||
} else if(astack instanceof ComparableStack) {
|
||||
ComparableStack comp = (ComparableStack) astack;
|
||||
@ -324,7 +325,11 @@ public abstract class SerializableRecipe {
|
||||
Item item = (Item) Item.itemRegistry.getObject(array.get(0).getAsString());
|
||||
int stacksize = array.size() > 1 ? array.get(1).getAsInt() : 1;
|
||||
int meta = array.size() > 2 ? array.get(2).getAsInt() : 0;
|
||||
if(item != null) return new ItemStack(item, stacksize, meta);
|
||||
if(item != null) {
|
||||
ItemStack stack = new ItemStack(item, stacksize, meta);
|
||||
if(array.size() > 3) ItemStackUtil.addNBTFromString(stack, array.get(3).getAsString());
|
||||
return stack;
|
||||
}
|
||||
} catch(Exception ex) { }
|
||||
MainRegistry.logger.error("Error reading stack array " + array.toString() + " - defaulting to NOTHING item!");
|
||||
return new ItemStack(ModItems.nothing);
|
||||
@ -335,8 +340,12 @@ public abstract class SerializableRecipe {
|
||||
Item item = (Item) Item.itemRegistry.getObject(array.get(0).getAsString());
|
||||
int stacksize = array.size() > 2 ? array.get(1).getAsInt() : 1;
|
||||
int meta = array.size() > 3 ? array.get(2).getAsInt() : 0;
|
||||
float chance = array.get(array.size() - 1).getAsFloat();
|
||||
if(item != null) return new Pair(new ItemStack(item, stacksize, meta), chance);
|
||||
if(item != null) {
|
||||
ItemStack stack = new ItemStack(item, stacksize, meta);
|
||||
if(array.size() > 4) ItemStackUtil.addNBTFromString(stack, array.get(3).getAsString());
|
||||
float chance = array.get(array.size() - 1).getAsFloat();
|
||||
return new Pair(stack, chance);
|
||||
}
|
||||
} catch(Exception ex) { }
|
||||
MainRegistry.logger.error("Error reading stack array " + array.toString() + " - defaulting to NOTHING item!");
|
||||
return new Pair(new ItemStack(ModItems.nothing), 1F);
|
||||
@ -365,9 +374,10 @@ public abstract class SerializableRecipe {
|
||||
public static void writeItemStack(ItemStack stack, JsonWriter writer) throws IOException {
|
||||
writer.beginArray();
|
||||
writer.setIndent("");
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getItem())); //item name
|
||||
if(stack.stackSize != 1 || stack.getItemDamage() != 0) writer.value(stack.stackSize); //stack size
|
||||
if(stack.getItemDamage() != 0) writer.value(stack.getItemDamage()); //metadata
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getItem())); //item name
|
||||
if(stack.stackSize != 1 || stack.getItemDamage() != 0 || stack.hasTagCompound()) writer.value(stack.stackSize); //stack size
|
||||
if(stack.getItemDamage() != 0 || stack.hasTagCompound()) writer.value(stack.getItemDamage()); //metadata
|
||||
if(stack.hasTagCompound()) writer.value(stack.stackTagCompound.toString()); //nbt
|
||||
writer.endArray();
|
||||
writer.setIndent(" ");
|
||||
}
|
||||
@ -375,10 +385,11 @@ public abstract class SerializableRecipe {
|
||||
public static void writeItemStackChance(Pair<ItemStack, Float> stack, JsonWriter writer) throws IOException {
|
||||
writer.beginArray();
|
||||
writer.setIndent("");
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getKey().getItem())); //item name
|
||||
if(stack.getKey().stackSize != 1 || stack.getKey().getItemDamage() != 0) writer.value(stack.getKey().stackSize); //stack size
|
||||
if(stack.getKey().getItemDamage() != 0) writer.value(stack.getKey().getItemDamage()); //metadata
|
||||
writer.value(stack.value); //chance
|
||||
writer.value(Item.itemRegistry.getNameForObject(stack.getKey().getItem())); //item name
|
||||
if(stack.getKey().stackSize != 1 || stack.getKey().getItemDamage() != 0 || stack.getKey().hasTagCompound()) writer.value(stack.getKey().stackSize); //stack size
|
||||
if(stack.getKey().getItemDamage() != 0 || stack.getKey().hasTagCompound()) writer.value(stack.getKey().getItemDamage()); //metadata
|
||||
if(stack.getKey().hasTagCompound()) writer.value(stack.getKey().stackTagCompound.toString()); //nbt
|
||||
writer.value(stack.value); //chance
|
||||
writer.endArray();
|
||||
writer.setIndent(" ");
|
||||
}
|
||||
|
||||
@ -122,10 +122,10 @@ public class ItemPoolsComponent {
|
||||
weighted(Items.map, 0, 1, 1, 50),
|
||||
weighted(Items.writable_book, 0, 1, 1, 30),
|
||||
weighted(ModItems.cigarette, 0, 1, 16, 20),
|
||||
weighted(ModItems.toothpicks, 0, 1, 16, 10),
|
||||
weighted(ModItems.dust, 0, 1, 1, 40),
|
||||
weighted(ModItems.dust_tiny, 0, 1, 3, 75),
|
||||
weighted(ModItems.ink, 0, 1, 1, 1),
|
||||
weighted(ModItems.screwdriver, 0, 1, 1, 10),
|
||||
weighted(ModItems.blueprint_folder, 0, 1, 1, 5)
|
||||
};
|
||||
}};
|
||||
|
||||
@ -8,7 +8,7 @@ import com.hbm.handler.BucketHandler;
|
||||
import com.hbm.handler.ability.IToolAreaAbility;
|
||||
import com.hbm.handler.ability.IToolHarvestAbility;
|
||||
import com.hbm.handler.ability.IWeaponAbility;
|
||||
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
|
||||
import com.hbm.interfaces.HalfLifeType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
@ -610,7 +610,6 @@ public class ModItems {
|
||||
public static Item gear_large;
|
||||
public static Item sawblade;
|
||||
|
||||
public static Item toothpicks;
|
||||
public static Item ducttape;
|
||||
public static Item catalyst_clay;
|
||||
|
||||
@ -774,12 +773,6 @@ public class ModItems {
|
||||
public static Item ams_catalyst_thorium;
|
||||
public static Item ams_catalyst_tungsten;
|
||||
|
||||
public static Item ams_focus_blank;
|
||||
public static Item ams_focus_limiter;
|
||||
public static Item ams_focus_booster;
|
||||
|
||||
public static Item ams_muzzle;
|
||||
|
||||
public static Item ams_lens;
|
||||
|
||||
public static Item ams_core_sing;
|
||||
@ -1446,6 +1439,7 @@ public class ModItems {
|
||||
public static Item gun_n_i_4_n_i;
|
||||
public static Item gun_charge_thrower;
|
||||
public static Item gun_drill;
|
||||
public static Item gun_pa_melee;
|
||||
|
||||
public static Item ammo_standard;
|
||||
public static Item ammo_secret;
|
||||
@ -1785,6 +1779,10 @@ public class ModItems {
|
||||
public static Item rpa_plate;
|
||||
public static Item rpa_legs;
|
||||
public static Item rpa_boots;
|
||||
public static Item ncrpa_helmet;
|
||||
public static Item ncrpa_plate;
|
||||
public static Item ncrpa_legs;
|
||||
public static Item ncrpa_boots;
|
||||
public static Item bismuth_helmet;
|
||||
public static Item bismuth_plate;
|
||||
public static Item bismuth_legs;
|
||||
@ -2697,7 +2695,6 @@ public class ModItems {
|
||||
blade_tungsten = new Item().setUnlocalizedName("blade_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":blade_tungsten");
|
||||
turbine_tungsten = new Item().setUnlocalizedName("turbine_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":turbine_tungsten");
|
||||
|
||||
toothpicks = new Item().setUnlocalizedName("toothpicks").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":toothpicks");
|
||||
ducttape = new Item().setUnlocalizedName("ducttape").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ducttape");
|
||||
catalyst_clay = new Item().setUnlocalizedName("catalyst_clay").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":catalyst_clay");
|
||||
|
||||
@ -2938,7 +2935,7 @@ public class ModItems {
|
||||
radx = new ItemPill(0).setUnlocalizedName("radx").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":radx");
|
||||
siox = new ItemPill(0).setUnlocalizedName("siox").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":siox");
|
||||
pill_herbal = new ItemPill(0).setUnlocalizedName("pill_herbal").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_herbal");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax_2");
|
||||
xanax = new ItemPill(0).setUnlocalizedName("xanax").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":xanax");
|
||||
fmn = new ItemPill(0).setUnlocalizedName("fmn").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":tablet");
|
||||
five_htp = new ItemPill(0).setUnlocalizedName("five_htp").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":5htp");
|
||||
pill_iodine = new ItemPill(0).setUnlocalizedName("pill_iodine").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pill_iodine");
|
||||
@ -3430,7 +3427,7 @@ public class ModItems {
|
||||
icf_pellet = new ItemICFPellet().setUnlocalizedName("icf_pellet").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":icf_pellet");
|
||||
icf_pellet_depleted = new Item().setUnlocalizedName("icf_pellet_depleted").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":icf_pellet_depleted");
|
||||
|
||||
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite_new");
|
||||
trinitite = new ItemNuclearWaste().setUnlocalizedName("trinitite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":trinitite");
|
||||
nuclear_waste_long = new ItemWasteLong().setUnlocalizedName("nuclear_waste_long").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long");
|
||||
nuclear_waste_long_tiny = new ItemWasteLong().setUnlocalizedName("nuclear_waste_long_tiny").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_long_tiny");
|
||||
nuclear_waste_short = new ItemWasteShort().setUnlocalizedName("nuclear_waste_short").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nuclear_waste_short");
|
||||
@ -3885,10 +3882,6 @@ public class ModItems {
|
||||
arc_electrode = new ItemArcElectrode().setUnlocalizedName("arc_electrode").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":arc_electrode");
|
||||
arc_electrode_burnt = new ItemArcElectrodeBurnt().setUnlocalizedName("arc_electrode_burnt").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":arc_electrode_burnt");
|
||||
|
||||
ams_focus_blank = new Item().setUnlocalizedName("ams_focus_blank").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_blank");
|
||||
ams_focus_limiter = new ItemCustomLore().setUnlocalizedName("ams_focus_limiter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_limiter");
|
||||
ams_focus_booster = new ItemCustomLore().setUnlocalizedName("ams_focus_booster").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_focus_booster");
|
||||
ams_muzzle = new ItemCustomLore().setUnlocalizedName("ams_muzzle").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_muzzle");
|
||||
ams_lens = new ItemLens(60 * 60 * 60 * 20 * 100).setUnlocalizedName("ams_lens").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_lens");
|
||||
ams_core_sing = new ItemAMSCore(1000000000L, 200, 10).setUnlocalizedName("ams_core_sing").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_core_sing");
|
||||
ams_core_wormhole = new ItemAMSCore(1500000000L, 200, 15).setUnlocalizedName("ams_core_wormhole").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":ams_core_wormhole");
|
||||
@ -4266,6 +4259,20 @@ public class ModItems {
|
||||
rpa_legs = new ArmorRPA(aMatAJR, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_legs").setTextureName(RefStrings.MODID + ":rpa_legs");
|
||||
rpa_boots = new ArmorRPA(aMatAJR, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("rpa_boots").setTextureName(RefStrings.MODID + ":rpa_boots");
|
||||
|
||||
ncrpa_helmet = new ArmorNCRPA(aMatAJR, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25)
|
||||
.enableVATS(true)
|
||||
.setHasGeigerSound(true)
|
||||
.setHasHardLanding(true)
|
||||
.addEffect(new PotionEffect(Potion.damageBoost.id, 20, 3))
|
||||
.setStep("hbm:step.powered")
|
||||
.setJump("hbm:step.powered")
|
||||
.setFall("hbm:step.powered")
|
||||
.hides(EnumPlayerPart.HAT)
|
||||
.setUnlocalizedName("ncrpa_helmet").setTextureName(RefStrings.MODID + ":rpa_helmet");
|
||||
ncrpa_plate = new ArmorNCRPA(aMatAJR, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("ncrpa_plate").setTextureName(RefStrings.MODID + ":rpa_plate");
|
||||
ncrpa_legs = new ArmorNCRPA(aMatAJR, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("ncrpa_legs").setTextureName(RefStrings.MODID + ":rpa_legs");
|
||||
ncrpa_boots = new ArmorNCRPA(aMatAJR, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 2500000, 10000, 2000, 25).cloneStats((ArmorFSB) rpa_helmet).setUnlocalizedName("ncrpa_boots").setTextureName(RefStrings.MODID + ":rpa_boots");
|
||||
|
||||
ArmorMaterial aMatBJ = EnumHelper.addArmorMaterial("HBM_BLACKJACK", 150, new int[] { 3, 8, 6, 3 }, 0);
|
||||
aMatBJ.customCraftingMaterial = ModItems.plate_armor_lunar;
|
||||
bj_helmet = new ArmorBJ(aMatBJ, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 10000000, 10000, 1000, 100)
|
||||
@ -5460,7 +5467,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(turbine_titanium, turbine_titanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(turbine_tungsten, turbine_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerItem(flywheel_beryllium, flywheel_beryllium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(toothpicks, toothpicks.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ducttape, ducttape.getUnlocalizedName());
|
||||
GameRegistry.registerItem(catalyst_clay, catalyst_clay.getUnlocalizedName());
|
||||
GameRegistry.registerItem(missile_assembly, missile_assembly.getUnlocalizedName());
|
||||
@ -5835,10 +5841,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(catalytic_converter, catalytic_converter.getUnlocalizedName());
|
||||
|
||||
//AMS Components
|
||||
GameRegistry.registerItem(ams_focus_blank, ams_focus_blank.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_focus_limiter, ams_focus_limiter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_focus_booster, ams_focus_booster.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_muzzle, ams_muzzle.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_lens, ams_lens.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_core_sing, ams_core_sing.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ams_core_wormhole, ams_core_wormhole.getUnlocalizedName());
|
||||
@ -6327,6 +6329,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_fireext, gun_fireext.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_charge_thrower, gun_charge_thrower.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_drill, gun_drill.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_pa_melee, gun_pa_melee.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ammo_secret, ammo_secret.getUnlocalizedName());
|
||||
@ -6824,6 +6827,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(rpa_plate, rpa_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rpa_legs, rpa_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(rpa_boots, rpa_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_helmet, ncrpa_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_plate, ncrpa_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_legs, ncrpa_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ncrpa_boots, ncrpa_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bj_helmet, bj_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bj_plate, bj_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bj_plate_jetpack, bj_plate_jetpack.getUnlocalizedName());
|
||||
|
||||
@ -288,7 +288,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
Block block = player.worldObj.getBlock(px, py, pz);
|
||||
|
||||
if(block.getMaterial() != Material.air && player.getEntityData().getFloat("hfr_nextStepDistance") <= distanceWalkedOnStepModified.getFloat(player))
|
||||
player.playSound(sound, 1.0F, 1.0F);
|
||||
player.playSound(sound, 0.25F, 1.0F);
|
||||
|
||||
player.getEntityData().setFloat("hfr_nextStepDistance", nextStepDistance.getFloat(player));
|
||||
|
||||
@ -303,7 +303,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
ArmorFSB chestplate = (ArmorFSB) player.inventory.armorInventory[2].getItem();
|
||||
|
||||
if(chestplate.jump != null)
|
||||
player.playSound(chestplate.jump, 1.0F, 1.0F);
|
||||
player.playSound(chestplate.jump, 0.5F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,9 +315,6 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
|
||||
if(chestplate.hardLanding && player.fallDistance > 10) {
|
||||
|
||||
// player.playSound(Block.soundTypeAnvil.func_150496_b(), 2.0F,
|
||||
// 0.5F);
|
||||
|
||||
List<Entity> entities = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, player.boundingBox.expand(3, 0, 3));
|
||||
|
||||
for(Entity e : entities) {
|
||||
@ -337,11 +334,10 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
e.attackEntityFrom(DamageSource.causePlayerDamage(player).setDamageBypassesArmor(), (float) (intensity * 10));
|
||||
}
|
||||
}
|
||||
// return;
|
||||
}
|
||||
|
||||
if(chestplate.fall != null)
|
||||
player.playSound(chestplate.fall, 1.0F, 1.0F);
|
||||
player.playSound(chestplate.fall, 0.5F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
61
src/main/java/com/hbm/items/armor/ArmorNCRPA.java
Normal file
@ -0,0 +1,61 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.model.ModelArmorNCRPA;
|
||||
import com.hbm.render.tileentity.IItemRendererProvider;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ArmorNCRPA extends ArmorFSBPowered implements IItemRendererProvider, IPAWeaponsProvider {
|
||||
|
||||
public ArmorNCRPA(ArmorMaterial material, int slot, String texture, long maxPower, long chargeRate, long consumption, long drain) {
|
||||
super(material, slot, texture, maxPower, chargeRate, consumption, drain);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelArmorNCRPA[] models;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
if(models == null) { models = new ModelArmorNCRPA[4];
|
||||
for(int i = 0; i < 4; i++) models[i] = new ModelArmorNCRPA(i);
|
||||
}
|
||||
|
||||
return models[armorSlot];
|
||||
}
|
||||
|
||||
@Override public Item getItemForRenderer() { return this; }
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() { setupRenderInv(); }
|
||||
public void renderNonInv() { setupRenderNonInv(); }
|
||||
public void renderCommon() {
|
||||
if(armorType == 0) GL11.glTranslated(0, 0.5, 0);
|
||||
renderStandard(ResourceManager.armor_ncr, armorType,
|
||||
ResourceManager.ncrpa_helmet, ResourceManager.ncrpa_chest, ResourceManager.ncrpa_arm, ResourceManager.ncrpa_leg,
|
||||
"Helmet,Eyes", "Chest", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "LeftBoot", "RightBoot");
|
||||
}};
|
||||
}
|
||||
|
||||
public static final ArmorNCRPAMelee meleeComponent = new ArmorNCRPAMelee();
|
||||
|
||||
@Override
|
||||
public IPAMelee getMeleeComponent(EntityPlayer entity) {
|
||||
if(this.hasFSBArmorIgnoreCharge(entity)) return meleeComponent;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
50
src/main/java/com/hbm/items/armor/ArmorNCRPAMelee.java
Normal file
@ -0,0 +1,50 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArmorNCRPAMelee implements IPAMelee {
|
||||
|
||||
public void setupFirstPerson(ItemStack stack) { }
|
||||
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.ncrpa_arm);
|
||||
|
||||
GL11.glTranslated(0, -1.5, 0.5);
|
||||
double scale = 0.125D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double forwardTilt = 60;
|
||||
double offsetOutward = 3;
|
||||
double roll = 60;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(forwardTilt, 1, 0, 0);
|
||||
|
||||
GL11.glTranslated(offsetOutward, 0, 0);
|
||||
GL11.glTranslated(6, 8, 0);
|
||||
GL11.glRotated(roll, 0, 1, 0);
|
||||
GL11.glRotated(10, 0, 0, 1);
|
||||
GL11.glTranslated(-6, -8, 0);
|
||||
ResourceManager.armor_ncr.renderPart("LeftArm");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
//GL11.glTranslated(7, 0, 4);
|
||||
|
||||
GL11.glRotated(forwardTilt, 1, 0, 0);
|
||||
|
||||
GL11.glTranslated(-offsetOutward, 0, 0);
|
||||
GL11.glTranslated(-6, 8, 0);
|
||||
GL11.glRotated(-90, 0, 0, 1);
|
||||
GL11.glRotated(-roll - 30, 0, 1, 0);
|
||||
GL11.glTranslated(6, -8, 0);
|
||||
ResourceManager.armor_ncr.renderPart("RightArm");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
9
src/main/java/com/hbm/items/armor/IPAMelee.java
Normal file
@ -0,0 +1,9 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IPAMelee {
|
||||
|
||||
public void setupFirstPerson(ItemStack stack);
|
||||
public void renderFirstPerson(ItemStack stack);
|
||||
}
|
||||
22
src/main/java/com/hbm/items/armor/IPAWeaponsProvider.java
Normal file
@ -0,0 +1,22 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public interface IPAWeaponsProvider {
|
||||
|
||||
public IPAMelee getMeleeComponent(EntityPlayer entity);
|
||||
|
||||
public static IPAMelee getMeleeComponentClient() {
|
||||
return getMeleeComponentCommon(MainRegistry.proxy.me());
|
||||
}
|
||||
|
||||
public static IPAMelee getMeleeComponentCommon(EntityPlayer player) {
|
||||
if(player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() instanceof IPAWeaponsProvider) {
|
||||
IPAWeaponsProvider prov = (IPAWeaponsProvider) player.inventory.armorInventory[2].getItem();
|
||||
return prov.getMeleeComponent(player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -82,6 +82,7 @@ public class GunFactory {
|
||||
XFactory45.init();
|
||||
XFactoryTool.init();
|
||||
XFactoryDrill.init();
|
||||
XFactoryPA.init();
|
||||
|
||||
ModItems.weapon_mod_test = new ItemEnumMulti(EnumModTest.class, true, true).setUnlocalizedName("weapon_mod_test").setMaxStackSize(1);
|
||||
ModItems.weapon_mod_generic = new ItemEnumMulti(EnumModGeneric.class, true, true).setUnlocalizedName("weapon_mod_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
|
||||
@ -105,6 +105,7 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_charge_thrower, new ItemRenderChargeThrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_drill, new ItemRenderDrill());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_n_i_4_n_i, new ItemRenderNI4NI());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_pa_melee, new ItemRenderPAMelee());
|
||||
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.AnimationEnums.GunAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class XFactoryPA {
|
||||
|
||||
public static void init() {
|
||||
|
||||
ModItems.gun_pa_melee = new ItemGunMelee(WeaponQuality.UTILITY, new GunConfig()
|
||||
.draw(10).inspect(55).crosshair(Crosshair.NONE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(20).jam(0)
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.canFire(LAMBDA_MELEE_CAN_FIRE).fire(LAMBDA_MELEE_FIRE))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).rp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_MELEE_ANIMS).orchestra(Orchestras.ORCHESTRA_DRILL)
|
||||
).setUnlocalizedName("gun_pa_melee");
|
||||
}
|
||||
|
||||
public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MELEE_ANIMS = (stack, type) -> {
|
||||
if(type == GunAnimation.EQUIP) return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().setPos(-1, 0, 0).addPos(0, 0, 0, 750, IType.SIN_DOWN));
|
||||
|
||||
return new BusAnimation()
|
||||
.addBus("SWING", new BusAnimationSequence().setPos(-1, 0, 0).addPos(0, 0, 0, 750, IType.SIN_DOWN));
|
||||
};
|
||||
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_MELEE_CAN_FIRE = (stack, ctx) -> { return true; };
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_MELEE_FIRE = (stack, ctx) -> {
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
ItemGunBaseNT.playAnimation(player, stack, ItemGunBaseNT.getPrimary(stack, 0) ? GunAnimation.CYCLE : GunAnimation.ALT_CYCLE, ctx.configIndex);
|
||||
};
|
||||
|
||||
public static class ItemGunMelee extends ItemGunBaseNT {
|
||||
|
||||
public ItemGunMelee(WeaponQuality quality, GunConfig... cfg) {
|
||||
super(quality, cfg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
|
||||
}
|
||||
}
|
||||
@ -220,7 +220,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.memespoon, 1), new Object[] { "CGC", "PSP", "IAI", 'C', ModItems.powder_yellowcake, 'G', TH232.block(), 'P', ModItems.photo_panel, 'S', ModItems.steel_shovel, 'I', ModItems.plate_polymer, 'A', "ingotAustralium" });
|
||||
addShapelessAuto(new ItemStack(ModItems.cbt_device, 1), new Object[] { STEEL.bolt(), ModItems.wrench });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.toothpicks, 3), new Object[] { KEY_STICK, KEY_STICK, KEY_STICK });
|
||||
addRecipeAuto(new ItemStack(ModItems.ducttape, 4), new Object[] { "F", "P", "S", 'F', Items.string, 'S', KEY_SLIME, 'P', Items.paper });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.radio_torch_sender, 4), new Object[] { "G", "R", "I", 'G', "dustGlowstone", 'R', Blocks.redstone_torch, 'I', NETHERQUARTZ.gem() });
|
||||
@ -619,7 +618,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_interface), new Object[] { "ISI", "PCP", "PAP", 'I', STEEL.ingot(), 'S', STAR.ingot(), 'P', ModItems.plate_polymer, 'C', ModItems.sat_chip, 'A', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addRecipeAuto(new ItemStack(ModItems.sat_coord), new Object[] { "SII", "SCA", "SPP", 'I', STEEL.ingot(), 'S', STAR.ingot(), 'P', ModItems.plate_polymer, 'C', ModItems.sat_chip, 'A', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_transformer), new Object[] { "SCS", "MDM", "SCS", 'S', IRON.ingot(), 'D', MINGRADE.ingot(), 'M',ModItems.coil_advanced_alloy, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_transformer_dnt), new Object[] { "SDS", "MCM", "MCM", 'S', STAR.ingot(), 'D', DESH.ingot(), 'M', MAGTUNG.wireDense(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.radiobox), new Object[] { "PLP", "PSP", "PLP", 'P', STEEL.plate(), 'S', ModItems.ring_starmetal, 'C', ModItems.fusion_core, 'L', getReflector() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.radiorec), new Object[] { " W", "PCP", "PIP", 'W', CU.wireFine(), 'P', STEEL.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'I', ANY_PLASTIC.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.jackt), new Object[] { "S S", "LIL", "LIL", 'S', STEEL.plate(), 'L', Items.leather, 'I', ANY_RUBBER.ingot() });
|
||||
@ -729,8 +727,8 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_schrabidium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_dagaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, SA326.dust(), SA326.dust(), SA326.dust(), SA326.dust() });
|
||||
addShapelessAuto(new ItemStack(ModItems.ams_catalyst_dineutronium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_hagalaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, DNT.dust(), DNT.dust(), DNT.dust(), DNT.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_core, 1), new Object[] { "DLD", "LML", "DLD", 'D', ModItems.ingot_bismuth, 'L', DNT.block(), 'M', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BISMOID) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModBlocks.machine_transformer_dnt, 'X', ModBlocks.block_dineutronium, 'L', STEEL.shell() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_emitter, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()), 'X', ModItems.crystal_xen, 'L', ModItems.sat_head_laser });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_receiver, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_QUANTUM.ordinal()), 'X', ModBlocks.block_dineutronium, 'L', STEEL.shell() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_injector, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', CMB.plate(), 'T', ModBlocks.machine_fluidtank, 'X', ModItems.motor, 'L', STEEL.pipe() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', OSMIRIDIUM.plateWelded(), 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModBlocks.hadron_coil_alloy, 'L', ModItems.crystal_xen });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.barrel_plastic, 1), new Object[] { "IPI", "I I", "IPI", 'I', ModItems.plate_polymer, 'P', AL.plate() });
|
||||
|
||||
@ -1479,6 +1479,12 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.sat_resonator");
|
||||
ignoreMappings.add("hbm:item.sliding_blast_door_skin");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_vault");
|
||||
ignoreMappings.add("hbm:item.toothpicks");
|
||||
ignoreMappings.add("hbm:item.ams_focus_blank");
|
||||
ignoreMappings.add("hbm:item.ams_focus_limiter");
|
||||
ignoreMappings.add("hbm:item.ams_focus_booster");
|
||||
ignoreMappings.add("hbm:item.ams_muzzle");
|
||||
ignoreMappings.add("hbm:tile.machine_transformer_dnt");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -830,8 +830,7 @@ public class ModEventHandlerClient {
|
||||
//@SubscribeEvent
|
||||
public void onRenderStorm(RenderHandEvent event) {
|
||||
|
||||
if(BlockAshes.ashes == 0)
|
||||
return;
|
||||
if(BlockAshes.ashes <= 0) return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -905,7 +904,7 @@ public class ModEventHandlerClient {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ArmorNo9.updateWorldHook(mc.theWorld);
|
||||
|
||||
boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded("angelica");
|
||||
boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded(Compat.MOD_ANG);
|
||||
|
||||
if(mc.gameSettings.renderDistanceChunks > 16 && GeneralConfig.enableRenderDistCheck && !supportsHighRenderDistance) {
|
||||
mc.gameSettings.renderDistanceChunks = 16;
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.items.weapon.sedna.factory.XFactoryDrill;
|
||||
import com.hbm.packet.PermaSyncHandler;
|
||||
import com.hbm.render.item.weapon.sedna.ItemRenderWeaponBase;
|
||||
import com.hbm.render.model.ModelMan;
|
||||
import com.hbm.render.util.RenderScreenOverlay;
|
||||
import com.hbm.util.Clock;
|
||||
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
@ -87,7 +88,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo()) {
|
||||
if(renderGun.isAkimbo(player)) {
|
||||
partsHidden[EnumPlayerPart.LEFT_ARM.ordinal()] = true;
|
||||
ModelRenderer box = getBoxFromType(renderer, EnumPlayerPart.LEFT_ARM);
|
||||
box.isHidden = true;
|
||||
@ -138,7 +139,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo()) akimbo = true;
|
||||
if(renderGun.isAkimbo(player)) akimbo = true;
|
||||
if(renderGun.isLeftHanded()) leftHand = true;
|
||||
}
|
||||
}
|
||||
@ -232,7 +233,7 @@ public class ModEventHandlerRenderer {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderGun = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderGun.isAkimbo()) {
|
||||
if(renderGun.isAkimbo(player)) {
|
||||
ModelBiped biped = renderer.modelBipedMain;
|
||||
renderer.modelArmorChestplate.bipedLeftArm.rotateAngleY = renderer.modelArmor.bipedLeftArm.rotateAngleY = biped.bipedLeftArm.rotateAngleY = 0.1F + biped.bipedHead.rotateAngleY;
|
||||
}
|
||||
@ -257,7 +258,7 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderWeapon = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderWeapon.isAkimbo() || renderWeapon.isLeftHanded()) {
|
||||
if(renderWeapon.isAkimbo(player) || renderWeapon.isLeftHanded()) {
|
||||
GL11.glPushMatrix();
|
||||
renderer.modelBipedMain.bipedLeftArm.isHidden = false;
|
||||
renderer.modelBipedMain.bipedLeftArm.postRender(0.0625F);
|
||||
@ -569,6 +570,11 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onRenderHUD(RenderGameOverlayEvent.Pre event) {
|
||||
|
||||
//TODO: using ALL doesn't work as anticipated - still hides in F1. need a different event for this
|
||||
if(event.type == ElementType.ALL) {
|
||||
if(ClientConfig.BADGES_HUD.get()) RenderScreenOverlay.renderBadges(event.resolution, Minecraft.getMinecraft().ingameGUI);
|
||||
}
|
||||
|
||||
if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) > 0 && ClientConfig.NUKE_HUD_SHAKE.get()) {
|
||||
double mult = (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) / (double) ModEventHandlerClient.shakeDuration * 2;
|
||||
@ -581,7 +587,7 @@ public class ModEventHandlerRenderer {
|
||||
@SubscribeEvent
|
||||
public void onRenderHand(RenderHandEvent event) {
|
||||
|
||||
//can't use plaxer.getHeldItem() here because the item rendering persists for a few frames after hitting the switch key
|
||||
//can't use player.getHeldItem() here because the item rendering persists for a few frames after hitting the switch key
|
||||
ItemStack toRender = Minecraft.getMinecraft().entityRenderer.itemRenderer.itemToRender;
|
||||
|
||||
if(toRender != null) {
|
||||
|
||||
@ -968,6 +968,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj")).asVBO();
|
||||
public static final IModelCustom armor_dieselsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bnuuy.obj")).asVBO();
|
||||
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj")).asVBO();
|
||||
public static final IModelCustom armor_ncr = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/ncrpa.obj")).asVBO();
|
||||
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj")).asVBO();
|
||||
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj")).asVBO();
|
||||
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj")).asVBO();
|
||||
@ -1154,6 +1155,11 @@ public class ResourceManager {
|
||||
public static final ResourceLocation rpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_chest.png");
|
||||
public static final ResourceLocation rpa_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/rpa_arm.png");
|
||||
|
||||
public static final ResourceLocation ncrpa_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_helmet.png");
|
||||
public static final ResourceLocation ncrpa_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_leg.png");
|
||||
public static final ResourceLocation ncrpa_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_chest.png");
|
||||
public static final ResourceLocation ncrpa_arm = new ResourceLocation(RefStrings.MODID, "textures/armor/ncrpa_arm.png");
|
||||
|
||||
public static final ResourceLocation taurun_helmet = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_helmet.png");
|
||||
public static final ResourceLocation taurun_leg = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_leg.png");
|
||||
public static final ResourceLocation taurun_chest = new ResourceLocation(RefStrings.MODID, "textures/armor/taurun_chest.png");
|
||||
|
||||
@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderDANI extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderEOTT extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderMareslegAkimbo extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
|
||||
@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderMinigunDual extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.armor.IPAMelee;
|
||||
import com.hbm.items.armor.IPAWeaponsProvider;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderPAMelee extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) component.setupFirstPerson(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
IPAMelee component = IPAWeaponsProvider.getMeleeComponentClient();
|
||||
if(component != null) component.renderFirstPerson(stack);
|
||||
}
|
||||
|
||||
@Override public void setupThirdPerson(ItemStack stack) { }
|
||||
@Override public void setupThirdPersonAkimbo(ItemStack stack) { }
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glScaled(1, 1, -1);
|
||||
GL11.glTranslated(8, 8, 0);
|
||||
double scale = 2.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupModTable(ItemStack stack) {
|
||||
double scale = -12.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glTranslated(0, -0.5, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInv(ItemStack stack) {
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.maresleg_tex);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(225, 0, 0, 1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
ResourceManager.maresleg.renderPart("Gun");
|
||||
ResourceManager.maresleg.renderPart("Lever");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslated(0, 0, 5);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(225, 0, 0, 1);
|
||||
GL11.glRotated(-90, 0, 1, 0);
|
||||
GL11.glRotated(-90, 1, 0, 0);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(-45, 0, 1, 0);
|
||||
GL11.glTranslated(1, 0, 0);
|
||||
ResourceManager.maresleg.renderPart("Gun");
|
||||
ResourceManager.maresleg.renderPart("Lever");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderStarFAkimbo extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
|
||||
@Override public boolean isAkimbo() { return true; }
|
||||
@Override public boolean isAkimbo(EntityLivingBase entity) { return true; }
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@ -36,7 +36,7 @@ public abstract class ItemRenderWeaponBase implements IItemRenderer {
|
||||
public static float interp;
|
||||
public static HashMap<EntityLivingBase, Long> flashMap = new HashMap<EntityLivingBase, Long>();
|
||||
|
||||
public boolean isAkimbo() { return false; }
|
||||
public boolean isAkimbo(EntityLivingBase entity) { return false; }
|
||||
public boolean isLeftHanded() { return false; }
|
||||
|
||||
@Override
|
||||
|
||||
@ -52,6 +52,7 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
public ResourceLocation resource;
|
||||
private String fileName;
|
||||
private boolean smoothing = true;
|
||||
private boolean allowMixedMode = false;
|
||||
|
||||
public HFRWavefrontObject(String name) throws ModelFormatException {
|
||||
this(new ResourceLocation(RefStrings.MODID, name));
|
||||
@ -61,6 +62,13 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
this.smoothing = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Provides a way for a model to have both tris and quads, however this means it can't be rendered directly.
|
||||
* Useful for ISBRHs which access vertices manually, allowing the quad to tri trick without forcing the entire model to be redundant tris. */
|
||||
public HFRWavefrontObject mixedMode() {
|
||||
this.allowMixedMode = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public HFRWavefrontObject(ResourceLocation resource) throws ModelFormatException {
|
||||
this.resource = resource;
|
||||
@ -164,6 +172,8 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderAll() {
|
||||
if(allowMixedMode) throw new UnsupportedOperationException("Rendering of mixed-mode model " + this.fileName + " is not supported!");
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
if(currentGroupObject != null) {
|
||||
@ -179,13 +189,15 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void tessellateAll(Tessellator tessellator) {
|
||||
for(S_GroupObject groupObject : groupObjects) {
|
||||
groupObject.render(tessellator);
|
||||
groupObject.tessellate(tessellator);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderOnly(String... groupNames) {
|
||||
if(allowMixedMode) throw new UnsupportedOperationException("Rendering of mixed-mode model " + this.fileName + " is not supported!");
|
||||
|
||||
for(S_GroupObject groupObject : groupObjects) {
|
||||
for(String groupName : groupNames) {
|
||||
if(groupName.equalsIgnoreCase(groupObject.name)) {
|
||||
@ -200,7 +212,7 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
for(S_GroupObject groupObject : groupObjects) {
|
||||
for(String groupName : groupNames) {
|
||||
if(groupName.equalsIgnoreCase(groupObject.name)) {
|
||||
groupObject.render(tessellator);
|
||||
groupObject.tessellate(tessellator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,6 +221,8 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderPart(String partName) {
|
||||
if(allowMixedMode) throw new UnsupportedOperationException("Rendering of mixed-mode model " + this.fileName + " is not supported!");
|
||||
|
||||
for(S_GroupObject groupObject : groupObjects) {
|
||||
if(partName.equalsIgnoreCase(groupObject.name)) {
|
||||
groupObject.render();
|
||||
@ -220,7 +234,7 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
public void tessellatePart(Tessellator tessellator, String partName) {
|
||||
for(S_GroupObject groupObject : groupObjects) {
|
||||
if(partName.equalsIgnoreCase(groupObject.name)) {
|
||||
groupObject.render(tessellator);
|
||||
groupObject.tessellate(tessellator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -228,6 +242,8 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderAllExcept(String... excludedGroupNames) {
|
||||
if(allowMixedMode) throw new UnsupportedOperationException("Rendering of mixed-mode model " + this.fileName + " is not supported!");
|
||||
|
||||
for(S_GroupObject groupObject : groupObjects) {
|
||||
boolean skipPart = false;
|
||||
for(String excludedGroupName : excludedGroupNames) {
|
||||
@ -252,7 +268,7 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
}
|
||||
}
|
||||
if(!exclude) {
|
||||
groupObject.render(tessellator);
|
||||
groupObject.tessellate(tessellator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -332,19 +348,21 @@ public class HFRWavefrontObject implements IModelCustomNamed {
|
||||
String[] tokens = trimmedLine.split(" ");
|
||||
String[] subTokens = null;
|
||||
|
||||
if(tokens.length == 3) {
|
||||
if(currentGroupObject.glDrawingMode == -1) {
|
||||
currentGroupObject.glDrawingMode = GL11.GL_TRIANGLES;
|
||||
} else if(currentGroupObject.glDrawingMode != GL11.GL_TRIANGLES) {
|
||||
throw new ModelFormatException("Error parsing entry ('" + line + "'" + ", line " + lineCount + ") in file '" + fileName
|
||||
+ "' - Invalid number of points for face (expected 4, found " + tokens.length + ")");
|
||||
}
|
||||
} else if(tokens.length == 4) {
|
||||
if(currentGroupObject.glDrawingMode == -1) {
|
||||
currentGroupObject.glDrawingMode = GL11.GL_QUADS;
|
||||
} else if(currentGroupObject.glDrawingMode != GL11.GL_QUADS) {
|
||||
throw new ModelFormatException("Error parsing entry ('" + line + "'" + ", line " + lineCount + ") in file '" + fileName
|
||||
+ "' - Invalid number of points for face (expected 3, found " + tokens.length + ")");
|
||||
if(!this.allowMixedMode) {
|
||||
if(tokens.length == 3) {
|
||||
if(currentGroupObject.glDrawingMode == -1) {
|
||||
currentGroupObject.glDrawingMode = GL11.GL_TRIANGLES;
|
||||
} else if(currentGroupObject.glDrawingMode != GL11.GL_TRIANGLES) {
|
||||
throw new ModelFormatException("Error parsing entry ('" + line + "'" + ", line " + lineCount + ") in file '" + fileName
|
||||
+ "' - Invalid number of points for face (expected 4, found " + tokens.length + ")");
|
||||
}
|
||||
} else if(tokens.length == 4) {
|
||||
if(currentGroupObject.glDrawingMode == -1) {
|
||||
currentGroupObject.glDrawingMode = GL11.GL_QUADS;
|
||||
} else if(currentGroupObject.glDrawingMode != GL11.GL_QUADS) {
|
||||
throw new ModelFormatException("Error parsing entry ('" + line + "'" + ", line " + lineCount + ") in file '" + fileName
|
||||
+ "' - Invalid number of points for face (expected 3, found " + tokens.length + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,12 +26,12 @@ public class S_GroupObject {
|
||||
if (this.faces.size() > 0) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawing(this.glDrawingMode);
|
||||
render(tessellator);
|
||||
tessellate(tessellator);
|
||||
tessellator.draw();
|
||||
}
|
||||
}
|
||||
|
||||
public void render(Tessellator tessellator) {
|
||||
public void tessellate(Tessellator tessellator) {
|
||||
if (this.faces.size() > 0) {
|
||||
for (S_Face face : this.faces) {
|
||||
face.addFaceForRender(tessellator);
|
||||
|
||||
77
src/main/java/com/hbm/render/model/ModelArmorNCRPA.java
Normal file
@ -0,0 +1,77 @@
|
||||
package com.hbm.render.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.loader.ModelRendererObj;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelArmorNCRPA extends ModelArmorBase {
|
||||
|
||||
ModelRendererObj eyes;
|
||||
|
||||
public ModelArmorNCRPA(int type) {
|
||||
super(type);
|
||||
|
||||
this.head = new ModelRendererObj(ResourceManager.armor_ncr, "Helmet");
|
||||
this.eyes = new ModelRendererObj(ResourceManager.armor_ncr, "Eyes");
|
||||
this.body = new ModelRendererObj(ResourceManager.armor_ncr, "Chest");
|
||||
this.leftArm = new ModelRendererObj(ResourceManager.armor_ncr, "LeftArm").setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
this.rightArm = new ModelRendererObj(ResourceManager.armor_ncr, "RightArm").setRotationPoint(-5.0F, 2.0F, 0.0F);
|
||||
this.leftLeg = new ModelRendererObj(ResourceManager.armor_ncr, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.rightLeg = new ModelRendererObj(ResourceManager.armor_ncr, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
this.leftFoot = new ModelRendererObj(ResourceManager.armor_ncr, "LeftBoot").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
this.rightFoot = new ModelRendererObj(ResourceManager.armor_ncr, "RightBoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor) {
|
||||
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);
|
||||
this.head.copyTo(this.eyes);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
if(this.type == 0) {
|
||||
bindTexture(ResourceManager.ncrpa_helmet);
|
||||
this.head.render(scaleFactor);
|
||||
|
||||
/// START GLOW ///
|
||||
float lastX = OpenGlHelper.lastBrightnessX;
|
||||
float lastY = OpenGlHelper.lastBrightnessY;
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.eyes.render(scaleFactor);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastX, lastY);
|
||||
/// END GLOW ///
|
||||
}
|
||||
if(this.type == 1) {
|
||||
|
||||
bindTexture(ResourceManager.ncrpa_arm);
|
||||
this.leftArm.render(scaleFactor);
|
||||
this.rightArm.render(scaleFactor);
|
||||
|
||||
bindTexture(ResourceManager.ncrpa_chest);
|
||||
this.body.render(scaleFactor);
|
||||
}
|
||||
if(this.type == 2) {
|
||||
bindTexture(ResourceManager.ncrpa_leg);
|
||||
this.leftLeg.render(scaleFactor);
|
||||
this.rightLeg.render(scaleFactor);
|
||||
}
|
||||
if(this.type == 3) {
|
||||
bindTexture(ResourceManager.ncrpa_leg);
|
||||
this.leftFoot.render(scaleFactor);
|
||||
this.rightFoot.render(scaleFactor);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,8 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.MobConfig;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.interfaces.Untested;
|
||||
@ -66,24 +68,13 @@ public class RenderScreenOverlay {
|
||||
gui.drawTexturedModalRect(posX, posY, 0, 0, 94, 18);
|
||||
gui.drawTexturedModalRect(posX + 1, posY + 1, 1, 19, bar, 16);
|
||||
|
||||
if(radiation >= 25) {
|
||||
gui.drawTexturedModalRect(posX + length + 2, posY - 18, 36, 36, 18, 18);
|
||||
if(radiation >= 25) gui.drawTexturedModalRect(posX + length + 2, posY - 18, 36, 36, 18, 18);
|
||||
else if(radiation >= 10) gui.drawTexturedModalRect(posX + length + 2, posY - 18, 18, 36, 18, 18);
|
||||
else if(radiation >= 2.5) gui.drawTexturedModalRect(posX + length + 2, posY - 18, 0, 36, 18, 18);
|
||||
|
||||
} else if(radiation >= 10) {
|
||||
gui.drawTexturedModalRect(posX + length + 2, posY - 18, 18, 36, 18, 18);
|
||||
|
||||
} else if(radiation >= 2.5) {
|
||||
gui.drawTexturedModalRect(posX + length + 2, posY - 18, 0, 36, 18, 18);
|
||||
|
||||
}
|
||||
|
||||
if(radiation > 1000) {
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(">1000 RAD/s", posX, posY - 8, 0xFF0000);
|
||||
} else if(radiation >= 1) {
|
||||
Minecraft.getMinecraft().fontRenderer.drawString(((int) Math.round(radiation)) + " RAD/s", posX, posY - 8, 0xFF0000);
|
||||
} else if(radiation > 0) {
|
||||
Minecraft.getMinecraft().fontRenderer.drawString("<1 RAD/s", posX, posY - 8, 0xFF0000);
|
||||
}
|
||||
if(radiation > 1000) Minecraft.getMinecraft().fontRenderer.drawString(">1000 RAD/s", posX, posY - 8, 0xFF0000);
|
||||
else if(radiation >= 1) Minecraft.getMinecraft().fontRenderer.drawString(((int) Math.round(radiation)) + " RAD/s", posX, posY - 8, 0xFF0000);
|
||||
else if(radiation > 0) Minecraft.getMinecraft().fontRenderer.drawString("<1 RAD/s", posX, posY - 8, 0xFF0000);
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(true);
|
||||
@ -92,7 +83,6 @@ public class RenderScreenOverlay {
|
||||
}
|
||||
|
||||
private static int getScaled(double cur, double max, double scale) {
|
||||
|
||||
return (int) Math.min(cur / max * scale, scale);
|
||||
}
|
||||
|
||||
@ -185,22 +175,20 @@ public class RenderScreenOverlay {
|
||||
|
||||
@Spaghetti ("like a fella once said, aint that a kick in the head")
|
||||
public static void renderDashBar(ScaledResolution resolution, Gui gui, HbmPlayerProps props) {
|
||||
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
int width = 30;
|
||||
|
||||
int posX = 16;//(int)(resolution.getScaledWidth()/2 - ((props.getDashCount()*(width+2))/2));
|
||||
int posX = 16;
|
||||
int posY = resolution.getScaledHeight() - 40 - 2;
|
||||
|
||||
mc.renderEngine.bindTexture(misc);
|
||||
@ -208,12 +196,7 @@ public class RenderScreenOverlay {
|
||||
gui.drawTexturedModalRect(posX-10, posY, 107, 18, 7, 10);
|
||||
|
||||
int stamina = props.getStamina();
|
||||
|
||||
int dashes = props.getDashCount();
|
||||
|
||||
//int count = props.getDashCount();
|
||||
//int x3count = count / 3;
|
||||
|
||||
int rows = dashes / 3;
|
||||
int finalColumns = dashes % 3;
|
||||
|
||||
@ -231,9 +214,8 @@ public class RenderScreenOverlay {
|
||||
barStatus = 3;
|
||||
} else if(staminaDiv == barID) {
|
||||
barStatus = 2;
|
||||
barSize = (int)((float)(stamina % 30) * (width/30F) );
|
||||
if(barID == 0)
|
||||
barStatus = 0;
|
||||
barSize = (int) ((float) (stamina % 30) * (width/30F));
|
||||
if(barID == 0) barStatus = 0;
|
||||
}
|
||||
gui.drawTexturedModalRect(posX + (width+2)*x, posY - 12*y, 76, 18+(10*barStatus), barSize, 10);
|
||||
|
||||
@ -243,10 +225,9 @@ public class RenderScreenOverlay {
|
||||
if(fadeOut > 0 && staminaDiv-1 == barID) {
|
||||
GL11.glColor4f(1F, 1F, 1F, fadeOut);
|
||||
int bar = barID;
|
||||
if(stamina % 30 >= 25)
|
||||
bar++;
|
||||
if(bar / 3 != y)
|
||||
y++;
|
||||
if(stamina % 30 >= 25) bar++;
|
||||
if(bar / 3 != y) y++;
|
||||
|
||||
bar = bar % 3;
|
||||
gui.drawTexturedModalRect(posX + (width + 2) * bar, posY - 12 * y, 76, 58, width, 10);
|
||||
fadeOut -= 0.04F;
|
||||
@ -255,45 +236,10 @@ public class RenderScreenOverlay {
|
||||
}
|
||||
}
|
||||
|
||||
/*for(int x = 0; x < props.getDashCount(); x++) {
|
||||
int status = 3;
|
||||
gui.drawTexturedModalRect(posX + (24)*x, posY, 76, 48, 24, 10);
|
||||
int staminaDiv = stamina / 60;
|
||||
if(staminaDiv > x) {
|
||||
status = 1;
|
||||
} else if(staminaDiv == x) {
|
||||
width = (int)( (float)(stamina % 60) * (width/60F) );
|
||||
status = 2;
|
||||
if(staminaDiv == 0)
|
||||
status = 0;
|
||||
}
|
||||
/*if(staminaDiv-1 == x && (stamina % 60 < 20 && stamina % 60 != 0)) {
|
||||
status = 4;
|
||||
}
|
||||
/*if(((staminaDiv == x && stamina % 60 >= 55) || (staminaDiv-1 == x && stamina % 60 <= 5)) && !(stamina == props.totalDashCount * 60)) {
|
||||
status = 4;
|
||||
}
|
||||
gui.drawTexturedModalRect(posX + (24)*x, posY, 76, 18+(10*status), width, 10);
|
||||
|
||||
if(staminaDiv == x && stamina % 60 >= 57) {
|
||||
fadeOut = 1F;
|
||||
}
|
||||
if(fadeOut > 0 && staminaDiv-1 == x) {
|
||||
GL11.glColor4f(1F, 1F, 1F, fadeOut);
|
||||
int bar = x;
|
||||
if(stamina % 60 >= 50)
|
||||
bar++;
|
||||
System.out.println(bar);
|
||||
gui.drawTexturedModalRect(posX + 24*bar, posY, 76, 58, width, 10);
|
||||
fadeOut -= 0.04F;
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
mc.renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
@ -330,8 +276,6 @@ public class RenderScreenOverlay {
|
||||
public static void renderScope(ScaledResolution res, ResourceLocation tex) {
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
//GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
//GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
@ -367,4 +311,42 @@ public class RenderScreenOverlay {
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
public static void renderBadges(ScaledResolution res, Gui gui) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
Minecraft.getMinecraft().entityRenderer.setupOverlayRendering();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
|
||||
|
||||
int offsetX = 2;
|
||||
int offsetY = 2;
|
||||
int width = 26;
|
||||
|
||||
boolean true528 = GeneralConfig.true528();
|
||||
boolean trueExp = GeneralConfig.trueExp();
|
||||
boolean trueRam = MobConfig.trueRam();
|
||||
boolean true328 = true528 && trueExp && trueRam;
|
||||
|
||||
if(true528) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 218, 24, 8); offsetX += width; }
|
||||
if(trueExp) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 226, 24, 8); offsetX += width; }
|
||||
if(trueRam) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 234, 24, 8); offsetX += width; }
|
||||
if(true328) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 242, 24, 8); offsetX += width; }
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import javax.annotation.CheckForNull;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
|
||||
import com.hbm.interfaces.HalfLifeType;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import java.util.List;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.config.ServerConfig;
|
||||
import com.hbm.handler.pollution.PollutionHandler;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.handler.threading.PacketThreading;
|
||||
@ -381,7 +382,7 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro
|
||||
for(MaterialStack material : materials) {
|
||||
boolean recipeMaterial = recipe != null && (getQuantaFromType(recipe.input, material.material) > 0 || getQuantaFromType(recipe.output, material.material) > 0);
|
||||
|
||||
if(recipe == null || recipeMaterial) {
|
||||
if((recipe == null && !ServerConfig.LEGACY_CRUCIBLE_RULES.get()) || recipeMaterial) {
|
||||
this.addToStack(this.recipeStack, material);
|
||||
} else {
|
||||
this.addToStack(this.wasteStack, material);
|
||||
|
||||
@ -101,7 +101,8 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im
|
||||
public void onClientTick() {
|
||||
|
||||
this.lastRotor = this.rotor;
|
||||
this.rotor += this.spin * 30;
|
||||
float speed = this.spin >= 0.5 ? 30 : (float) (Math.pow(this.spin * 2, 0.5) * 30);
|
||||
this.rotor += speed;
|
||||
|
||||
if(this.rotor >= 360) {
|
||||
this.lastRotor -= 360;
|
||||
|
||||
@ -4,6 +4,9 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.JsonToNBT;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTException;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
@ -234,4 +237,16 @@ public class ItemStackUtil {
|
||||
public static boolean areStacksCompatible(ItemStack sta1, ItemStack sta2) {
|
||||
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage() && ItemStack.areItemStackTagsEqual(sta1, sta2);
|
||||
}
|
||||
|
||||
/** I can never remember where this fucking util crap is, so I just write my own wrapper */
|
||||
public static void addNBTFromString(ItemStack stack, String nbt) {
|
||||
|
||||
try {
|
||||
NBTBase compound = JsonToNBT.func_150315_a(nbt);
|
||||
if(compound instanceof NBTTagCompound) {
|
||||
stack.stackTagCompound = (NBTTagCompound) compound;
|
||||
}
|
||||
|
||||
} catch(NBTException e) { }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import com.hbm.config.VersatileConfig;
|
||||
import com.hbm.interfaces.ICustomWarhead.SaltedFuel.HalfLifeType;
|
||||
import com.hbm.interfaces.HalfLifeType;
|
||||
import com.hbm.items.machine.ItemRTGPellet;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
@ -2710,6 +2710,10 @@ item.multitool_silk.name=Power Fist (Behutsamkeitsklaue)
|
||||
item.multitool_sky.name=Power Fist (Crack the Sky)
|
||||
item.mysteryshovel.name=Brüchiger Spaten
|
||||
item.n2_charge.name=Große Sprengladung
|
||||
item.ncrpa_boots.name=RNK Ranger Powerrüstungsstiefel
|
||||
item.ncrpa_helmet.name=RNK Ranger Powerrüstungshelm
|
||||
item.ncrpa_legs.name=RNK Ranger Powerrüstungsbeinschutz
|
||||
item.ncrpa_plate.name=RNK Ranger Powerrüstungsbrustpanzer
|
||||
item.neutrino_lens.name=Neutrinolinse
|
||||
item.neutron_reflector.name=Neutronenreflektor
|
||||
item.niter.name=Salpeter
|
||||
|
||||
@ -3641,6 +3641,10 @@ item.multitool_silk.name=Power Fist (Silk Touch Claw)
|
||||
item.multitool_sky.name=Power Fist (Crack the Sky)
|
||||
item.mysteryshovel.name=Brittle Spade
|
||||
item.n2_charge.name=Large Explosive Charge
|
||||
item.ncrpa_boots.name=NCR Ranger Power Armor Boots
|
||||
item.ncrpa_helmet.name=NCR Ranger Power Armor Helmet
|
||||
item.ncrpa_legs.name=NCR Ranger Power Armor Leggings
|
||||
item.ncrpa_plate.name=NCR Ranger Power Armor Chestplate
|
||||
item.neutrino_lens.name=Neutrino Lens
|
||||
item.neutron_reflector.name=Neutron Reflector
|
||||
item.night_vision.name=Night Vision Goggles
|
||||
|
||||
5789
src/main/resources/assets/hbm/models/armor/ncrpa.obj
Normal file
@ -202,14 +202,14 @@
|
||||
"weapon.rocketFlame": {"category": "block", "sounds": [{"name": "weapon/rocketFlame", "stream": false}]},
|
||||
"weapon.ballsLaser": {"category": "hostile", "sounds": [{"name": "weapon/ballsLaser", "stream": false}]},
|
||||
"weapon.dartShoot": {"category": "player", "sounds": [{"name": "weapon/dartShoot", "stream": false}]},
|
||||
"weapon.mukeExplosion": {"category": "player", "sounds": [{"name": "weapon/mukeExplosion", "stream": false}]},
|
||||
"weapon.mukeExplosion": {"category": "block", "sounds": [{"name": "weapon/mukeExplosion", "stream": false}]},
|
||||
"weapon.cDeploy": {"category": "player", "sounds": [{"name": "weapon/cDeploy", "stream": false}]},
|
||||
"weapon.cSwing": {"category": "player", "sounds": [{"name": "weapon/cSwing", "stream": false}]},
|
||||
"weapon.extinguisher": {"category": "player", "sounds": [{"name": "weapon/extinguisher", "stream": false}]},
|
||||
"weapon.robin_explosion": {"category": "player", "sounds": [{"name": "weapon/robin_explosion", "stream": false}]},
|
||||
"weapon.shotgunPump": {"category": "player", "sounds": [{"name": "weapon/shotgunShootPump", "stream": false}]},
|
||||
"weapon.shotgunPumpAlt": {"category": "player", "sounds": [{"name": "weapon/shotgunShootPumpAlt", "stream": false}]},
|
||||
"weapon.explosionMedium": {"category": "player", "sounds": [{"name": "weapon/explosion_medium", "stream": false}]},
|
||||
"weapon.explosionMedium": {"category": "block", "sounds": [{"name": "weapon/explosion_medium", "stream": false}]},
|
||||
"weapon.hicalShot": {"category": "player", "sounds": [{"name": "weapon/hicalShot", "stream": false}]},
|
||||
"weapon.coilgunReload": {"category": "player", "sounds": [{"name": "weapon/coilgunReload", "stream": false}]},
|
||||
"weapon.coilgunShoot": {"category": "player", "sounds": [{"name": "weapon/coilgunShoot", "stream": false}]},
|
||||
@ -219,12 +219,12 @@
|
||||
"weapon.glClose": {"category": "player", "sounds": [{"name": "weapon/glClose", "stream": false}]},
|
||||
"weapon.44Shoot": {"category": "player", "sounds": [{"name": "weapon/44Shoot", "stream": false}]},
|
||||
"weapon.trainImpact": {"category": "player", "sounds": [{"name": "weapon/trainImpact", "stream": false}]},
|
||||
"weapon.nuclearExplosion": {"category": "player", "sounds": [{"name": "weapon/nuclearExplosion", "stream": true}]},
|
||||
"weapon.explosionLargeNear": {"category": "player", "sounds": [{"name": "weapon/explosionLargeNear", "stream": false}]},
|
||||
"weapon.explosionLargeFar": {"category": "player", "sounds": [{"name": "weapon/explosionLargeFar", "stream": false}]},
|
||||
"weapon.explosionSmallNear": {"category": "player", "sounds": ["weapon/explosionSmallNear1", "weapon/explosionSmallNear2", "weapon/explosionSmallNear3"]},
|
||||
"weapon.explosionSmallFar": {"category": "player", "sounds": ["weapon/explosionSmallFar1", "weapon/explosionSmallFar2"]},
|
||||
"weapon.explosionTiny": {"category": "player", "sounds": ["weapon/explosionTiny1", "weapon/explosionTiny2"]},
|
||||
"weapon.nuclearExplosion": {"category": "block", "sounds": [{"name": "weapon/nuclearExplosion", "stream": true}]},
|
||||
"weapon.explosionLargeNear": {"category": "block", "sounds": [{"name": "weapon/explosionLargeNear", "stream": false}]},
|
||||
"weapon.explosionLargeFar": {"category": "block", "sounds": [{"name": "weapon/explosionLargeFar", "stream": false}]},
|
||||
"weapon.explosionSmallNear": {"category": "block", "sounds": ["weapon/explosionSmallNear1", "weapon/explosionSmallNear2", "weapon/explosionSmallNear3"]},
|
||||
"weapon.explosionSmallFar": {"category": "block", "sounds": ["weapon/explosionSmallFar1", "weapon/explosionSmallFar2"]},
|
||||
"weapon.explosionTiny": {"category": "block", "sounds": ["weapon/explosionTiny1", "weapon/explosionTiny2"]},
|
||||
"weapon.hkShoot": {"category": "player", "sounds": [{"name": "weapon/hkShoot", "stream": false}]},
|
||||
|
||||
"weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/armor/ncrpa_arm.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/ncrpa_chest.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/ncrpa_helmet.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/main/resources/assets/hbm/textures/armor/ncrpa_leg.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 423 B |
|
After Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 591 B |
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 201 B |
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 367 B |
|
Before Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 257 B |
|
Before Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 281 B |
|
Before Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 278 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 314 B |
|
Before Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 334 B |
|
Before Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 246 B |
|
Before Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 196 B |
|
Before Width: | Height: | Size: 388 B |
|
Before Width: | Height: | Size: 153 B |
|
Before Width: | Height: | Size: 327 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 274 B |
|
Before Width: | Height: | Size: 345 B |
|
Before Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 281 B |