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

1 minute ago, MrPablo2000 said:

That's my eclipse log:

This says your BlockState file is missing the normal variant. Please post your code and your jsons.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Caused by: java.io.FileNotFoundException: lanterns:blockstates/orz1_off.json

Is your blockstates file named orz1_off.json? Make sure it is lowercase - all asset names must be entirely lowercase(I see that your blockstates file references the model with upper-case letters in it's name - that won't work)

Edited by V0idWa1k3r

  • Author

Thanks - now works the block texture, but in hand block still is purple-black squares...

da8b09ce681668e9gen.png

Edited by MrPablo2000

Just now, MrPablo2000 said:

Thanks - now works the block texture, but in blocks still is purple-black squares...

Do you have a ModelRegistryEvent setup?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

13 minutes ago, MrPablo2000 said:

Yes, in RegistryHandler:

OK, first off

Code Style Issue #3

And I need to see where you call ModelLoader.setCustomModelResourceLocation

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Just now, MrPablo2000 said:

Oh, I forgot about this...Where I must call it ?

The proper way to do it is in your ModelRegistryEvent or in a wrapper method in your ClientProxy. All Items have a model so there is no reason to have an IHasModel or have the ModelLoader.setCustomModelResourceLocation in your Items class. Especially since most Items will have a single model registered to them.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

I wrote it to my mod, but it still doesn't work:

package com.mrpablo2000.lanterns.network;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;

public class ClientProxy extends CommonProxy{

	public static void registerItemRenderers(Item item, int meta, String id)
	{
		ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), id));
	}
}

 

3 minutes ago, MrPablo2000 said:

I wrote it to my mod, but it still doesn't work:

Are you calling that method in your ModelRegistryEvent for your item?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Are you thinking about this?

package com.mrpablo2000.lanterns.blocks;

import com.mrpablo2000.lanterns.Lanterns;
import com.mrpablo2000.lanterns.items.ModItems;
import com.mrpablo2000.lanterns.util.IHasModel;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;

public class BlockORZ1 extends Block implements IHasModel {

	public static boolean isActive;
	public BlockORZ1(String name, boolean isActive ) {
		super(Material.IRON);
		this.isActive=isActive;
		this.setUnlocalizedName(name);
		this.setRegistryName(name);
		this.setCreativeTab(CreativeTabs.REDSTONE);
		
		ModBlocks.BLOCKS.add(this);
		ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
	
	}
	
	public void registerModels() {
		Lanterns.proxy.registerItemRenderers(Item.getItemFromBlock(this), 0, "inventory");
	}
}

 

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.