@ -102,6 +102,12 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_legs, 1), new Object[] { "CCC", "DXD", "C C", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_boots, 1), new Object[] { "C C", "DXD", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_boots });
|
||||
|
||||
//Bismuth fursui- I mean armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_helmet, 1), new Object[] { "GPP", "P ", "FPP", 'G', Items.gold_ingot, 'P', ModItems.plate_bismuth, 'F', ModItems.rag });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_plate, 1), new Object[] { "RWR", "PCP", "SFS", 'R', ModItems.crystal_rare, 'W', ModItems.wire_gold, 'P', ModItems.plate_bismuth, 'C', ModItems.laser_crystal_bismuth, 'S', ModItems.ring_starmetal, 'F', ModItems.rag });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_legs, 1), new Object[] { "FSF", " ", "FSF", 'F', ModItems.rag, 'S', ModItems.ring_starmetal });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_boots, 1), new Object[] { "W W", "P P", 'W', ModItems.wire_gold, 'P', ModItems.plate_bismuth });
|
||||
|
||||
//Euphemium armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.euphemium_helmet, 1), new Object[] { "EEE", "E E", 'E', ModItems.plate_euphemium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.euphemium_plate, 1), new Object[] { "EWE", "EEE", "EEE", 'E', ModItems.plate_euphemium, 'W', ModItems.watch });
|
||||
|
||||
@ -20,6 +20,12 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
|
||||
private boolean[] keysPressed = new boolean[EnumKeybind.values().length];
|
||||
|
||||
public static final int dashCooldownLength = 5;
|
||||
public int dashCooldown = 0;
|
||||
|
||||
public int totalDashCount = 0;
|
||||
public int stamina = 0;
|
||||
|
||||
public HbmPlayerProps(EntityPlayer player) {
|
||||
this.player = player;
|
||||
}
|
||||
@ -69,6 +75,33 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
keysPressed[key.ordinal()] = pressed;
|
||||
}
|
||||
|
||||
public void setDashCooldown(int cooldown) {
|
||||
this.dashCooldown = cooldown;
|
||||
return;
|
||||
}
|
||||
|
||||
public int getDashCooldown() {
|
||||
return this.dashCooldown;
|
||||
}
|
||||
|
||||
public void setStamina(int stamina) {
|
||||
this.stamina = stamina;
|
||||
return;
|
||||
}
|
||||
|
||||
public int getStamina() {
|
||||
return this.stamina;
|
||||
}
|
||||
|
||||
public void setDashCount(int count) {
|
||||
this.totalDashCount = count;
|
||||
return;
|
||||
}
|
||||
|
||||
public int getDashCount() {
|
||||
return this.totalDashCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Entity entity, World world) { }
|
||||
|
||||
|
||||
@ -8,8 +8,11 @@ import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.extprop.HbmLivingProps.ContaminationEffect;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.IArmorModDash;
|
||||
import com.hbm.items.armor.ArmorFSB;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
@ -31,11 +34,13 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityEffectHandler {
|
||||
@ -76,6 +81,8 @@ public class EntityEffectHandler {
|
||||
handleRadiation(entity);
|
||||
handleDigamma(entity);
|
||||
handleLungDisease(entity);
|
||||
|
||||
handleDashing(entity);
|
||||
}
|
||||
|
||||
private static void handleContamination(EntityLivingBase entity) {
|
||||
@ -405,4 +412,92 @@ public class EntityEffectHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void handleDashing(Entity entity) {
|
||||
|
||||
//AAAAAAAAAAAAAAAAAAAAEEEEEEEEEEEEEEEEEEEE
|
||||
if(entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
|
||||
props.setDashCount(0);
|
||||
|
||||
ArmorFSB chestplate = null;
|
||||
|
||||
int armorDashCount = 0;
|
||||
int armorModDashCount = 0;
|
||||
|
||||
if(ArmorFSB.hasFSBArmor(player)) {
|
||||
ItemStack plate = player.inventory.armorInventory[2];
|
||||
|
||||
chestplate = (ArmorFSB)plate.getItem();
|
||||
}
|
||||
|
||||
if(chestplate != null)
|
||||
armorDashCount = chestplate.dashCount;
|
||||
|
||||
for(int armorSlot = 0; armorSlot < 4; armorSlot++) {
|
||||
ItemStack armorStack = player.inventory.armorInventory[armorSlot];
|
||||
|
||||
if(armorStack != null && armorStack.getItem() instanceof ItemArmor) {
|
||||
ItemArmor armor = (ItemArmor)armorStack.getItem();
|
||||
|
||||
for(int modSlot = 0; modSlot < 8; modSlot++) {
|
||||
ItemStack mod = ArmorModHandler.pryMods(armorStack)[modSlot];
|
||||
|
||||
if(mod != null && mod.getItem() instanceof IArmorModDash) {
|
||||
int count = ((IArmorModDash)mod.getItem()).getDashes();
|
||||
armorModDashCount += count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int dashCount = armorDashCount + armorModDashCount;
|
||||
|
||||
//System.out.println(dashCount);
|
||||
|
||||
if(dashCount * 30 < props.getStamina())
|
||||
props.setStamina(dashCount * 30);
|
||||
|
||||
if(dashCount > 0) {
|
||||
|
||||
int perDash = 30;
|
||||
|
||||
props.setDashCount(dashCount);
|
||||
|
||||
int stamina = props.getStamina();
|
||||
|
||||
if(props.getDashCooldown() <= 0) {
|
||||
|
||||
if(!player.capabilities.isFlying && player.isSneaking() && stamina >= perDash) {
|
||||
|
||||
Vec3 lookingIn = player.getLookVec();
|
||||
|
||||
player.addVelocity(lookingIn.xCoord, 0, lookingIn.zCoord);
|
||||
player.playSound("hbm:player.dash", 1.0F, 1.0F);
|
||||
|
||||
props.setDashCooldown(HbmPlayerProps.dashCooldownLength);
|
||||
stamina -= perDash;
|
||||
}
|
||||
} else {
|
||||
props.setDashCooldown(props.getDashCooldown() - 1);
|
||||
}
|
||||
|
||||
if(stamina < props.getDashCount() * perDash) {
|
||||
stamina++;
|
||||
|
||||
if(stamina % perDash == perDash-1) {
|
||||
|
||||
player.playSound("hbm:player.dashRecharge", 1.0F, (1.0F + ((1F/12F)*(stamina/perDash))));
|
||||
stamina++;
|
||||
}
|
||||
}
|
||||
|
||||
props.setStamina(stamina);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
6
src/main/java/com/hbm/interfaces/IArmorModDash.java
Normal file
@ -0,0 +1,6 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
public interface IArmorModDash {
|
||||
|
||||
public int getDashes();
|
||||
}
|
||||
@ -254,6 +254,9 @@ public class AnvilRecipes {
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(DESH.ingot(), 4), new OreDictStack(POLYMER.dust(), 2), new OreDictStack(DURA.ingot(), 1)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_desh, 4))).setTier(3));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new ComparableStack(ModItems.nugget_bismuth, 2), new OreDictStack(U238.billet(), 2), new OreDictStack(NB.dust(), 1)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_bismuth, 1))).setTier(4));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new OreDictStack(EUPH.ingot(), 4), new OreDictStack(AT.dust(), 2), new OreDictStack(VOLCANIC.gem(), 1)},
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_euphemium, 4))).setTier(6));
|
||||
|
||||
@ -306,6 +306,7 @@ public class ModItems {
|
||||
public static Item plate_kevlar;
|
||||
public static Item plate_dineutronium;
|
||||
public static Item plate_desh;
|
||||
public static Item plate_bismuth;
|
||||
public static Item photo_panel;
|
||||
public static Item sat_base;
|
||||
public static Item thruster_nuclear;
|
||||
@ -2022,6 +2023,10 @@ public class ModItems {
|
||||
public static Item rpa_plate;
|
||||
public static Item rpa_legs;
|
||||
public static Item rpa_boots;
|
||||
public static Item bismuth_helmet;
|
||||
public static Item bismuth_plate;
|
||||
public static Item bismuth_legs;
|
||||
public static Item bismuth_boots;
|
||||
public static Item bj_helmet;
|
||||
public static Item bj_plate;
|
||||
public static Item bj_plate_jetpack;
|
||||
@ -2644,6 +2649,7 @@ public class ModItems {
|
||||
plate_kevlar = new Item().setUnlocalizedName("plate_kevlar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_kevlar");
|
||||
plate_dineutronium = new Item().setUnlocalizedName("plate_dineutronium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_dineutronium");
|
||||
plate_desh = new Item().setUnlocalizedName("plate_desh").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_desh");
|
||||
plate_bismuth = new ItemCustomLore().setUnlocalizedName("plate_bismuth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_bismuth");
|
||||
ingot_solinium = new Item().setUnlocalizedName("ingot_solinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_solinium");
|
||||
nugget_solinium = new Item().setUnlocalizedName("nugget_solinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_solinium");
|
||||
photo_panel = new Item().setUnlocalizedName("photo_panel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":photo_panel");
|
||||
@ -4800,6 +4806,17 @@ public class ModItems {
|
||||
schrabidium_plate = new ArmorFSB(MainRegistry.aMatSchrab, 7, 1, RefStrings.MODID + ":textures/armor/schrabidium_1.png").cloneStats((ArmorFSB) schrabidium_helmet).setUnlocalizedName("schrabidium_plate").setTextureName(RefStrings.MODID + ":schrabidium_plate");
|
||||
schrabidium_legs = new ArmorFSB(MainRegistry.aMatSchrab, 7, 2, RefStrings.MODID + ":textures/armor/schrabidium_2.png").cloneStats((ArmorFSB) schrabidium_helmet).setCap(4F).setMod(0.1F).setUnlocalizedName("schrabidium_legs").setTextureName(RefStrings.MODID + ":schrabidium_legs");
|
||||
schrabidium_boots = new ArmorFSB(MainRegistry.aMatSchrab, 7, 3, RefStrings.MODID + ":textures/armor/schrabidium_1.png").cloneStats((ArmorFSB) schrabidium_helmet).setCap(4F).setMod(0.1F).setUnlocalizedName("schrabidium_boots").setTextureName(RefStrings.MODID + ":schrabidium_boots");
|
||||
bismuth_helmet = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png").setCap(8F).setMod(0.3F)
|
||||
.addResistance("fall", 0)
|
||||
.addEffect(new PotionEffect(Potion.jump.id, 20, 6))
|
||||
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 6))
|
||||
.addEffect(new PotionEffect(Potion.regeneration.id, 20, 1))
|
||||
.addEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0))
|
||||
.setDashCount(3)
|
||||
.setUnlocalizedName("bismuth_helmet").setTextureName(RefStrings.MODID + ":bismuth_helmet");
|
||||
bismuth_plate = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 1, RefStrings.MODID + ":textures/armor/starmetal_2.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_plate").setTextureName(RefStrings.MODID + ":bismuth_plate");
|
||||
bismuth_legs = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 2, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_legs").setTextureName(RefStrings.MODID + ":bismuth_legs");
|
||||
bismuth_boots = new ArmorBismuth(MainRegistry.aMatBismuth, 7, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png").cloneStats((ArmorFSB) bismuth_helmet).setCap(8F).setMod(0.3F).setUnlocalizedName("bismuth_boots").setTextureName(RefStrings.MODID + ":bismuth_boots");
|
||||
titanium_helmet = new ArmorFSB(MainRegistry.aMatTitan, 7, 0, RefStrings.MODID + ":textures/armor/titanium_1.png").setMod(0.85F).setUnlocalizedName("titanium_helmet").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_helmet");
|
||||
titanium_plate = new ArmorFSB(MainRegistry.aMatTitan, 7, 1, RefStrings.MODID + ":textures/armor/titanium_1.png").cloneStats((ArmorFSB) titanium_helmet).setUnlocalizedName("titanium_plate").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_plate");
|
||||
titanium_legs = new ArmorFSB(MainRegistry.aMatTitan, 7, 2, RefStrings.MODID + ":textures/armor/titanium_2.png").cloneStats((ArmorFSB) titanium_helmet).setUnlocalizedName("titanium_legs").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":titanium_legs");
|
||||
@ -6028,6 +6045,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(plate_kevlar, plate_kevlar.getUnlocalizedName());
|
||||
GameRegistry.registerItem(plate_dalekanium, plate_dalekanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(plate_desh, plate_desh.getUnlocalizedName());
|
||||
GameRegistry.registerItem(plate_bismuth, plate_bismuth.getUnlocalizedName());
|
||||
GameRegistry.registerItem(plate_euphemium, plate_euphemium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(plate_dineutronium, plate_dineutronium.getUnlocalizedName());
|
||||
|
||||
@ -7900,6 +7918,10 @@ public class ModItems {
|
||||
GameRegistry.registerItem(schrabidium_plate, schrabidium_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(schrabidium_legs, schrabidium_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(schrabidium_boots, schrabidium_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bismuth_helmet, bismuth_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bismuth_plate, bismuth_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bismuth_legs, bismuth_legs.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bismuth_boots, bismuth_boots.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_helmet, euphemium_helmet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_plate, euphemium_plate.getUnlocalizedName());
|
||||
GameRegistry.registerItem(euphemium_legs, euphemium_legs.getUnlocalizedName());
|
||||
|
||||
35
src/main/java/com/hbm/items/armor/ArmorBismuth.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import com.hbm.render.model.ModelArmorBismuth;
|
||||
import com.hbm.render.model.ModelArmorRPA;
|
||||
|
||||
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.item.ItemStack;
|
||||
|
||||
public class ArmorBismuth extends ArmorFSB {
|
||||
|
||||
public ArmorBismuth(ArmorMaterial material, int layer, int slot, String texture) {
|
||||
super(material, layer, slot, texture);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelArmorBismuth[] models;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) {
|
||||
|
||||
if(models == null) {
|
||||
models = new ModelArmorBismuth[4];
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
models[i] = new ModelArmorBismuth(i);
|
||||
}
|
||||
|
||||
return models[armorSlot];
|
||||
}
|
||||
|
||||
}
|
||||
@ -10,6 +10,7 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
@ -62,6 +63,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
public boolean customGeiger = false;
|
||||
public boolean hardLanding = false;
|
||||
public double gravity = 0;
|
||||
public int dashCount = 0;
|
||||
public String step;
|
||||
public String jump;
|
||||
public String fall;
|
||||
@ -151,6 +153,11 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArmorFSB setDashCount(int dashCount) {
|
||||
this.dashCount = dashCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArmorFSB setStep(String step) {
|
||||
this.step = step;
|
||||
return this;
|
||||
@ -190,6 +197,7 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
this.customGeiger = original.customGeiger;
|
||||
this.hardLanding = original.hardLanding;
|
||||
this.gravity = original.gravity;
|
||||
this.dashCount = original.dashCount;
|
||||
this.step = original.step;
|
||||
this.jump = original.jump;
|
||||
this.fall = original.fall;
|
||||
@ -273,6 +281,10 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
list.add(EnumChatFormatting.BLUE + " " + I18nUtil.resolveKey("armor.gravity", gravity));
|
||||
}
|
||||
|
||||
if(dashCount > 0) {
|
||||
list.add(EnumChatFormatting.AQUA + " " + I18nUtil.resolveKey("armor.dash", dashCount));
|
||||
}
|
||||
|
||||
if(protectionYield != 100F) {
|
||||
list.add(EnumChatFormatting.BLUE + " Protection applies to damage <" + protectionYield);
|
||||
}
|
||||
@ -450,6 +462,46 @@ public class ArmorFSB extends ItemArmor implements IArmorDisableModel {
|
||||
} catch(Exception x) {
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(dashCount > 0) {
|
||||
|
||||
int perDash = 60;
|
||||
|
||||
HbmPlayerProps props = (HbmPlayerProps) player.getExtendedProperties("NTM_EXT_PLAYER");
|
||||
|
||||
props.setDashCount(dashCount);
|
||||
|
||||
int stamina = props.getStamina();
|
||||
|
||||
if(props.getDashCooldown() <= 0) {
|
||||
|
||||
if(!player.capabilities.isFlying && player.isSneaking() && stamina >= perDash) {
|
||||
|
||||
Vec3 lookingIn = player.getLookVec();
|
||||
lookingIn.yCoord = 0;
|
||||
lookingIn.normalize();
|
||||
player.addVelocity(lookingIn.xCoord, 0, lookingIn.zCoord);
|
||||
player.playSound("hbm:player.dash", 1.0F, 1.0F);
|
||||
|
||||
props.setDashCooldown(HbmPlayerProps.dashCooldownLength);
|
||||
stamina -= perDash;
|
||||
}
|
||||
} else {
|
||||
props.setDashCooldown(props.getDashCooldown() - 1);
|
||||
}
|
||||
|
||||
if(stamina < props.getDashCount() * perDash) {
|
||||
stamina++;
|
||||
|
||||
if(stamina % perDash == perDash-1) {
|
||||
|
||||
player.playSound("hbm:player.dashRecharge", 1.0F, (1.0F + ((1F/12F)*(stamina/perDash))));
|
||||
stamina++;
|
||||
}
|
||||
}
|
||||
|
||||
props.setStamina(stamina);
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.UUID;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.interfaces.IArmorModDash;
|
||||
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
@ -12,7 +13,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class ItemModV1 extends ItemArmorMod {
|
||||
public class ItemModV1 extends ItemArmorMod implements IArmorModDash {
|
||||
|
||||
private static final UUID speed = UUID.fromString("1d11e63e-28c4-4e14-b09f-fe0bd1be708f");
|
||||
|
||||
@ -39,4 +40,8 @@ public class ItemModV1 extends ItemArmorMod {
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.RED + " " + stack.getDisplayName() + " (BLOOD IS FUEL)");
|
||||
}
|
||||
|
||||
public int getDashes() {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,6 +143,7 @@ public class MainRegistry {
|
||||
public static ArmorMaterial aMatSecurity = EnumHelper.addArmorMaterial("HBM_SECURITY", 100, new int[] { 3, 8, 6, 3 }, 15);
|
||||
public static ArmorMaterial aMatCobalt = EnumHelper.addArmorMaterial("HBM_COBALT", 70, new int[] { 3, 8, 6, 3 }, 25);
|
||||
public static ArmorMaterial aMatStarmetal = EnumHelper.addArmorMaterial("HBM_STARMETAL", 150, new int[] { 3, 8, 6, 3 }, 100);
|
||||
public static ArmorMaterial aMatBismuth = EnumHelper.addArmorMaterial("HBM_BISMUTH", 100, new int[] { 3, 8, 6, 3 }, 100);
|
||||
|
||||
// Creative Tabs
|
||||
|
||||
|
||||
@ -244,7 +244,14 @@ public class ModEventHandlerClient {
|
||||
tess.draw();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
}
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||
if(props.getDashCount() > 0) {
|
||||
RenderScreenOverlay.renderDashBar(event.resolution, Minecraft.getMinecraft().ingameGUI, props);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -647,6 +647,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom armor_dnt = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/dnt.obj"));
|
||||
public static final IModelCustom armor_steamsuit = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/steamsuit.obj"));
|
||||
public static final IModelCustom armor_remnant = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/remnant.obj"));
|
||||
public static final IModelCustom armor_bismuth = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/bismuth.obj"));
|
||||
public static final IModelCustom armor_mod_tesla = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/mod_tesla.obj"));
|
||||
public static final IModelCustom armor_wings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/murk.obj"));
|
||||
public static final IModelCustom armor_solstice = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/armor/solstice.obj"));
|
||||
@ -766,6 +767,8 @@ public class ResourceManager {
|
||||
|
||||
public static final ResourceLocation mod_tesla = new ResourceLocation(RefStrings.MODID, "textures/armor/mod_tesla.png");
|
||||
|
||||
public static final ResourceLocation armor_bismuth_tex = new ResourceLocation(RefStrings.MODID, "textures/armor/bismuth.png");
|
||||
|
||||
public static final ResourceLocation wings_murk = new ResourceLocation(RefStrings.MODID, "textures/armor/wings_murk.png");
|
||||
public static final ResourceLocation wings_bob = new ResourceLocation(RefStrings.MODID, "textures/armor/wings_bob.png");
|
||||
public static final ResourceLocation wings_black = new ResourceLocation(RefStrings.MODID, "textures/armor/wings_black.png");
|
||||
|
||||
57
src/main/java/com/hbm/render/model/ModelArmorBismuth.java
Normal file
@ -0,0 +1,57 @@
|
||||
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.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelArmorBismuth extends ModelArmorBase {
|
||||
|
||||
public ModelArmorBismuth(int type) {
|
||||
super(type);
|
||||
|
||||
head = new ModelRendererObj(ResourceManager.armor_bismuth, "Head");
|
||||
body = new ModelRendererObj(ResourceManager.armor_bismuth, "Body");
|
||||
leftArm = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftArm").setRotationPoint(-5.0F, 2.0F, 0.0F);
|
||||
rightArm = new ModelRendererObj(ResourceManager.armor_bismuth, "RightArm").setRotationPoint(5.0F, 2.0F, 0.0F);
|
||||
leftLeg = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftLeg").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
rightLeg = new ModelRendererObj(ResourceManager.armor_bismuth, "RightLeg").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
leftFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "LeftFoot").setRotationPoint(1.9F, 12.0F, 0.0F);
|
||||
rightFoot = new ModelRendererObj(ResourceManager.armor_bismuth, "RightFoot").setRotationPoint(-1.9F, 12.0F, 0.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.armor_bismuth_tex);
|
||||
|
||||
if(type == 0) {
|
||||
head.render(par7);
|
||||
}
|
||||
if(type == 1) {
|
||||
leftArm.render(par7);
|
||||
rightArm.render(par7);
|
||||
body.render(par7);
|
||||
}
|
||||
if(type == 2) {
|
||||
leftLeg.render(par7);
|
||||
rightLeg.render(par7);
|
||||
}
|
||||
if(type == 3) {
|
||||
leftFoot.render(par7);
|
||||
rightFoot.render(par7);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,8 @@ package com.hbm.render.util;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -24,6 +26,8 @@ public class RenderScreenOverlay {
|
||||
private static float prevResult;
|
||||
private static float lastResult;
|
||||
|
||||
private static float fadeOut = 0F;
|
||||
|
||||
public static void renderRadCounter(ScaledResolution resolution, float in, Gui gui) {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@ -163,6 +167,121 @@ public class RenderScreenOverlay {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
@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);
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
int width = 30;
|
||||
|
||||
int posX = 16;//(int)(resolution.getScaledWidth()/2 - ((props.getDashCount()*(width+2))/2));
|
||||
int posY = resolution.getScaledHeight() - 40 - 2;
|
||||
|
||||
mc.renderEngine.bindTexture(misc);
|
||||
|
||||
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;
|
||||
|
||||
for(int y = 0; y < rows; y++) {
|
||||
for(int x = 0; x < 3; x++) {
|
||||
if(y == rows && x > finalColumns)
|
||||
break;
|
||||
gui.drawTexturedModalRect(posX + (width+2)*x, posY - 12*y, 76, 48, width, 10);
|
||||
int staminaDiv = stamina / 30;
|
||||
int staminaMod = stamina % 30;
|
||||
int barID = (3*y)+x;
|
||||
int barStatus = 1; //0 = red, 1 = normal, 2 = greyed, 3 = dashed, 4 = ascended
|
||||
int barSize = width;
|
||||
if(staminaDiv < barID) {
|
||||
barStatus = 3;
|
||||
} else if(staminaDiv == barID) {
|
||||
barStatus = 2;
|
||||
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);
|
||||
|
||||
if(staminaDiv == barID && staminaMod >= 27) {
|
||||
fadeOut = 1F;
|
||||
}
|
||||
if(fadeOut > 0 && staminaDiv-1 == barID) {
|
||||
GL11.glColor4f(1F, 1F, 1F, fadeOut);
|
||||
int bar = barID;
|
||||
if(stamina % 30 >= 25)
|
||||
bar++;
|
||||
int yPos = y;
|
||||
if(bar / 3 != y)
|
||||
y++;
|
||||
bar = bar % 3;
|
||||
gui.drawTexturedModalRect(posX + (width+2)*bar, posY - 12*y, 76, 58, width, 10);
|
||||
fadeOut -= 0.04F;
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*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();
|
||||
mc.renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
public enum Crosshair {
|
||||
|
||||
NONE(0, 0, 0),
|
||||
|
||||
@ -120,6 +120,7 @@ achievement.ZIRNOXBoom=CIRNOX
|
||||
armor.blastProtection=Damage modifier of %s against explosions
|
||||
armor.cap=Hard damage cap of %s
|
||||
armor.damageModifier=Damage modifier of %s against %s
|
||||
armor.dash=Grants %s dashes
|
||||
armor.electricJetpack=Ion Jetpack
|
||||
armor.explosionImmune=Cannot take any damage except from explosions
|
||||
armor.fastFall=Fast Fall
|
||||
@ -1082,7 +1083,11 @@ item.billet_zirconium.name=Zirconium Billet
|
||||
item.bio_wafer.name=Algae Wafer
|
||||
item.biomass.name=Biomass
|
||||
item.biomass_compressed.name=Compressed Biomass
|
||||
item.bismuth_boots.name=Bismuth Sandals
|
||||
item.bismuth_helmet.name=Bismuth Headdress
|
||||
item.bismuth_legs.name=Bismuth Kneeguards
|
||||
item.bismuth_pickaxe.name=Bismuth Pickaxe
|
||||
item.bismuth_plate.name=Bismuth Shoulderpads, Necklace & Loincloth
|
||||
item.bismuth_tool.name=Magnetic Extractor
|
||||
item.bj_boots.name=Lunar Studded Boots
|
||||
item.bj_helmet.name=Eyepatch with Thermal Sensor
|
||||
@ -2428,6 +2433,8 @@ item.plate_armor_fau.name=Fau Armor Plating
|
||||
item.plate_armor_hev.name=Reactive Armor Plating
|
||||
item.plate_armor_lunar.name=Lunar Plating
|
||||
item.plate_armor_titanium.name=Titanium Armor Plate
|
||||
item.plate_bismuth.name=Bismuth Compound Plate
|
||||
item.plate_bismuth.desc=Guys, It's Bismuth's alchemical symbol, I swear.
|
||||
item.plate_combine_steel.name=CMB Steel Plate
|
||||
item.plate_copper.name=Copper Plate
|
||||
item.plate_dalekanium.name=Angry Metal
|
||||
|
||||
3028
src/main/resources/assets/hbm/models/armor/bismuth.obj
Normal file
@ -199,6 +199,8 @@
|
||||
|
||||
"player.vomit": {"category": "player", "sounds": [{"name": "player/vomit", "stream": false}]},
|
||||
"player.cough": {"category": "player", "sounds": ["player/cough1", "player/cough2", "player/cough3", "player/cough4"]},
|
||||
"player.dash": {"category": "player", "sounds": [{"name": "player/dash", "stream": false}]},
|
||||
"player.dashRecharge": {"category": "player", "sounds": [{"name": "player/dashRecharge", "stream": false}]},
|
||||
|
||||
"potatos.random": {"category": "player", "sounds": ["potatos/randResponse0", "potatos/randResponse1", "potatos/randResponse2", "potatos/randResponse3", "potatos/randResponse4", "potatos/randResponse5", "potatos/randResponse6", "potatos/randResponse7"]},
|
||||
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/player/dash.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/player/dashRecharge.ogg
Normal file
BIN
src/main/resources/assets/hbm/textures/armor/bismuth.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
src/main/resources/assets/hbm/textures/items/bismuth_boots.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
src/main/resources/assets/hbm/textures/items/bismuth_helmet.png
Normal file
|
After Width: | Height: | Size: 829 B |
BIN
src/main/resources/assets/hbm/textures/items/bismuth_legs.png
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
src/main/resources/assets/hbm/textures/items/bismuth_plate.png
Normal file
|
After Width: | Height: | Size: 655 B |
BIN
src/main/resources/assets/hbm/textures/items/plate_bismuth.png
Normal file
|
After Width: | Height: | Size: 729 B |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 7.2 KiB |