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

  • Author

That didn't work

code:

 

 

package FutureWeapons;

 

 

import Items.ItemPlasmaRifle;

import net.minecraft.item.Item;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

 

 

/**

* This @Mod annotation tells forge that we are creating a new mod. Without this, forge wont

* find your mod. This takes 2 values, a modid, which is a "name" for your mod. This cant be the

* same for ANY mod. So find a name which is new. Version is the current mod version.

*/

@Mod(modid = Reference.MODID, version = Reference.VERSION)

public class FutureWeaponsMain

{

 

 

  public static Item Plasma_Rifle;

@EventHandler

public void preInit(FMLPreInitializationEvent event)

{

        //Block handlers, handles all blocks

 

 

 

        //Item handlers, handles all items

Plasma_Rifle = new ItemPlasmaRifle();

 

RegisterHelper.registerItem(Plasma_Rifle);

Plasma_Rifle = new ItemPlasmaRifle().setUnlocalizedName("ItemPlasmaRifle").setTextureName("Future Weapons:plasmarifle");

 

 

 

        //Register handler, adds all the recipes

 

}

}

 

 

folder setup:

C:\Users\ijhpp_000\Desktop\forge 1.7.2\src\main\resources\assets\Future Weapons\textures\items

The folder name should be the same as your mod ID, and afaik your mod ID shouldn't be capital or have spaces.  Also you should do setTextureName(Reference.MODID + ":texturename"), fetching from that one central variable makes it easy to modify your mod ID and ensures you never misspell it by accident.

  • Author

still isn't working. I made the modID futureweapons

 

changed code:

 

 

package FutureWeapons;

 

 

import Items.ItemPlasmaRifle;

import net.minecraft.item.Item;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

 

 

/**

* This @Mod annotation tells forge that we are creating a new mod. Without this, forge wont

* find your mod. This takes 2 values, a modid, which is a "name" for your mod. This cant be the

* same for ANY mod. So find a name which is new. Version is the current mod version.

*/

@Mod(modid = Reference.MODID, version = Reference.VERSION)

public class FutureWeaponsMain

{

 

 

  public static Item Plasma_Rifle;

@EventHandler

public void preInit(FMLPreInitializationEvent event)

{

        //Block handlers, handles all blocks

 

 

 

        //Item handlers, handles all items

Plasma_Rifle = new ItemPlasmaRifle();

 

RegisterHelper.registerItem(Plasma_Rifle);

Plasma_Rifle = new ItemPlasmaRifle().setUnlocalizedName("ItemPlasmaRifle").setTextureName(Reference.MODID + ":plasmarifle");

 

 

 

        //Register handler, adds all the recipes

 

}

}

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.