mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Added an armour texture for the amulet
This commit is contained in:
parent
7d4c6f512c
commit
de202d131b
2 changed files with 10 additions and 3 deletions
|
@ -16,6 +16,7 @@ import com.minelittlepony.util.vector.VecHelper;
|
||||||
|
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.MoverType;
|
import net.minecraft.entity.MoverType;
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||||
|
@ -152,15 +153,16 @@ public class ItemAlicornAmulet extends ItemArmor implements IDependable {
|
||||||
|
|
||||||
IPlayer iplayer = PlayerSpeciesList.instance().getPlayer(player);
|
IPlayer iplayer = PlayerSpeciesList.instance().getPlayer(player);
|
||||||
|
|
||||||
|
float attachedTime = iplayer.getInventory().getTicksAttached(this);
|
||||||
|
|
||||||
if (iplayer.getExertion() < 1) {
|
if (iplayer.getExertion() < 1) {
|
||||||
iplayer.addExertion(2);
|
iplayer.addExertion(2);
|
||||||
}
|
}
|
||||||
if (iplayer.getEnergy() < 0.005F) {
|
|
||||||
|
if (iplayer.getEnergy() < 0.005F + (attachedTime / 1000000)) {
|
||||||
iplayer.addEnergy(2);
|
iplayer.addEnergy(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int attachedTime = iplayer.getInventory().getTicksAttached(this);
|
|
||||||
|
|
||||||
if (attachedTime == 1) {
|
if (attachedTime == 1) {
|
||||||
world.playSound(null, player.getPosition(), SoundEvents.ENTITY_ELDER_GUARDIAN_CURSE, SoundCategory.PLAYERS, 3, 1);
|
world.playSound(null, player.getPosition(), SoundEvents.ENTITY_ELDER_GUARDIAN_CURSE, SoundCategory.PLAYERS, 3, 1);
|
||||||
}
|
}
|
||||||
|
@ -218,6 +220,11 @@ public class ItemAlicornAmulet extends ItemArmor implements IDependable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {
|
||||||
|
return "unicopia:textures/models/armor/alicorn_amulet.png";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
|
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
|
||||||
Multimap<String, AttributeModifier> multimap = HashMultimap.create();;
|
Multimap<String, AttributeModifier> multimap = HashMultimap.create();;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 550 B |
Loading…
Reference in a new issue