Make tooltips gray (#1772)

* Initial stab at API structuring

* Throwing all the things into the API*
Eliminated all internal imports
Also added some helpful comments
*except for the ritual stuff

* Reducing the API
Threw back the altar/incense/unnecessary items to main
Added in a functional API instance

* API cleanup
Removing all the unnecessities
Smushed and vaporized some redundant recipe stuffs

* Made API dummy instances
Refactor packaging

* Tooltips are now properly gray
:P

* idk what happened with git
This commit is contained in:
Arcaratus 2021-01-27 17:19:03 -05:00 committed by GitHub
parent ae3d28a1c8
commit e947f7d4f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 62 additions and 41 deletions

View file

@ -11,6 +11,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
@ -39,7 +40,7 @@ public class BlockBloodRune extends Block implements IBloodRune
public void addInformation(ItemStack stack, @Nullable IBlockReader world, List<ITextComponent> tooltip,
ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.decoration.safe"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.decoration.safe").mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}
}

View file

@ -8,6 +8,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -29,14 +30,14 @@ public class ItemActivationCrystal extends Item implements IBindable
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.activationcrystal." + type.name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.activationcrystal." + type.name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
if (!stack.hasTag())
return;
Binding binding = getBinding(stack);
if (binding != null)
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName()).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -13,6 +13,7 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -32,7 +33,7 @@ public class ItemArcaneAshes extends Item
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arcaneAshes"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arcaneAshes").mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -6,6 +6,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -42,7 +43,7 @@ public class ItemBase extends Item
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
if (!desc.isEmpty())
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic." + desc));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic." + desc).mergeStyle(TextFormatting.GRAY));
}
}

View file

@ -6,6 +6,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -29,6 +30,6 @@ public class ItemBindableBase extends Item implements IBindable
Binding binding = getBinding(stack);
if (binding != null)
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentOwner", binding.getOwnerName()).mergeStyle(TextFormatting.GRAY));
}
}

View file

@ -13,6 +13,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -80,11 +81,11 @@ public class ItemBloodOrb extends ItemBindableBase implements IBloodOrb, IForgeI
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, @Nullable World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.orb.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.orb.desc").mergeStyle(TextFormatting.GRAY));
BloodOrb orb = getOrb(stack);
if (flag.isAdvanced() && orb != null)
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.orb.owner", stack.getItem().getRegistryName()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.orb.owner", stack.getItem().getRegistryName()).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -75,7 +75,7 @@ public class ItemBloodProvider extends Item
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC));
tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -8,6 +8,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -27,7 +28,7 @@ public class ItemDemonWillGauge extends Item implements IDemonWillViewer
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.willGauge"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.willGauge").mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -12,6 +12,7 @@ import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -38,15 +39,15 @@ public class ItemExperienceBook extends Item
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome").mergeStyle(TextFormatting.GRAY));
if (!stack.hasTag())
return;
double storedExp = getStoredExperience(stack);
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome.exp", (int) storedExp));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome.expLevel", (int) getLevelForExperience(storedExp)));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome.exp", (int) storedExp).mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.experienceTome.expLevel", getLevelForExperience(storedExp)).mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -12,6 +12,7 @@ import net.minecraft.item.ItemUseContext;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -61,6 +62,6 @@ public class ItemInscriptionTool extends Item
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent(TextHelper.localizeEffect("tooltip.bloodmagic.inscriber.desc")));
tooltip.add(new TranslationTextComponent(TextHelper.localizeEffect("tooltip.bloodmagic.inscriber.desc")).mergeStyle(TextFormatting.GRAY));
}
}

View file

@ -21,6 +21,7 @@ import net.minecraft.util.math.RayTraceContext.FluidMode;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -58,7 +59,7 @@ public class ItemRitualReader extends Item
return;
EnumRitualReaderState state = this.getState(stack);
tooltip.add(new TranslationTextComponent(tooltipBase + "currentState", TextHelper.localizeEffect(tooltipBase + state.toString().toLowerCase())));
tooltip.add(new TranslationTextComponent(tooltipBase + "currentState", TextHelper.localizeEffect(tooltipBase + state.toString().toLowerCase())).mergeStyle(TextFormatting.GRAY));
tooltip.add(new StringTextComponent(""));
@ -66,10 +67,10 @@ public class ItemRitualReader extends Item
if (sneaking)
{
tooltip.add(new TranslationTextComponent(tooltipBase + "desc." + state.toString().toLowerCase()));
tooltip.add(new TranslationTextComponent(tooltipBase + "desc." + state.toString().toLowerCase()).mergeStyle(TextFormatting.GRAY));
} else
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.extraInfo"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.extraInfo").mergeStyle(TextFormatting.GRAY));
}
super.addInformation(stack, world, tooltip, flag);

View file

@ -15,6 +15,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -43,7 +44,7 @@ public class ItemSacrificialDagger extends Item
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sacrificialDagger.desc"))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sacrificialdagger.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sacrificialdagger.desc").mergeStyle(TextFormatting.GRAY));
// if (stack.getItemDamage() == 1)
// list.add(TextHelper.localizeEffect("tooltip.bloodmagic.sacrificialDagger.creative"));

View file

