-
Posts
23 -
Joined
-
Last visited
Everything posted by PixxiBunny
-
That works! Thank you so much, and sorry if I was getting annoying lol. I'd be annoyed at me too.
-
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(); }
-
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)) }
-
How would I do this? I'm sorry I'm asking so much, I'm fairly new to this.
-
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(); }
-
I'm sorry, but how would I do this?
-
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);
-
I've looked through the source, but I wasn't able to find any classes...
-
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);
-
How would I do that exactly?
-
Is there any way to randomize the exp received? Like a range between 3.0-7.0 or something?
-
That worked! Thanks so much!
-
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)); } }
-
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)); } }
-
That worked perfectly!! Thank you so much!! ❤️
-
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.
-
Ah, no, I don't. How would I go about setting that up?
-
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)); } }
-
I've moved my recipes folder to this location as opposed to my assets folder. It's still not letting me craft it...
-
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()); } }; }
-
This is for 1.15.2
-
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!!