use of net.minecraft.item.ShieldItem in project Hypnotic-Client by Hypnotic-Development.
the class Killaura method onMotionUpdate.
@EventTarget
public void onMotionUpdate(EventMotionUpdate event) {
if (maxAps.getValue() <= minAps.getValue())
maxAps.setValue(minAps.getValue() + 1);
if (event.isPre()) {
try {
if (mc.world != null) {
List<LivingEntity> targets = Lists.<LivingEntity>newArrayList();
for (Entity e : mc.world.getEntities()) {
if (e instanceof LivingEntity && e != mc.player && !FriendManager.INSTANCE.isFriend((LivingEntity) e) && mc.player.distanceTo(e) <= range.getValue() && canAttack((LivingEntity) e))
targets.add((LivingEntity) e);
else {
if (targets.contains(e))
targets.remove(e);
}
}
if (target != null && mc.player.distanceTo(target) > range.getValue()) {
targets.remove(target);
target = null;
if (!ModuleManager.INSTANCE.getModule(Scaffold.class).isEnabled()) {
RotationUtils.resetPitch();
RotationUtils.resetYaw();
}
}
switch(mode.getSelected()) {
case "Sort":
switch(sortMode.getSelected()) {
case "Distance":
targets.sort(Comparator.comparingDouble(entity -> mc.player.distanceTo(entity)));
break;
case "Health":
targets.sort(Comparator.comparingDouble(entity -> ((LivingEntity) entity).getHealth()));
break;
}
if (!targets.isEmpty()) {
if (!FriendManager.INSTANCE.isFriend((LivingEntity) targets.get(0)))
target = (LivingEntity) targets.get(0);
if (mc.player.distanceTo(target) > range.getValue())
target = null;
if (target != null) {
this.setDisplayName("Killaura " + ColorUtils.gray + (target instanceof PlayerEntity ? target.getName().asString().replaceAll(ColorUtils.colorChar, "&") : target.getDisplayName().asString()));
if (canAttack(target)) {
RotationUtils.setSilentPitch(RotationUtils.getRotations(target)[1]);
RotationUtils.setSilentYaw(RotationUtils.getRotations(target)[0]);
if (rotation.is("Lock View")) {
mc.player.setYaw(RotationUtils.getRotations(target)[0]);
mc.player.setPitch(RotationUtils.getRotations(target)[1]);
}
long aps = minAps.getValue() < 20 ? new Random().nextInt((int) (maxAps.getValue() - minAps.getValue())) + (int) minAps.getValue() : 20;
if (delay.isEnabled() && random.isEnabled() && mc.player.getAttackCooldownProgress(0.5F) != 1)
attackTimer.reset();
if (delay.isEnabled() ? mc.player.getAttackCooldownProgress(0.5F) == 1 && (random.isEnabled() ? attackTimer.hasTimeElapsed(new Random().nextInt(300 - 100) + 100, true) : true) : attackTimer.hasTimeElapsed((long) (1000L / aps), true)) {
if (autoBlock.isEnabled() && mc.player.getOffHandStack().getItem() instanceof ShieldItem && (mc.player.getMainHandStack().getItem() instanceof ToolItem || mc.player.getMainHandStack().getItem() == Items.AIR || mc.player.getMainHandStack().getItem() instanceof AxeItem || mc.player.getMainHandStack().getItem() instanceof SwordItem) && autoBlockMode.is("Normal")) {
mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, Direction.DOWN));
}
blocking = false;
mc.interactionManager.attackEntity(mc.player, target);
if (swing.isEnabled() && (autoBlock.isEnabled() ? !ModuleManager.INSTANCE.getModule(OldBlock.class).isEnabled() : true) || (ModuleManager.INSTANCE.getModule(OldBlock.class).isEnabled() ? mc.options.getPerspective() != Perspective.FIRST_PERSON : false) && !(mc.player.getMainHandStack().getItem() instanceof SwordItem))
mc.player.swingHand(Hand.MAIN_HAND);
else
mc.player.networkHandler.sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND));
if (swing.isEnabled() && !(mc.player.getMainHandStack().getItem() instanceof SwordItem) || ModuleManager.INSTANCE.getModule(OldBlock.class).animation.is("Swing"))
mc.player.swingHand(Hand.MAIN_HAND);
}
}
if (target.isDead()) {
RotationUtils.resetYaw();
RotationUtils.resetPitch();
}
} else {
if (blocking)
mc.options.useKey.setPressed(false);
blocking = false;
if (!ModuleManager.INSTANCE.getModule(Scaffold.class).isEnabled()) {
RotationUtils.resetPitch();
RotationUtils.resetYaw();
}
this.setDisplayName("Killaura " + ColorUtils.gray + "None");
}
} else {
if (blocking)
mc.options.useKey.setPressed(false);
blocking = false;
if (!ModuleManager.INSTANCE.getModule(Scaffold.class).isEnabled()) {
RotationUtils.resetPitch();
RotationUtils.resetYaw();
}
}
break;
case "Multi":
if (!targets.isEmpty()) {
for (LivingEntity entity : targets) {
if (entity != null && !FriendManager.INSTANCE.isFriend(entity)) {
this.setDisplayName("Killaura " + ColorUtils.gray + (entity instanceof PlayerEntity ? entity.getName().asString().replaceAll(ColorUtils.colorChar, "&") : entity.getDisplayName().asString()));
if (canAttack(entity)) {
if (target != null)
RotationUtils.setSilentPitch(RotationUtils.getRotations(target)[1]);
if (target != null)
RotationUtils.setSilentYaw(RotationUtils.getRotations(target)[0]);
if (rotation.is("Lock View")) {
if (target != null)
mc.player.setYaw(RotationUtils.getRotations(target)[0]);
if (target != null)
mc.player.setPitch(RotationUtils.getRotations(target)[1]);
}
long aps = minAps.getValue() < 20 ? new Random().nextInt((int) (maxAps.getValue() - minAps.getValue())) + (int) minAps.getValue() : 20;
if (delay.isEnabled() && random.isEnabled() && mc.player.getAttackCooldownProgress(0.5F) != 1)
attackTimer.reset();
if ((delay.isEnabled() ? mc.player.getAttackCooldownProgress(0.5F) == 1 && (random.isEnabled() ? attackTimer.hasTimeElapsed(new Random().nextInt(300 - 100) + 100, true) : true) : attackTimer.hasTimeElapsed((long) (1000L / aps), true)) && targets.indexOf(entity) == new Random().nextInt(targets.size())) {
if (autoBlock.isEnabled() && mc.player.getOffHandStack().getItem() instanceof ShieldItem && (mc.player.getMainHandStack().getItem() instanceof ToolItem || mc.player.getMainHandStack().getItem() == Items.AIR || mc.player.getMainHandStack().getItem() instanceof AxeItem || mc.player.getMainHandStack().getItem() instanceof SwordItem) && autoBlockMode.is("NCP")) {
mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, Direction.DOWN));
}
blocking = false;
target = entity;
mc.interactionManager.attackEntity(mc.player, entity);
if (swing.isEnabled() && (autoBlock.isEnabled() ? !ModuleManager.INSTANCE.getModule(OldBlock.class).isEnabled() : true) || (ModuleManager.INSTANCE.getModule(OldBlock.class).isEnabled() ? mc.options.getPerspective() != Perspective.FIRST_PERSON : false) && !(mc.player.getMainHandStack().getItem() instanceof SwordItem))
mc.player.swingHand(Hand.MAIN_HAND);
else
mc.player.networkHandler.sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND));
if (swing.isEnabled() && !(mc.player.getMainHandStack().getItem() instanceof SwordItem) || ModuleManager.INSTANCE.getModule(OldBlock.class).animation.is("Swing"))
mc.player.swingHand(Hand.MAIN_HAND);
}
}
if (entity.isDead()) {
RotationUtils.resetYaw();
RotationUtils.resetPitch();
}
} else {
}
}
} else {
if (!ModuleManager.INSTANCE.getModule(Scaffold.class).isEnabled()) {
RotationUtils.resetPitch();
RotationUtils.resetYaw();
}
}
break;
}
if (targets.isEmpty())
target = null;
this.setDisplayName("Killaura " + ColorUtils.gray + mode.getSelected());
}
} catch (Exception e) {
e.printStackTrace();
}
} else {
if (target == null)
return;
if (autoBlock.isEnabled() && (mc.player.getMainHandStack().getItem() instanceof ToolItem || mc.player.getMainHandStack().getItem() == Items.AIR || mc.player.getMainHandStack().getItem() instanceof AxeItem || mc.player.getMainHandStack().getItem() instanceof SwordItem) && !autoBlockMode.is("Visual")) {
mc.interactionManager.interactItem(mc.player, mc.world, Hand.OFF_HAND);
mc.interactionManager.interactItem(mc.player, mc.world, Hand.MAIN_HAND);
if (!blocking && autoBlockMode.is("NCP")) {
mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(0.0f, 0.0f, 0.0f), Direction.DOWN, new BlockPos(-1, -1, -1), false)));
blocking = true;
}
}
}
}
use of net.minecraft.item.ShieldItem in project LevelZ by Globox1997.
the class ItemStackClientMixin method getTooltipMixin.
@Inject(method = "getTooltip", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/item/TooltipContext;)V"), locals = LocalCapture.CAPTURE_FAILSOFT)
private void getTooltipMixin(@Nullable PlayerEntity player, TooltipContext context, CallbackInfoReturnable<List<Text>> info, List<Text> list, int i) {
if (player != null) {
ItemStack stack = (ItemStack) (Object) this;
ArrayList<Object> levelList = new ArrayList<Object>();
// Block
if (stack.getItem() instanceof BlockItem) {
Block block = ((BlockItem) stack.getItem()).getBlock();
// Alchemy check
if (PlayerStatsManager.listContainsItemOrBlock(player, Registry.ITEM.getRawId(stack.getItem()), false)) {
list.add(new TranslatableText("item.levelz.alchemy.tooltip", PlayerStatsManager.getUnlockLevel(Registry.ITEM.getRawId(stack.getItem()), false)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
if (block instanceof AnvilBlock) {
levelList = LevelLists.anvilList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.BEEHIVE) {
levelList = LevelLists.beehiveList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.BREWING_STAND) {
levelList = LevelLists.brewingStandList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.ENCHANTING_TABLE) {
levelList = LevelLists.enchantingTableList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.CAULDRON) {
levelList = LevelLists.cauldronList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.BARREL) {
levelList = LevelLists.barrelList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.BLAST_FURNACE) {
levelList = LevelLists.blastFurnaceList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.CARTOGRAPHY_TABLE) {
levelList = LevelLists.cartographyList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.COMPOSTER) {
levelList = LevelLists.composterList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.GRINDSTONE) {
levelList = LevelLists.grindstoneList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.LECTERN) {
levelList = LevelLists.lecternList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.LOOM) {
levelList = LevelLists.loomList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.SMITHING_TABLE) {
levelList = LevelLists.smithingTableList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.SMOKER) {
levelList = LevelLists.smokerList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (block == Blocks.STONECUTTER) {
levelList = LevelLists.stonecutterList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (PlayerStatsManager.listContainsItemOrBlock(player, Registry.BLOCK.getRawId(block), true)) {
list.add(new TranslatableText("item.levelz.mining.tooltip", PlayerStatsManager.getUnlockLevel(Registry.BLOCK.getRawId(block), true)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else // Item
if (stack.isIn(FabricToolTags.SHEARS)) {
levelList = LevelLists.sheepList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.isIn(FabricToolTags.PICKAXES) || stack.isIn(FabricToolTags.SHOVELS)) {
levelList = LevelLists.toolList;
String material = ((ToolItem) stack.getItem()).getMaterial().toString().toLowerCase();
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, material, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(levelList.indexOf(material) + 1).toString() + ".tooltip", levelList.get(levelList.indexOf(material) + 2).toString()).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.isIn(FabricToolTags.AXES)) {
levelList = LevelLists.axeList;
String material = ((ToolItem) stack.getItem()).getMaterial().toString().toLowerCase();
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, material, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(levelList.indexOf(material) + 1).toString() + ".tooltip", levelList.get(levelList.indexOf(material) + 2).toString()).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.isIn(FabricToolTags.HOES)) {
levelList = LevelLists.hoeList;
String material = ((ToolItem) stack.getItem()).getMaterial().toString().toLowerCase();
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, material, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(levelList.indexOf(material) + 1).toString() + ".tooltip", levelList.get(levelList.indexOf(material) + 2).toString()).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.isIn(FabricToolTags.SWORDS)) {
levelList = LevelLists.swordList;
String material = ((ToolItem) stack.getItem()).getMaterial().toString().toLowerCase();
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, material, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(levelList.indexOf(material) + 1).toString() + ".tooltip", levelList.get(levelList.indexOf(material) + 2).toString()).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() == Items.FLINT_AND_STEEL) {
levelList = LevelLists.flintAndSteelList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() == Items.GLASS_BOTTLE) {
levelList = LevelLists.dragonBreathList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() == Items.TOTEM_OF_UNDYING) {
levelList = LevelLists.totemList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof BowItem) {
levelList = LevelLists.bowList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof TridentItem) {
levelList = LevelLists.tridentList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof CrossbowItem) {
levelList = LevelLists.crossbowList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof ArmorItem) {
try {
levelList = LevelLists.armorList;
String material = ((ArmorItem) stack.getItem()).getMaterial().getName().toLowerCase();
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, material, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(levelList.indexOf(material) + 1).toString() + ".tooltip", levelList.get(levelList.indexOf(material) + 2).toString()).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} catch (AbstractMethodError ignored) {
}
} else if (stack.getItem() instanceof ShieldItem) {
levelList = LevelLists.shieldList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof ElytraItem) {
levelList = LevelLists.elytraList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof BucketItem) {
levelList = LevelLists.bucketList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (stack.getItem() instanceof FishingRodItem) {
levelList = LevelLists.fishingList;
if (!PlayerStatsManager.playerLevelisHighEnough(player, levelList, null, false)) {
list.add(new TranslatableText("item.levelz." + levelList.get(0) + ".tooltip", levelList.get(1)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
} else if (PlayerStatsManager.listContainsItemOrBlock(player, Registry.ITEM.getRawId(stack.getItem()), false)) {
list.add(new TranslatableText("item.levelz.alchemy.tooltip", PlayerStatsManager.getUnlockLevel(Registry.ITEM.getRawId(stack.getItem()), false)).formatted(Formatting.GRAY));
list.add(new TranslatableText("item.levelz.locked.tooltip"));
}
}
}
Aggregations