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

Hello I'm new to modding and I need help trying to figure out why my texture file won't work.

Eclipse doesn't display any errors when I run Minecraft but all I get is the "Missing Texture" icon

 

Here is a sample of my code:

It's going to be a bedrock mod

 

 

package com.minecraft.bedrockmod;

 

import cpw.mods.fml.common.Mod;

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

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

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

import cpw.mods.fml.common.registry.GameRegistry;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

 

@Mod(modid = BedrockPiece.modid, version = BedrockPiece.version)

 

public class BedrockPiece {

 

public static final String modid = "BedrockPiece";

public static final String version = "1.0";

 

public static Item BedrockPiece;

 

 

@EventHandler

public void init(FMLPreInitializationEvent event){

 

BedrockPiece = new Item().setUnlocalizedName("BedrockPiece").setCreativeTab(CreativeTabs.tabMaterials).setTextureName(modid + ":" + "bedrockpiece");

GameRegistry.registerItem(BedrockPiece, "BedrockPiece");

 

}

 

@EventHandler

public void init(FMLInitializationEvent event){

 

}

 

}

 

I would appreciate any help...

Thanks

Fellow Minecrafter & Modder

  • Author

ahhhh yes

I forgot

The Platforms and Versions!

 

The platform that I'm coding on is Mac OS X 10.9.4

 

Minecraft Version is 1.7.10

 

Eclipse is 4.4.0 Luna

Sry about that

 

1. Use spoiler tags for code

2. Please actually try googling before posting here.. there are plenty of tutorials on how to do this.

Heres what you've done wrong(so you know)

 

1. Do not declare BedrockPiece as Item(). Make your own class.

2. You have not included @SideOnly(Side.CLIENT) in your code anywhere. This goes in your own class you made above

3. You have 2 public void init's, why?

4. You have not set the ItemID.

 

Really... what do you expect. Code doesn't go "oh I guess he'll want a texture for this... lets try and find it". You need to tell it exactly what do to. Where in your code do you think you've told it to load a texture?

 

 

  • Author

Where would I put @SideOnly?

 

And where would I set the Item ID

 

What do you mean make my own class?

 

Again, I'm new to modding

 

Also, I have followed other tutorials and am doing the exact same thing

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.