Skip to content

Commit

Permalink
Fix get method of doll.
Browse files Browse the repository at this point in the history
Signed-off-by: 秋雨落 <[email protected]>
  • Loading branch information
qyl27 committed Feb 21, 2024
1 parent 4a81609 commit 0a25507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/cuteneko/catsplus/item/CatBagItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public ActionResult useOnBlock(ItemUsageContext context) {

if (stack.hasCustomName()) {
var name = stack.getName().getString();
if (name.equals("MeowBot233") || name.equals("Fang_Luo")) {
if ("MeowBot233".equalsIgnoreCase(name)
|| "Fang_Luo".equalsIgnoreCase(name)
|| "坊洛".equalsIgnoreCase(name)) {
stack.removeCustomName();
Objects.requireNonNull(context.getPlayer()).giveItemStack(new ItemStack(ModItems.FANG_LUO));
return ActionResult.SUCCESS;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/cuteneko/catsplus/item/FangLuoItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> too
super.appendTooltip(stack, world, tooltip, context);

tooltip.add(Text.translatable(Constants.MESSAGE_FANG_LUO_DESCRIPTION_1).formatted(Formatting.GRAY));
tooltip.add(Text.translatable(Constants.MESSAGE_FANG_LUO_DESCRIPTION_2).formatted(Formatting.GRAY));
}
}

0 comments on commit 0a25507

Please sign in to comment.