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.

elterPro

Members
  • Joined

  • Last visited

  1. --> http://www.minecraftforge.net/wiki/Tutorials/Multiblock
  2. Hey, you need a crafting handler, create a new class an name it as you want. Then define it in your mod_xxx.java in the "public void init..." method with GameRegistry.registerCraftingHandler(new CraftingHandler()); In this example I called the CraftingHandler "CraftingHandler" Now you have to make your Item and then add the following: aloeVeraMilk = (new ItemXXX(975)).setIconIndex(75).setItemName("Test Item").setMaxDamage(10); // Add your Max. Damge here!!! Now we want, that you won't loose your Item after crafting. Go the crafting handler and add: public class CraftingHandler implements ICraftingHandler { @Override public void onCrafting(EntityPlayer player, ItemStack item, IInventory craftMatrix) { for(int i=0; i < craftMatrix.getSizeInventory(); i++) { if(craftMatrix.getStackInSlot(i) != null) { ItemStack j = craftMatrix.getStackInSlot(i); if(j.getItem() != null && j.getItem() == mod_eltrixscience.vaporizerItem) { ItemStack k = new ItemStack(mod_xxx.xxxItem, 2, (j.getItemDamage() - 1)); // <-- Set the Damage after crafting... craftMatrix.setInventorySlotContents(i, k); //<-- Put the item back into the crafting gui! } } } } } Hope I helped you! Greetings from germany!
  3. I mean when I quit and come back, all my discovered informations are away. If you create a new map, it's ok, that you will loose your informations...
  4. Hey Guys, I want, that you have to eat a plant to discover what it does. That works quite good, but everytime I start the map new, all discovered informations are resteted. Furthermore it would be nice, if it also works for every single player in multiplayer... So I think I've to save the vars to a file, but how can I do it? So here are the relevant parts of the Code: ItemFoodLantanaBerries.java : public class ItemFoodLantanaBerries extends ItemFood { public boolean discovered = false; // This var says if you know the plant or not. At start you don't know what this plant does. /... public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { discovered = true; // <-- If you've eaten the plant, you know the properties of it. /... } @SideOnly(Side.CLIENT) public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) { if(discovered == false) // If you don't know the plant, you will have an other information. { par3List.add("Some blue berries."); } else { par3List.add("There is a medium posion inside."); } } }
  5. Hey Guys, the main question is in the title. I want to add a potion effect, which causes, that the monsters won't attack the player, while he has the potion effect. Greetings
  6. Big Thanks to all of you, I'll try it! :-) Greetings!
  7. Hey Guys, first I want to say sorry, because my english maybe can be bad, it's school english... So my question is, how can I define a crafting recipe, with some factors, wich won't be away after crafting and stay at there slot? Maybe someone knows Equivalent Exchange, there are many crafting-recipes with the philosophers stone and the stone stays in the slot, even if I've crafted something...So I don't consume it... My Code: Relevant parts of the mod_*** //... public static Block vaporizer; public static BlockFlower aloeVera; public static Item aloeVeraAloin; //... vaporizer = (new BlockVaporizer(539, 0)) .setBlockName("vaporizer"); LanguageRegistry.addName(vaporizer, "Vaporizer"); GameRegistry.registerBlock(vaporizer); aloeVera = (BlockFlower) new BlockAloeVera(540,0).setBlockName("aloeVera"); LanguageRegistry.addName(aloeVera, "Aloe Vera"); GameRegistry.registerBlock(aloeVera); aloeVeraAloin = (new ItemFoodAloeVeraAloin(904)).setIconIndex(4).setItemName("aloeVeraAloin"); LanguageRegistry.addName(aloeVeraAloin, "Aloin"); GameRegistry.addRecipe(new ItemStack(aloeVeraAloin,1), new Object[]{"A", "V", 'A', mod_eltersmiasmata.aloeVera, 'V', mod_eltersmiasmata.vaporizer}); //... Ok I want, that you can craft aloeVeraAloin with AloeVera and a vaporizer, the AloeVeraPlant is consumed after crafting but the vaporizer is still there... Hope you can help me! Greetings!

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.