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.

RubyNaxela

Members
  • Joined

  • Last visited

  1. @Luis_ST Yup, so I did by translating the OP's message and writing mine in both.
  2. ์•ˆ๋…•ํ•˜์„ธ์š”, 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.
  3. 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.
  4. 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!
  5. 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.
  6. 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.
  7. 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.
  8. 1 = wood / gold 4 = diamond / netherite
  9. 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?
  10. 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)
  11. 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?
  12. 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.
  13. 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!
  14. I'm using MDK version 32.0.75. Found solution: at [1.16.1] [SOLVED] Block drops not respecting harvest level and tooltype
  15. 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!

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.