• Recently Browsing

    No registered users viewing this page.

  • Posts

    • I have a "resources\data\minecraft\tags\items\carnivore.json" { "replace": false, "values": [ "minecraft:porkchop", "minecraft:chicken", "minecraft:mutton", "minecraft:rabbit", "minecraft:beef", "minecraft:egg", "minecraft:cod", "minecraft:salmon", "minecraft:tropical_fish" ] } and I have "resources\data\mymod\tags\items\carnivore.json" { "replace": false, "values": [ "minecraft:porkchop" ] } note: yes this should be a raw meat item from my own mod in this tag group but for the particular mod I am working with there is not one, actually probably going to add one just to satisfy my own ODC but have not got around to it so porkchop it is. I can get the ingredients [don't get too hung up on code examples I'm cobbling them together to present the general ides without all the variables] that would make it harder to read without posting everything, which I can't post everything because it is someone elses mod that I am working on to send them as a quarantine gift [had a lot of time on my hands recently]. Ingredient CARNIVORE_TAGED_ITEMS = Ingredient.fromTag(ItemTags.getCollection().getOrCreate(new ResourceLocation(MyMOD.MODID, "carnivore")))); goalSelector.addGoal(4, new TemptGoal(this, 1.2D, false, CARNIVORE_TAGED_ITEMS)); When I test all that is returned is what is in my group tag reference [the lone porkchop] so that does not help much. Too much trouble to get a list of every tag group that could possibly be added and try to cobble them all together into one  list. So trying another way.. I have a init called from the mainmod commonSetup where I collect the list of items like so using ForgeRegistries.ITEMS and I have a resource reload listener that will call the same init if the resources are reloaded. So quick and dirty i get a list of items....   IForgeRegistry<Item> test = ForgeRegistries.ITEMS; List<Item> temp = Lists.newArrayList();; for(Item i: test) { if(i.getTags().toString().contains("carnivore")) { //not the smoothest way but got to get it working to reine temp.add(i.asItem().getItem()); } } Now how to get those items in temp into Ingredient CARNIVORE_TAGED_ITEMS so i can use them in the goals. Or better yet get the items from ForgeRegistries.ITEMS  using the the carnivore item group more directly bu that does not seem to be an option.
    • Forge overrides vanilla. Any override you create therefor must override Forge. Note this is not a "I would like to override Forge" conscious decision. It is forced upon you by the very nature of the system's design.
    • I followed the steps you mentioned but I could still create the Wooden Pickaxe. The advancement worked first try. I then found out there are 2 recipes: vanilla: { "type": "minecraft:crafting_shaped", "pattern": [ "XXX", " # ", " # " ], "key": { "#": { "item": "minecraft:stick" }, "X": { "tag": "minecraft:planks" } }, "result": { "item": "minecraft:wooden_pickaxe", } } forge: { "type": "minecraft:crafting_shaped", "pattern": [ "XXX", " # ", " # " ], "key": { "#": { "tag": "forge:rods/wooden" }, "X": { "tag": "minecraft:planks" } }, "result": { "item": "minecraft:wooden_pickaxe", } } So I did an override for both of these recipes and then I could not create the Wooden Pickaxe.   I noticed this because I made the custom recipe for the Wooden Pickaxe, which had a different pattern (and it worked), and decided to result air on that one, and I could not create the Wooden Pickaxe with the new pattern! Therefore I searched through the forge and vanilla recipes and found the 2 recipes. I assume that when the vanilla recipe is overrode alone, the forge recipe will work, and when the forge recipe is overrode alone, the vanilla one will work. But the vanilla could be? Then would forge automatically know to make the pattern unavailable when the vanilla one is overrode?  
    • Version-named folders aren't a thing anymore, use Installations instead
  • Topics

  • Who's Online (See full list)