CraftTweaker

CraftTweaker

151M Downloads

Changing the display name and JEI

belathus opened this issue ยท 6 comments

commented

Issue Description:

Searching JEI for an item that has had its display name changed (via .displayName = "") turns up no results. Searching for the original display name still works, though.

I'm going to also report this to Mezz and JEI.

What happens:

I changed the name of the Iron Promise Acceptor from EvilCraft to "Silver Promise Acceptor". If I search for "Silver Promise" in JEI, there are no results, but if I search for "Iron Promise", the silver promise acceptor pops up.

What you expected to happen:

The opposite.

Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):

https://github.com/belathus/Wanderlust-Renewed/blob/master/scripts/rename.zs

Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

https://gist.github.com/belathus/f33e0707cc1a690f793bdf21ce853fbb


Affected Versions (Do not use "latest"):

  • Minecraft: 1.10.2
  • Forge: 12.18.3.2239
  • Crafttweaker: 2.3.0.24

Your most recent log file where the issue was present:

https://gist.github.com/belathus/3301cf999f3d320da27eca43e52799c0

commented

Using withTag() on an input gets me an error on the line: basically a type mismatch.

commented

You have to do it in order of <item>.withTag().onlyWithTag(). Reversing the order gives that error.

commented

JEI also does not display an ingredient's name specified with onlyWithTag().

ETA: For that matter, any spawn egg (with its ID specified with onlyWithTag()) shows up as an anonymous gray egg.

This script demonstrates the problems:

  1. It uses two intermediate spawn eggs (search for "Beast" and "Humanoid"), which are then subjected to other recipes ("Polar Bear", "Witch"). Both are naturally gray, because they're not intended to be used directly, but in recipes they can't be told apart by hovertext. (They also have different spurious IDs, so the recipes do work properly. )

  2. The recipes for the cave spider and zombie pigman both use what are meant to be "standard" spawn eggs, but since the IDs are specified with onlyWithTag(), they appear as gray in the recipes. The recipes do seem to work, though.

ETA2: I'm going to work this up into a proper issue report of its own, but it might take me a bit of time depending on RL interruptions.

commented
commented

Hmm. Another thing for the documentor to note down.... For the record, all withTag()s need to precede all onlyWithTag()s. ETA: Also that sequence then doesn't work on output, so my intermediate eggs still need to be specified twice, for input and output use. (That I can work with, but it's slightly annoying.)

commented

Since this issue is about finding stuff in JEI, I'll point out that JEI shows both of my intermediate spawn egg's recipes for all spawn eggs -- that is, when hitting R on, e.g. the chicken spawn egg, the recipes for my beast and humanoid eggs (which are not used for the chicken) are also shown.

ETA: Likewise for the bat spawn egg (which I don't have a recipe for).