Jump to content

Recommended Posts

Posted

(Sorry for my English i'm french)

 

Hi, i'm a beginner in modding and I have a problem for putting a texture on a block. In fact, i have 2 items and 1 block and the block had the texture i have put on the item, so it's very weird. Sometimes (and i don't know why), the item texture appear and sometimes it dissapear, same thing for the block. https://github.com/Asstryfi/RubyMod (i have just put the resources and main mod file)

 

Thanks.

 

 

Posted

Your github repository is setup incorrectly. The root directory of your repository must be the root directory of your project.

 

Quote

public static CommonProxy proxy;

CommonProxy makes no sense. Proxies exist to separate sided-only code. If your code is common it goes into your main mod file or literally anywhere else but the proxy.

 

Quote

public static final Block BLOCK_RUBY_ORE = new BlockRubyOre(Material.ROCK);

Don't ever use static initializers. Instantinate your stuff in the appropriate registry events.

 

Quote

String resourceName = item.getUnlocalizedName().substring(5).replace(".", ":");

Unlocalized names have nothing to do with anything but displaying the item's name. Just use item.getRegistryName instead.

 

@Override
public void preInit() {
  super.preInit();
  ItemRegistery.registerItemsModel();
}

No items or blocks have been registered by preinit yet. It is too early to register models. There is a specific ModelRegistryEvent for you to register your models in and not anywhere else.

 

{
  "variants": {
    "defaults": {
      "model": "learn:ruby_ore"
    },
    "normal": {
      "model": "learn:ruby_ore"
    },
    "inventory": {
      "model": "learn:ruby_ore"
    }
  }
}

Why are you specifying the variant named "defaults"? You don't need to specify the "inventory" variant either.

 

Apart from all that look at the log the game generates during startup. It tells you all you need to know about any issues.

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.