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

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

 

 

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

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.