Illager Banner Item Usage In Code?

Started by SamIsCool213 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Illager Banner Item Usage In Code?

I'm making a mod where you build up an army of villager (dont steal my ideas plz) and to get the spawn eggs, u need soldier badges obtained by a lot of ways. one of the ways is you take an illager banner and craft it into several badges. the illager banner doesnt show up in the item menu help

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could lock a recipe…
Wed, 06/25/2025 - 21:45

you could lock a recipe element and edit the json to make it work with the illager banner, but it will work with white banners too, and I don't think there's a way to prevent it (this example is the recipe of a diamond, you need to replace it with your custom item)

{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "pattern": [
    "a"
  ],
  "key": {
    "a": {
      "item": "minecraft:white_banner",
      "nbt": "{BlockEntityTag:{Patterns:[{Pattern:\"mr\",Color:9},{Pattern:\"bs\",Color:8},{Pattern:\"cs\",Color:7},{Pattern:\"bo\",Color:8},{Pattern:\"ms\",Color:15},{Pattern:\"hh\",Color:8},{Pattern:\"mc\",Color:8},{Pattern:\"bo\",Color:15}]}}"
    }
  },
  "result": {
    "item": "minecraft:diamond",
    "count": 1
  }
}