Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

  • Days Won


RubyNaxela last won the day on July 26 2020

RubyNaxela had the most liked content!

Community Reputation

4 Neutral

About RubyNaxela

  • Rank
    Tree Puncher

Recent Profile Visitors

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

  1. 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
  2. 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!
  3. 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.
  4. 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.
  5. 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.
  6. 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_() ); } } an
  7. 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)
  8. 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?
  9. 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.
  10. 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!
  11. I'm using MDK version 32.0.75. Found solution: at [1.16.1] [SOLVED] Block drops not respecting harvest level and tooltype
  12. 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 .c
  13. @diesieben07 danke schön. I think you help the best way possible. You don't serve ready solution but make me do some research on my own with a brief couple of words. I appreciate that. But anyway, back to the topic. The problem was indeed with loading the model, but not with the model itself. My blockstate file looked like this: { "variants": { "normal": { "model": "[modid]:sylvite_block" } } } "normal" is not a recognized blockstate anymore and has to be empty. Furthermore, I addressed the model file wrongly. After corrections, it looks like this: { "variants": { ""
  14. Hello, I've decided to update my old mod to 1.16.1 (actually I'm rewriting many things completely due to major changes in code in both Minecraft and Forge). But during the work, I encountered a really stupid problem. Like I said in the title, texture of every block is visible in any item slot, as well as in my hand. However when I place it down, the purple-black checker shows up. What can cause the problem? Code details The block is registered like this: public static final RegistryObject<Block> SYLVITE_BLOCK = BLOCKS.register("sylvite_block", SylviteBlock::new); publ
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.