-
Modder Support
@Luis_ST Yup, so I did by translating the OP's message and writing mine in both.
-
Modder Support
์๋ ํ์ธ์, kompp. ์ด ํฌ๋ผ์ ์์ ์ ๋ชจ๋๋ฅผ ๊ฐ๋ฐํ ๋ ๋ฐ์ํ๋ ๋ฌธ์ ์ ๋ํ ๊ตฌ์ฒด์ ์ธ ์ง๋ฌธ์ ํ๊ธฐ ์ํ ๊ฒ์ ๋๋ค. ํํ ๋ฆฌ์ผ์ ์ฐพ๊ณ ์๋ค๋ฉด ์ธํฐ๋ท์ผ๋ก ๊ฒ์ํด ๋ณด์ธ์. ์ ํฌ๋ธ์๋ ๊ทธ๋ฐ ๊ฒ๋ค์ด ๋ง์ด ์์ด์. ์๋ฌด๋ ๋นํ๊ธฐ์ ๊ฐ์ ์ง๋ณด๋ ๊ฒ๋ค์ ๋ง๋ค๋ฉด์ ๋ชจ๋ฉ์ ์์ํ์ง ์์ต๋๋ค. ์ฒซ ๋ธ๋ก ๋๋ ์์ดํ ์ ํ๋ก๊ทธ๋๋ฐํ๋ ๊ฒ๋ถํฐ ์์ํฉ๋๋ค. ์์ ๊ฑธ์์ผ๋ก ์ฐจ์ธฐ ๋ ๋ฅ์ํด์ง ๊ฒ์ ๋๋ค. ํ๋ก๊ทธ๋๋ฐ์ ์ ๋ฐฐ์ฐ๊ธธ ๋ฐ๋๋๋ค. ํ์ดํ ~ ์ถ์ , ์ด๊ฒ์ ์คํ๋ ค ์์ด ํฌ๋ผ์ ๋๋ค. Hello, kompp. This forum is to ask specific questions about problems that arise when developing your own mod. If you're looking for a tutorial, search it on the Internet. There are a lot of things like that on YouTube. Nobody starts modding by making such advanced things as airplanes. Start by programming your first block or item. By small steps, you'll gradually become more skilled. I hope you'll learn programming well. Good luck! P.S. This is rather an English forum.
-
[SOLVED] [1.16.1] How to check if player can take a stack?
Thank you all for trying to point me out where to find the source/recomp library, but I know where would it be, it is just not present in my External Libraries list now, when I work with 1.16.1. The only way I can access it is from file explorer. Maybe some configuration error. Anyway, this thread seems to have deviated much from the topic. I wrote a function: public static void giveItemStack(PlayerEntity player, ItemStack stack) { if (!player.addItemStackToInventory(stack)) { player.dropItem(stack, false); } } that now works pretty much the same as the /give command, which is exactly what I wanted. Thanks @Dzuchun for that precious piece of information.
-
[1.16.1] Custom fluids
Hello, What's the best approach to adding a custom fluid using DeferredRegister? I did: public static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, MODID); then registered it in main class, but I stopped at creating a class that extends net.minecraft.fluid.Fluid. It seems this is not as simple as in the past, when you could just pass the registry name and two resource locations to the superclass... Thanks in advance for any help!
-
[SOLVED] [1.16.1] How to check if player can take a stack?
Is this Eclipse? Apparently it has a different initial gradle script than IntelliJ - which I am using. I don't have two forge libraries. I only have one which contains the compiled .jar file. And, yes, I also have client-extra and I use it as well.
-
[SOLVED] [1.16.1] How to check if player can take a stack?
Wait a minute... where can I get Minecraft source with javadoc? I've always used the .jar that is included in Forge MDK decompiled with Fernflower whenever I need to take a look at the game code.
-
[SOLVED] [1.16.1] How to check if player can take a stack?
Hello, What's the method that checks if player can take a certain stack? Like, if the player has 35.5 full stacks of dirt in their inventory, they still can take a stack of 32 blocks of dirt, but can't take either a stack of 33 dirt or a stack of any amount of cobblestone.
-
[SOLVED] [1.16.1] Block harvest level and tool is ignored.
1 = wood / gold 4 = diamond / netherite
-
[SOLVED] [1.16.1] Block harvest level and tool is ignored.
My block class look like this: package ... import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; public class MetalBlock extends Block { public MetalBlock() { super(Block.Properties .create(Material.IRON) .sound(SoundType.METAL) .hardnessAndResistance(5.0f, 6.0f) .harvestLevel(1) .harvestTool(ToolType.PICKAXE) .setRequiresTool() //or func_235861_h_() ); } } and I'm mining it with vanilla tools. I haven't created any tools in my mod yet to test it out. Are you experiencing the problem with vanilla tools?
-
[SOLVED] [1.16.1] Light gray tooltip on any item?
Thank you for the hint. Although precisely what I need is IFormattableTextComponent#func_240699_a_(TextFormatting). I'm using a version that doesn't have this function mapped yet. EDIT For the most current mapping (20200723 as for today), it's IFormattableTextComponent#mergeStyle(TextFormatting)
-
[SOLVED] [1.16.1] Light gray tooltip on any item?
Okay, now the event is working with : bus = Mod.EventBusSubscriber.Bus.FORGE But there's one last thing, which is the color. I can't just do: TextFormatting.GRAY + new TranslationTextComponent("desc.diamond.line1") so what's the correct way to do this?
-
[SOLVED] [1.16.1] Light gray tooltip on any item?
I tried the following: package ... import ... @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class TooltipHandler { @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) public static void addItemToolTip(ItemTooltipEvent event) { ItemStack stack = event.getItemStack(); if (stack.getItem() == Items.DIAMOND) { event.getToolTip().add(new TranslationTextComponent("desc.diamond.line1")); } } ... } But I get no tooltip at all.
-
[SOLVED] [1.16.1] Light gray tooltip on any item?
Hello, What's the best approach to adding a light gray tooltip to either my mod item or vanilla item? I used to do it with Item.Properties#addInformation(String), but this method won't work for vanilla items. There's a Forge event called ItemTooltipEvent. Will it do the job? How to use it? By the way, I'd like to get the text from the language file. Can I do it with I18n? Actually an example method would be welcome. Thanks in advance for any help!
-
[SOLVED] [1.16.1] Block harvest level and tool is ignored.
I'm using MDK version 32.0.75. Found solution: at [1.16.1] [SOLVED] Block drops not respecting harvest level and tooltype
-
[SOLVED] [1.16.1] Block harvest level and tool is ignored.
Hello, I've set my mod block harvest tool to pickaxe and level to 1, which should cause it to drop nothing when mined with a wooden pickaxe. However this not only does not take place, but I'm even able to harvest the block by mining it with a bare hand. Code details Block registration: public static final RegistryObject<Block> COPPER_ORE = BLOCKS.register("copper_ore", MetalOreBlock::new); MetalOreBlock class: package ... import ... public class MetalOreBlock extends Block { public MetalOreBlock() { super(Block.Properties .create(Material.ROCK) .sound(SoundType.STONE) .hardnessAndResistance(3.0f, 3.0f) .harvestLevel(1) .harvestTool(ToolType.PICKAXE) ); } } How to fix it? Thanks in advance!
IPS spam blocked by CleanTalk.