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.

Featured Replies

Posted

I'm trying to make a crafting recipe for an enchanted book that has an enchantment already applied like sharpness or something.  But when I do .addEnchantment(Enchantment.sharpness, 1) to the item that I'm crafting then all it does is apply it like it's a sword or something, thus making it where I can't use it as an enchanting book, but as a weapon. any help?

 

public static void registerCraftingRecipes() {
		
	ItemStack sharp1 = new ItemStack(Items.enchanted_book);
		
	sharp1.addEnchantment(Enchantment.sharpness, 1);
	GameRegistry.addRecipe(new ItemStack(Items.enchanted_book), new Object[] {"F  ", " PP", " PI", 'F',Items.flint,'P',Items.paper,'I',Items.iron_sword});
}

 

This gives me the incorrect output.

Edited by MCRM

  • Author

Does that apply to 1.8.9?

 
 
 
 
Quote

Use JSON recipes

 

Edited by MCRM

  • Guest locked this topic
Guest
This topic is now closed to further replies.

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.