Jump to content

RubyNaxela

Members
  • Posts

    17
  • Joined

  • Last visited

  • Days Won

    1

RubyNaxela last won the day on July 26 2020

RubyNaxela had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RubyNaxela's Achievements

Tree Puncher

Tree Puncher (2/8)

4

Reputation

  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!
×
×
  • Create New...

Important Information

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