@ -42,6 +42,7 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.Difficulty;
import net.minecraft.world.World;
@ -615,8 +616,8 @@ public class ItemSentientScythe extends HoeItem implements IDemonWillWeapon, IMu
if (!stack.hasTag())
return;
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientAxe.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientAxe.desc").mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -110,7 +110,7 @@ public class ItemThrowingDagger extends Item
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.throwing_dagger.desc").mergeStyle(TextFormatting.ITALIC));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.throwing_dagger.desc").mergeStyle(TextFormatting.ITALIC).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -6,6 +6,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -34,10 +35,10 @@ public class ItemARCToolBase extends Item implements IARCTool
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arctool.uses", stack.getMaxDamage() - stack.getDamage()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arctool.uses", stack.getMaxDamage() - stack.getDamage()).mergeStyle(TextFormatting.GRAY));
if (getAdditionalOutputChanceMultiplier(stack) != 1)
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arctool.additionaldrops", ChatUtil.DECIMAL_FORMAT.format(getAdditionalOutputChanceMultiplier(stack))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.arctool.additionaldrops", ChatUtil.DECIMAL_FORMAT.format(getAdditionalOutputChanceMultiplier(stack))).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -37,7 +37,7 @@ public class ItemSigilBase extends ItemSigil
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC));
tooltip.add(new TranslationTextComponent(tooltipBase + "desc").mergeStyle(TextFormatting.ITALIC).mergeStyle(TextFormatting.GRAY));
// if (TextHelper.canTranslate(tooltipBase + "desc"))
// tooltip.addAll(Arrays.asList(WordUtils.wrap(TextHelper.localizeEffect(tooltipBase
// + "desc"), 30, "/cut", false).split("/cut")));

View file

@ -83,7 +83,7 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
super.addInformation(stack, world, tooltip, flag);
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.holding.press", new TranslationTextComponent(KeyBindings.OPEN_HOLDING.getKey().getTranslationKey()).mergeStyle(TextFormatting.ITALIC)));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sigil.holding.press", new TranslationTextComponent(KeyBindings.OPEN_HOLDING.getKey().getTranslationKey()).mergeStyle(TextFormatting.ITALIC)).mergeStyle(TextFormatting.GRAY));
if (!stack.hasTag())
return;

View file

@ -6,6 +6,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -35,7 +36,7 @@ public class ItemSigilToggleableBase extends ItemSigilToggleable// implements IM
return;
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic." + (getActivated(stack) ? "activated"
: "deactivated")));
: "deactivated")).mergeStyle(TextFormatting.GRAY));
}
// @Override

View file

@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.NonNullList;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -36,7 +37,7 @@ public class ItemMonsterSoul extends Item implements IDemonWill
{
if (!stack.hasTag())
return;
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(getType(stack), stack))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(getType(stack), stack))).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -28,6 +28,7 @@ import net.minecraft.potion.Effects;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.Difficulty;
import net.minecraft.world.World;
@ -302,8 +303,8 @@ public class ItemSentientAxe extends AxeItem implements IDemonWillWeapon, IMulti
if (!stack.hasTag())
return;
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientAxe.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientAxe.desc").mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -28,6 +28,7 @@ import net.minecraft.potion.Effects;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.Difficulty;
import net.minecraft.world.World;
@ -301,8 +302,8 @@ public class ItemSentientPickaxe extends PickaxeItem implements IDemonWillWeapon
return;
// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sentientSword.desc"))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientPickaxe.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientPickaxe.desc").mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -28,6 +28,7 @@ import net.minecraft.potion.Effects;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.Difficulty;
import net.minecraft.world.World;
@ -302,8 +303,8 @@ public class ItemSentientShovel extends ShovelItem implements IDemonWillWeapon,
return;
// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sentientSword.desc"))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientShovel.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientShovel.desc").mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -27,6 +27,7 @@ import net.minecraft.potion.Effects;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.Difficulty;
import net.minecraft.world.World;
@ -295,8 +296,8 @@ public class ItemSentientSword extends SwordItem implements IDemonWillWeapon, IM
return;
// tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.bloodmagic.sentientSword.desc"))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientSword.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.sentientSword.desc").mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
}
@Override

View file

@ -15,6 +15,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -77,9 +78,9 @@ public class ItemSoulGem extends Item implements IDemonWillGem, IMultiWillTool
return;
EnumDemonWillType type = this.getCurrentType(stack);
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulGem." + name));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(type, stack))));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulGem." + name).mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.will", ChatUtil.DECIMAL_FORMAT.format(getWill(type, stack))).mergeStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.currentType." + getCurrentType(stack).name().toLowerCase()).mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -12,6 +12,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
@ -64,7 +65,7 @@ public class ItemSoulSnare extends Item
@OnlyIn(Dist.CLIENT)
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag)
{
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulSnare.desc"));
tooltip.add(new TranslationTextComponent("tooltip.bloodmagic.soulSnare.desc").mergeStyle(TextFormatting.GRAY));
super.addInformation(stack, world, tooltip, flag);
}

View file

@ -51,9 +51,9 @@ public interface ILivingContainer
boolean sneaking = Screen.hasShiftDown();
// if (!InputUtil.isKeyPressed(MinecraftClient.getInstance().getWindow().getHandle(), 340) || k.getNextRequirement(v) == 0)
if (!sneaking || k.getNextRequirement(v.intValue()) == 0)
tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), new TranslationTextComponent("enchantment.level." + k.getLevel(v.intValue()))));
tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), new TranslationTextComponent("enchantment.level." + k.getLevel(v.intValue()))).mergeStyle(TextFormatting.GRAY));
else
tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), (": " + v.intValue() + "/" + k.getNextRequirement(v.intValue()))));
tooltip.add(new TranslationTextComponent("%s %s", new TranslationTextComponent(k.getTranslationKey()), (": " + v.intValue() + "/" + k.getNextRequirement(v.intValue()))).mergeStyle(TextFormatting.GRAY));
});
}
}