Skip to content

Commit

Permalink
Added Tethered Cannibal Heart Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigereye504 committed Oct 7, 2020
1 parent 63ac21b commit e3beb35
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static void registerItem(String name, Item item) {
private static void addWindegoismHeartsToExternalOrgans(int i, Identifier identifier, Item item) {
if(item == WDItems.FLESH){
Map<Identifier,Float> flesh = new HashMap<>();
flesh.put(CCItems.ORGANS_MUSCLE,.75f);
flesh.put(CCItems.ORGANS_MUSCLE,1f);
VanillaOrgans.map.put(WDItems.FLESH,flesh);
}
if(item == WDItems.CORRUPT_FLESH){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
package net.tigereye.chestcavity.crossmod.wendigoism;

import moriyashiine.wendigoism.api.accessor.WendigoAccessor;
import net.minecraft.client.item.TooltipContext;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import net.tigereye.chestcavity.items.OrganBase;
import net.tigereye.chestcavity.listeners.OrganUpdateListeners;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

Expand Down Expand Up @@ -46,4 +51,16 @@ public void inventoryTick(ItemStack stack, World world, Entity entity, int slot,
}
}
}

public void appendTooltip(ItemStack itemStack, World world, List<Text> tooltip, TooltipContext tooltipContext) {
int wendigoism = -1;
if(itemStack.getTag() == null){
itemStack.setTag(new CompoundTag());
}
if(itemStack.getTag().contains("wendigoism")) {
wendigoism = itemStack.getTag().getInt("wendigoism");
}
LiteralText text = new LiteralText("Wendigoism: "+wendigoism);
tooltip.add(text);
}
}

0 comments on commit e3beb35

Please sign in to comment.