mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
this is to fix everything that github just broke including removing the shit from that one PR that broke everything
42 lines
1.2 KiB
Java
42 lines
1.2 KiB
Java
package com.hbm.items.armor;
|
|
|
|
import java.util.List;
|
|
|
|
import com.hbm.extprop.HbmLivingProps;
|
|
import com.hbm.handler.ArmorModHandler;
|
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.EnumChatFormatting;
|
|
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
|
|
|
public class ItemModQuartz extends ItemArmorMod {
|
|
|
|
public ItemModQuartz() {
|
|
super(ArmorModHandler.extra, true, true, true, true);
|
|
}
|
|
|
|
@Override
|
|
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
|
|
|
list.add(EnumChatFormatting.DARK_GRAY + "Taking damage removes 10 RAD");
|
|
list.add("");
|
|
super.addInformation(itemstack, player, list, bool);
|
|
}
|
|
|
|
@Override
|
|
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
|
list.add(EnumChatFormatting.DARK_GRAY + " " + stack.getDisplayName() + " (-10 RAD when hit)");
|
|
}
|
|
|
|
@Override
|
|
public void modDamage(LivingHurtEvent event, ItemStack armor) {
|
|
|
|
if(!event.entityLiving.worldObj.isRemote) {
|
|
float rad = HbmLivingProps.getRadiation(event.entityLiving);
|
|
rad = Math.max(rad - 10, 0);
|
|
HbmLivingProps.setRadiation(event.entityLiving, rad);
|
|
}
|
|
}
|
|
}
|