Jump to content

Recommended Posts

Posted

After building my mod using gradle and installing to Minecraft, all my items have a purple and black checkerboard texture.

Main Mod Class:

 

package com.Sk8er9.MoreCookies;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

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.registry.GameRegistry;

 

 

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

public class MoreCookies

{

    public static final String MODID = "morecookies";

    public static final String VERSION = "1.0";

   

    //Items

    public static Item testCookie = new testCookie(9999, 20, false);

 

    //The Creative Tab

    public static CreativeTabs cookiesTab = new CreativeTabs("cookiesTab")

    {

    public Item getTabIconItem()

    {

    return Items.cookie;

    }

    };

 

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

        //GoldCookie

    testCookie = new testCookie(9999, 20, false).setUnlocalizedName("itemTest").setTextureName(MODID + ":" + "testCookie");

   

    GameRegistry.registerItem(testCookie, testCookie.getUnlocalizedName().substring(5));

    GameRegistry.addRecipe(new ItemStack(MoreCookies.testCookie, 1), new Object[] {"GGG","GCG","GGG",'G', Items.gold_ingot, 'C', Items.cookie});

   

   

}

}

 

 

 

Item class:

 

package com.Sk8er9.MoreCookies;

 

import net.minecraft.item.*;

import net.minecraft.creativetab.CreativeTabs;

 

public class testCookie extends ItemFood{

 

public testCookie(int i, int j, boolean b) {

super(j, b);

this.setCreativeTab(MoreCookies.cookiesTab);

this.setPotionEffect(5, 30, 2, 1f );

}

 

}

 

 

 

 

Textures do work when I run the mod using Eclipse, but after building it the textures do not load in. My texture is in [Forge Install Folder]\src\main\resources\assets\MoreCookies\textures\items\testCookie.png.

 

Any ideas on how to fix this?

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.