Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PixxiBunny

Members
  • Joined

  • Last visited

Everything posted by PixxiBunny

  1. That works! Thank you so much, and sorry if I was getting annoying lol. I'd be annoyed at me too.
  2. Alright, here's what I got. Still some errors though, any idea what's wrong? // Food public static final RegistryObject<Item> COTTON_STEAK_RAW = ITEMS.register("cotton_steak_raw", ItemBase::new); public static final RegistryObject<Item> COTTON_STEAK = ITEMS.register("cotton_steak", () -> return new Item(new Item.Properties().food(Foods.COTTON_STEAK))); public static class Foods { public static final Food COTTON_STEAK = (new Food.Builder()).hunger(8).saturation(12.8f).meat().build(); }
  3. It's saying cannot resolve symbol 'foodInstance'. Also, where would I place this code? // Food public static final RegistryObject<Item> COTTON_STEAK_RAW = ITEMS.register("cotton_steak_raw", ItemBase::new); public static final RegistryObject<Item> COTTON_STEAK = ITEMS.register("cotton_steak", ItemBase::new); public static class Foods { public static final Food COTTON_STEAK = (new Food.Builder()).hunger(8).saturation(12.8f).meat().build(); } new Item(new Item.Properties().food(foodInstance)) }
  4. How would I do this? I'm sorry I'm asking so much, I'm fairly new to this.
  5. Here's what I got, still not letting me eat it: // Food public static final RegistryObject<Item> COTTON_STEAK_RAW = ITEMS.register("cotton_steak_raw", ItemBase::new); public static final RegistryObject<Item> COTTON_STEAK = ITEMS.register("cotton_steak", ItemBase::new); public static class Foods { public static final Food COTTON_STEAK = (new Food.Builder()).hunger(8).saturation(12.8f).meat().build(); }
  6. I'm sorry, but how would I do this?
  7. I've edited the code, it's got a bunch of errors and I'm very confused. // Food public static final RegistryObject<Item> COTTON_STEAK_RAW = ITEMS.register("cotton_steak_raw", Foods::new); public static final RegistryObject<Item> COTTON_STEAK = ITEMS.register("cotton_steak", Foods::new);
  8. I've looked through the source, but I wasn't able to find any classes...
  9. Hey, I'm struggling with how to make my custom item edible. I get that i probably need a new item group for food items, but I'm pretty new to modding, so could anyone walk me through on how to do this? ❤️ Here's my registry code for my foods: // Food public static final RegistryObject<Item> COTTON_STEAK_RAW = ITEMS.register("cotton_steak_raw", ItemBase::new); public static final RegistryObject<Item> COTTON_STEAK = ITEMS.register("cotton_steak", ItemBase::new);
  10. How would I do that exactly?
  11. Is there any way to randomize the exp received? Like a range between 3.0-7.0 or something?
  12. That worked! Thanks so much!
  13. I'm pretty new to this stuff, so how would I go about overriding the experience? package com.pixxibunny.minecraftmod.blocks; import net.minecraft.block.OreBlock; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; public class RoseOre extends OreBlock { public RoseOre() { super(Properties.create(Material.ROCK) .hardnessAndResistance(3.0f,3.0f) .sound(SoundType.STONE) .harvestLevel(2) .harvestTool(ToolType.PICKAXE)); } }
  14. I am struggling on how to add XP after harvesting my custom ore. Any ideas? Here is my ore class: package com.pixxibunny.minecraftmod.blocks; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraftforge.common.ToolType; import java.util.Random; public class RoseOre extends Block { public RoseOre() { super(Properties.create(Material.ROCK) .hardnessAndResistance(3.0f,3.0f) .sound(SoundType.STONE) .harvestLevel(2) .harvestTool(ToolType.PICKAXE)); } }
  15. That worked perfectly!! Thank you so much!! ❤️
  16. I've created a loot_tables package. Here's what I have: Here is the code within the loot_tables.blocks for the rose_crystal_block.json: { "type": "minecraft:crafting_shaped", "pattern": [ "RRR", "RRR", "RRR" ], "key": { "R": { "item": "modid:rose_crystal_thing" } }, "result": { "item": "modid:rose_crystal_block", "count": 1 } } This is the exact same thing I have in the recipe json. I had no idea what to do lol.
  17. Ah, no, I don't. How would I go about setting that up?
  18. Wow! That worked! Thank you so much! One last problem, I hope you don't mind... I have it so that the block can be broken with an iron pick but it doesn't drop in any instance when harvested. Any ideas? Here is my RoseBlock class: package com.pixxibunny.minecraftmod.blocks; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; public class RoseBlock extends Block { public RoseBlock() { super(Block.Properties.create(Material.IRON) .hardnessAndResistance(5.0f,6.0f) .sound(SoundType.METAL) .harvestLevel(2) .harvestTool(ToolType.PICKAXE)); } }
  19. I've moved my recipes folder to this location as opposed to my assets folder. It's still not letting me craft it...
  20. Yes lol. Its just a placeholder for now. Here's my main mod class: package com.pixxibunny.minecraftmod; import com.pixxibunny.minecraftmod.util.RegistryHandler; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @Mod("modid") public class MinecraftMod { private static final Logger LOGGER = LogManager.getLogger(); public static final String MOD_ID = "modid"; public MinecraftMod() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); RegistryHandler.init(); MinecraftForge.EVENT_BUS.register(this); } private void setup(final FMLCommonSetupEvent event) { } private void doClientStuff(final FMLClientSetupEvent event) { } public static final ItemGroup TAB = new ItemGroup("modTab") { @Override public ItemStack createIcon() {return new ItemStack(RegistryHandler.ROSE.get()); } }; }
  21. This is for 1.15.2
  22. Alright, so I'm very new to coding and modding. I'm trying to create a crafting recipe of a block, but it just doesn't work. I'm trying to follow as many YouTube tutorials as possible, but they're just all over the place! I'm probably missing a whole chunk of code or something. Again, I'm very new to this, so any help is appreciated!!

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.