-
Posts
61 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Warren Tode
-
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.
-
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.
-
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
-
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.
-
Issues adding status effects with LivingUseTotemEvent
Warren Tode replied to Braquen's topic in Modder Support
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. -
Does anyone know how to make custom shapeles recipes?
Warren Tode replied to NukolLodda's topic in Modder Support
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. -
Issues adding status effects with LivingUseTotemEvent
Warren Tode replied to Braquen's topic in Modder Support
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 -
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.
-
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?
-
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.
-
RESOLVED - [1.19.2] Recipe Book not fully opening
Warren Tode replied to Warren Tode's topic in Modder Support
Yes, this fixed the problem completely. The devil is always in the details. Thank you. -
RESOLVED - [1.19.2] Recipe Book not fully opening
Warren Tode replied to Warren Tode's topic in Modder Support
Sorry it took me so long to posting this. https://github.com/toadie-odie/TodeCoins/tree/1.2.4 -
RESOLVED - [1.19.2] Recipe Book not fully opening
Warren Tode replied to Warren Tode's topic in Modder Support
Okay, I understand. The question is, what exactly do you need to look at? I can just put the entire test mod up there. -
So I got the recipe book added and everything is working correctly, except that the book does not fully open and the main GUI doesn't slide over to make room for it. I've tried playing around with parameters for the sizing and whatnot to fix this, but no dice. I even went so far as to start over from scratch a few times to try to figure out where I messed up, and while I figured out other things along the way, it's still doing this. At this point I know I'm missing something and would like to know what I need to be checking.
-
Thank you!
-
Im new to modding and I have a few question
Warren Tode replied to YairKro's topic in Modder Support
Honestly, my method to learning anything is to "mess around and find out". Literally just pick something you're interested in modding and start looking at the Forge docs along with the work environment's external libraries. From there start building something and test to see what happens. It's really the only way to truly understand how it works. Yes, those video tutorials are okay for a starting point but at some point you'll need to go eyeballs deep on your own. Be willing to explore and experiment. Be willing to be okay with stuff crashing and learning from it. Give yourself permission to be a beginner and student. Short of taking a hammer to your computer, you're not going to actually break anything by doing any of this. Not sure what else to say here. -
Not sure what else to title this, but anyway... So my custom furnace works great now, and my sons are happy with it, and I finally got around to trying my hand at setting up a recipe book for it. So I know it works fine in the normal game environment without a recipe book. I got the code for the book all set up, but the block doesn't open the menu when I right click on it. I set up a breakpoint to find out why and it's because I'm client side. There are no errors. Nothing is crashing and I'm pretty sure this is how it's supposed to behave when you're client side trying to open a menu server side. My question is, have I done something wrong here and if so how where do I even begin looking to correct it? If I haven't done anything wrong, do I just need to compile the jar and run my mod in the normal game environment? I don't even know yet if the recipe book window and buttons are lined up properly, etc. so if I have to test it this way it's going to be a pain. I understand that for most people it's a minor cosmetic thing to have, but I would like to be able to say that I understand how it works. If you need to see the code to answer my question, I can get that set up on my GitHub, but mostly I just wanted to know how concerned I need to be and where to start looking is all. Edit: Oh, I almost forgot: this is in Minecraft version 1.19.2 for now.
-
1.19.2 - Looking to modify a mod's loot table
Warren Tode replied to Psistorm's topic in Modder Support
I'm pretty sure that if you're altering an existing loot table, you'll need to use the exact same namespaces and folder structure that loot table has in order to get the new loot in there. -
1.19.2 - Looking to modify a mod's loot table
Warren Tode replied to Psistorm's topic in Modder Support
Okay, I have ZERO understanding how loot tables work via Forge. But, before I started modding, I had no trouble altering existing loot tables or adding new ones via datapacks alone - whether these loot tables were mine, from a mod, or vanilla. This link is a good starting point for that if you'd like to do it via a datapack alone: here. You can also go here to help you build a loot table as well. I'm sure there are probably other tutorials out there for this if you need to find them. I wish I had an answer for Forge specifically though. Maybe someone else does? -
Not sure what your datapack does, but seriously check your files for typos. Also make sure to look for misplaced or missing comas, close out all brackets and parentheses, etc. One messed up comma is all it takes. When you launch your game with your datapack, make sure to have your launcher set to open the output logger. This will often tell you about errors or problems that don't show up in the log files or crash reports, and even when it does seeing it come up in real time can really help with troubleshooting.