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.

bastianum

Members
  • Joined

  • Last visited

Everything posted by bastianum

  1. Thanks for trying man, but my items/blocks work well..i just need to know how i get this crafting recipe with my betterbomb compatible..
  2. package com.bastianum.betterbombs; import com.bastianum.betterbombs.blocks.BlockBetterBomb; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.asm.transformers.ItemStackTransformer; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = BetterBombs.MODID) public class BetterBombs { // STANDARD public static final String MODID = "betterbombs"; // ITEMS // public static Item fireresistance_stone = new ItemFireresistancestone(); // BLOCKS public static Block betterbomb = new BlockBetterBomb(); /** * PREINIT * */ @EventHandler public void preInit(FMLPreInitializationEvent event) { // Materialien ItemStack stackTNT = new ItemStack(Blocks.tnt); ItemStack stackDirt = new ItemStack(Blocks.dirt); ItemStack stackBetterBomb = new ItemStack(betterbomb); // Craftingrezept, BetterBomb GameRegistry.addRecipe(stackDirt, "ttt", "tdt", "ttt", 't', stackTNT, 'd', stackBetterBomb); } /** * INIT * */ @EventHandler public void init(FMLInitializationEvent event) { // Item-Rendering /* * GameRegistry.registerItem(fireSword, "fireSword"); * ModelResourceLocation res1 = new * ModelResourceLocation("bastianum:fireSword", "inventory"); * Minecraft.getMinecraft * ().getRenderItem().getItemModelMesher().register(fireSword, 0, res1); */ // Block-Rendering GameRegistry.registerBlock(betterbomb, "betterbomb"); Minecraft .getMinecraft() .getRenderItem() .getItemModelMesher() .register( Item.getItemFromBlock(betterbomb), 0, new ModelResourceLocation(MODID + ":" + ((BlockBetterBomb) betterbomb).getName(), "inventory")); } /** * POSTINIT * */ @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
  3. I registered my Items and i have a main class as well as a class for my block i want to craft with.
  4. No, this is not what i asked.. i know how to make a recipe, but in my case it does not work, i do not know how to define the ItemStack for my custom block 'betterbomb'
  5. well, this doesn't work i still cannot craft with my betterbomb ItemStack, if i put the items into the workbench the way i did in the source code i do not get an output
  6. Hey guys, i have a easy problem, but i do not know how to fix this..i want to make a crafting recipe with a custom block i made in another class, but i do not know how to define the ItemStack for it. At the moment it looks like this: @EventHandler public void preInit (FMLPreInitializationEvent event){ //Materialien ItemStack stackTNT = new ItemStack(Blocks.tnt); ItemStack stackDirt = new ItemStack(Blocks.dirt); ItemStack stackBetterBomb = new ItemStack(BlockBetterBomb.getBlockFromItem(betterbomb)); //Craftingrezept, BetterBomb GameRegistry.addRecipe(stackDirt, "ttt", "tdt", "ttt", 't', stackTNT, 'd', stackBetterBomb); } And this is my Class for the Block: public class BlockBetterBomb extends Block{ private final String name = "betterbomb"; public BlockBetterBomb() { super(Material.tnt); this.setUnlocalizedName("betterbomb"); this.setCreativeTab(CreativeTabs.tabAllSearch); } public String getName() { return name; } public static Block getBlockFromName(Block betterbomb) { return betterbomb; } public static Block getBlockFromItem(Block betterbomb) { return betterbomb; } } How do i manage, that my ItemStack takes this block? Thanks for help, bastianum

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.