Jump to content

Warren Tode

Members
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    3

Warren Tode last won the day on February 6 2023

Warren Tode had the most liked content!

2 Followers

Converted

  • Gender
    Undisclosed
  • URL
    https://artofchaos.blog

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Warren Tode's Achievements

Creeper Killer

Creeper Killer (4/8)

10

Reputation

  1. I haven't done anything with 1.20.1 yet, but I believe what you're trying to do needs to be done via Global Loot Modifiers and writing up a file that injects into the existing vanilla loot table, because what you posted here looks like it's supposed to overwrite it. So I would say that the first thing you need to do is become familiar with that and how it works in 1.20.1 and then go from there.
  2. You can, but you will need a mixin to insert that line of code into the registerGoals() method of the Creeper class. Or something along those lines.
  3. Okay, finally figured it out and it was - as I expected it would be - embarrassingly simple. Since I hadn't come across a working example of this, if anyone else every happens to have this question pop up for them, if they want to set up a datagen file to create a file using the LootTableIdCondition, which injects a loot table into another loot table, they need to set the file up like this in the second entry I have in here: https://github.com/toadie-odie/TodeCoins/blob/1.3.4/src/main/java/net/warrentode/todecoins/datagen/ModLootModifierGenProvider.java
  4. I think this is the correct vanilla behavior for the fortune effect? Not sure if there is a way around this one. Edit: I mean, this is almost akin to how you can't get the recipe book to recognize damaged items as recipe ingredients for mod recipe types.
  5. Almost forgot, in case someone needs to look at the code for this, here is the link to the repository of the mod in question that I'm working on: https://github.com/toadie-odie/TodeCoins/tree/1.3.4
  6. Okay, I feel like I should be able to figure this out on my own since I'm completely able to set up the JSON files for this by hand by myself and they work completely as intended. But now that I'm adding the entity themed collectible coins my sons have asked for, it's a lot of coins to add and doing it by hand means a lot of files to write. I thought that it would be easier to set up a datagen to write the file for me, and just add the coins to a master loot table with conditional entity tags on them and then inject the master loot table into all of the entity loot tables. I can still do this by writing the master file by hand, but I would really like to know what the command line is for the LootTableIdCondition is inside the DataGen. I've found this: https://docs.minecraftforge.net/en/1.18.x/resources/server/loottables/#loot-table-id-condition And this: https://github.com/MinecraftForge/Documentation/blob/1.19.2/docs/resources/server/loottables.md And referred back to this: https://github.com/MinecraftForge/MinecraftForge/blob/1.19.2/src/test/java/net/minecraftforge/debug/DataGeneratorTest.java Edit: And yes, I've found this too, but nothing I try to target in this file within my datagen seems to work? So I know it's a matter of using the proper syntax here that I'm failing to do. https://github.com/MinecraftForge/MinecraftForge/blob/42115d37d6a46856e3dc914b54a1ce6d33b9872a/src/main/java/net/minecraftforge/common/loot/LootTableIdCondition.java And I've dug through the external libraries in my workspace program, so I know I'm probably missing something super simple and obvious here and thus, I feel really dumb even asking but after spending several days trying to puzzle this out without any luck, I'd just would like to know even though I can do it by hand and be done with it. I just want to understand how this stuff works and for the moment, I find the datagen stuff really cool.
  7. Okay so you want to modify the existing totem's function and not create a brand new function or totem? Do I understand this correctly? If so, you'll probably need a mixin of some kind that targets the "checkTotemDeathProtection" in the LivingEntity class - that's the method I copied for my coin charm, but it's the built-in method for the game's totem. This is the way I would approach it at least.
  8. Try searching for the Shapeless Recipe in your workspace program's external libraries, which should have been downloaded along with the assets when you set up gradle for Forge. Looking at that file will show you how Minecraft sets it up and you can tinker with it in a custom file of your own from there. Additionally, take a look at how the crafting table handles the matching up of ingredients for shapeless recipes. You can also look at my two-slot fuel free furnace type that uses shapeless recipes. I did exactly as described above to design my custom recipe class and then built my entity class. https://github.com/toadie-odie/TodeCoins/blob/1.3.2/src/main/java/net/warrentode/todecoins/recipe/CoinPressRecipe.java https://github.com/toadie-odie/TodeCoins/blob/1.3.2/src/main/java/net/warrentode/todecoins/block/entity/CoinPressBlockEntity.java An alternative recipe check method can be looked at here: https://github.com/toadie-odie/TodeVillagers/blob/master_03/src/main/java/net/warrentode/todevillagers/blocks/entity/GlassKilnBlockEntity.java I think maybe that the Glass Kiln one would be easier for you starting out, it was for me. In your case the points of interest are at lines 164 and 215.
  9. I copied the Totem of Undying event for my coin charm, and as you can see in line 113 it has the method removeAllEffects in there, so if you're building a similar event, simply don't add the method to prevent it from removing effects. https://github.com/toadie-odie/TodeCoins/blob/1.3.2/src/main/java/net/warrentode/todecoins/event/ModEvents.java
  10. Got it all set up and it's working now. Marking this thread resolved.
  11. Thank you so much for clearing that up. Was trying to figure out why that was lighting up in red so I went looking for the proper way to get it registered. Really didn't want to come up with some weird mixin just to get a collectible coin to drop. I must say your block tag condition looks pretty useful too.
  12. I made a custom loot item condition using the weather check one as a reference, and I found this page in the documents regarding how to register it: https://docs.minecraftforge.net/en/1.12.x/items/loot_tables/ but it doesn't look like the LootConditionManager still exists in 1.19.2. So how do I get this custom condition of mine registered properly so that the game recognizes it as a condition type?
  13. https://github.com/toadie-odie/TodeCoins/tree/1.2.9/src/main/java/net/warrentode/todecoins/gui/coinpressgui https://github.com/toadie-odie/TodeCoins/tree/1.2.9/src/main/java/net/warrentode/todecoins/recipe I believe those links are for everything specific to setting up the recipe book. In any case, it's all in there and working. Just know that due to the way vanilla Minecraft is designed, the ghost recipe will not recognize damaged items as a valid ingredient, but they still work properly when manually placed inside the crafting grid.
  14. Yes, this fixed the problem completely. The devil is always in the details. Thank you.
  15. Looking at your mod list, I'm going to guess it's Immersive Portals with the mixin causing the problem.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.