Resourceful Bees

Resourceful Bees

10M Downloads

Actual Bee Ingredients in JEI have different ID than shown in tooltips

MaxNeedsSnacks opened this issue · 6 comments

commented

General Information / Description

  • Forge version: 36.1.0 (userdev)
  • Mod version: 0.6.4b

(Note that I only picked this up while adding a method allowing for custom information tabs in JEI to KubeJS)

According to advanced tooltips (F3 + H), the fake Resourceful Bees "items" / ingredients in JEI have an ID pattern of resourcefulbees:${type}_bee. Their true internal ID for use with JEI Integration (Ingredient Helper etc.) however is bee:${type}.

This can (it already has, for that matter) cause confusion downstream when people want to add, say, a custom bit of info to bees, as they're never actually exposed to that internal ID (I myself had to figure that out through the debugger), so I propose streamlining the two for better compatibility with pack and script developers (I assume without having read into it toooo much that the EntityIngredient just copies the registry ID of whatever entity it represents?), for example by changing both of them to be the Entity ID instead.

Screenshots or Crash Logs
image
(JEI / Minecraft shows Entity ID on tooltip)

image
(Actual ID is different)

commented

that's not JEI's Ingredient ID that's the entity ID, this is intentional and not a bug

commented

we display the entity ID because people may be interested in said id for entity mutations or entity spawning, the average user will not even begin to wonder what the JEI ingredient ID is so we don't show it.

commented

Fair enough. The main problem was that some users wanted to add additional information to some bees and expect whatever they see on the tooltip to "just work"™️, so it might be useful to put this somewhere still...

(Example made by an Enigmatica 6 dev to illustrate why it may be useful to streamline these):

events.listen('jei.information', (event) => {
  var rbees = [
    'resourcefulbees:brass_bee',
    'resourcefulbees:bronze_bee',
    'resourcefulbees:constantan_bee',
    'resourcefulbees:electrum_bee',
    'resourcefulbees:enderium_bee',
    'resourcefulbees:invar_bee',
    'resourcefulbees:lumium_bee',
    'resourcefulbees:signalum_bee'
  ];
  var entityType = java("com.resourcefulbees.resourcefulbees.compat.jei.JEICompat").ENTITY_INGREDIENT;
  event.addForType(
    entityType,
    rbees,
    [
      "Alloy Bees are made through Block to Item Mutations. Click this Bee's spawn egg in JEI for specifics."
    ]
  );
});
commented

we're going to be adding a Lore section to bee jsons that will show up on the entity ingredient and in the beepedia.

what exactly are you asking for?

commented

We changed it in our current rewrite where we switch to codecs, it seems i by accident switched the unique id with the resource id when i wrote it so they now match properly in dev

commented

I was basically just asking for the actual entity ingredient IDs to be visualised somewhere for the purpose of developing scripts and making packs (like the KubeJS script above, which refers to this method), but the main use case I found for this (custom JEI info tab as seen below) would already have a valid alternative if you guys plan to add lore to your bees as well

image