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.

denysmy

Members
  • Joined

  • Last visited

Everything posted by denysmy

  1. Thanks for the advice. I have overridden the method. How can I initialize it in the code so that this craft will work? I understand that most likely it is somewhere in the main class, but how?
  2. I wrote a class, but I don't understand from which class it should be inherited. Code: public class CraftingRecipe extends RepairItemRecipe { public CraftingRecipe(ResourceLocation resourceLocation) { super(resourceLocation); } }
  3. Could you provide a link to an example? I can't find it on the internet. Sorry if my questions are stupid, I'm just learning modding. "See for example FireworkRocketRecipe"
  4. Could you provide a link to an example? I can't find it on the internet. Sorry if my questions are stupid, I'm just learning modding.
  5. Thank you. I will try to apply your advice, I hope I succeed.
  6. Hi all. I have an item in the mod with durability, from which another item is crafted. Can I somehow transfer durability to a new item? here is the item class code: package com.zombier.slimesing.items; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; public class NeedlepItem extends Item { public NeedlepItem(){ super(new Properties() .tab(CreativeModeTab.TAB_TOOLS) .stacksTo(1) .defaultDurability(128) .setNoRepair() ); } @Override public boolean hasContainerItem(ItemStack stack){ return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { ItemStack stack = itemStack.copy(); stack.setDamageValue(itemStack.getDamageValue() + 1); return stack; } } If I'm returning the item, don't mind it, I'll fix it. The main thing is to understand how to transfer strength to a new item. It must be damaged by the same number of units as the previous one. The idea is that I have a needle that has durability, and I have a needle with thread that should take on the same durability after crafting.

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.