What's the most efficient way to use event handlers?
-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
By DroidCrafter23 · Posted
I shall look into this soon, as I am currently quite busy. I just realised that I put in ModItems when I meant ModFoods, so that part would be correct, it is just my mistake... -
I made a custom fluid by following guide of Kaupenjoe on YT, but I'm unable to assign it property of waterlogging any non solid blocks, such as slabs, stairc, walls etc. as well as I can't find any sources or guides on how to do it. Here is link to my .github repository, any help is appreciated. https://github.com/AlexOja/Forge_Mod_1.19.2_nikorloss
-
By scientistknight1 · Posted
Can you post your ModBlocks class where you've registered the block, as well as which version of Minecraft you are using? -
By scientistknight1 · Posted
It looks like you're trying to pass the lemon juice item itself to the .food method in your first code snippet; that won't work. The parameter to the .food method needs to be a FoodProperties object, as the error says. The second way you're doing it there is much closer to how it should be. The problem there is that you're trying to access the LEMON_JUICE field of the vanilla FoodProperties class. This won't work because the vanilla food properties class does not have LEMON_JUICE information in it. You'll need to make your own ModFoods class, looking something like the vanilla Foods class. Here's an example: public class ModFoods { public static final FoodProperties LEMON_JUICE = (new FoodProperties.Builder()).nutrition(3).saturationMod(0.25F) .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 1500), 0.5f).build(); } Then, your completed item registration would be: public static final RegistryObject<Item> LEMON_JUICE = ITEMS.register("lemon_juice", () -> new Item(new Item.Properties().food(ModFoods.LEMON_JUICE))); Notice that I changed the FoodProperties to ModFoods, since that's the class where you'd be storing the food data. -
By drawingmeebo · Posted
For some reason it did not produce a crash log so here is the loading log. Version: 1.20.1 Forge - 47.2.0 https://paste.ee/p/MkmQt#s=0
-
-
Topics
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.