some update from months ago that I can't remember.
This commit is contained in:
parent
b6daf58058
commit
d786d41d11
|
@ -67,6 +67,10 @@ public class SMovingArmorModel extends ModelPlayer implements IArmorModel {
|
|||
visibleSection = value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets the models various rotation angles then renders the model.
|
||||
*/
|
||||
|
|
|
@ -16,12 +16,12 @@ import net.machinemuse.utils.ElectricItemUtils;
|
|||
import net.machinemuse.utils.MuseCommonStrings;
|
||||
import net.machinemuse.utils.MuseItemUtils;
|
||||
import net.machinemuse.utils.MuseStringUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -45,6 +45,10 @@ public abstract class ItemElectricArmor extends ItemArmor implements IModularIte
|
|||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack itemStack, int par2) {
|
||||
|
||||
WeightedRandom.Item test;
|
||||
|
||||
|
||||
return getColorFromItemStack(itemStack).getInt();
|
||||
}
|
||||
|
||||
|
|
|
@ -97,14 +97,9 @@ public abstract class ItemPowerArmor extends ItemElectricArmor implements ISpeci
|
|||
return ModuleManager.tagHasModule(itemTag, TintModule.RED_TINT) || ModuleManager.tagHasModule(itemTag, TintModule.GREEN_TINT) || ModuleManager.tagHasModule(itemTag, TintModule.BLUE_TINT);
|
||||
}
|
||||
|
||||
double getHeatResistance(EntityPlayer player, ItemStack stack) {
|
||||
return MuseHeatUtils.getMaxHeat(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getArmorDouble(EntityPlayer player, ItemStack stack) {
|
||||
double totalArmor = 0;
|
||||
NBTTagCompound props = MuseItemUtils.getMuseItemTag(stack);
|
||||
double energy = ElectricItemUtils.getPlayerEnergy(player);
|
||||
double physArmor = ModuleManager.computeModularProperty(stack, MuseCommonStrings.ARMOR_VALUE_PHYSICAL);
|
||||
double enerArmor = ModuleManager.computeModularProperty(stack, MuseCommonStrings.ARMOR_VALUE_ENERGY);
|
||||
|
@ -160,7 +155,6 @@ public abstract class ItemPowerArmor extends ItemElectricArmor implements ISpeci
|
|||
*/
|
||||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
|
||||
NBTTagCompound itemProperties = MuseItemUtils.getMuseItemTag(stack);
|
||||
if (entity instanceof EntityPlayer) {
|
||||
if (source == MuseHeatUtils.overheatDamage) {
|
||||
} else if (source.isFireDamage()) {
|
||||
|
|
|
@ -18,7 +18,6 @@ import net.machinemuse.utils.MuseCommonStrings;
|
|||
import net.machinemuse.utils.MuseItemUtils;
|
||||
import net.machinemuse.utils.MuseStringUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
|
|
@ -39,10 +39,8 @@ public class SprintAssistModule extends PowerModuleBase implements IToggleableMo
|
|||
|
||||
@Override
|
||||
public void onPlayerTickActive(EntityPlayer player, ItemStack item) {
|
||||
double motionX = player.posX - player.lastTickPosX;
|
||||
double motionY = player.posY - player.lastTickPosY;
|
||||
double motionZ = player.posZ - player.lastTickPosZ;
|
||||
double horzMovement = Math.sqrt(motionX * motionX + motionZ * motionZ);
|
||||
double horzMovement = player.distanceWalkedModified - player.prevDistanceWalkedModified;
|
||||
|
||||
double totalEnergy = ElectricItemUtils.getPlayerEnergy(player);
|
||||
if (player.isSprinting()) {
|
||||
double exhaustion = Math.round(horzMovement * 100.0F) * 0.01;
|
||||
|
|
|
@ -41,6 +41,8 @@ public class ElectricItemUtils {
|
|||
}
|
||||
|
||||
public static void drainPlayerEnergy(EntityPlayer player, double drainAmount) {
|
||||
if (player.capabilities.isCreativeMode)
|
||||
return;
|
||||
double drainleft = drainAmount;
|
||||
for (ElectricAdapter adapter: electricItemsEquipped(player))
|
||||
if (drainleft > 0)
|
||||
|
|
|
@ -55,6 +55,9 @@ public class MuseHeatUtils {
|
|||
}
|
||||
|
||||
public static void heatPlayer(EntityPlayer player, double heatDegrees) {
|
||||
if (player.capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
List<ItemStack> items = MuseItemUtils.getModularItemsInInventory(player);
|
||||
if (player.isUsingItem()) {
|
||||
items.remove(player.getCurrentEquippedItem());
|
||||
|
|
Loading…
Reference in a new issue