Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Solved][1.16.5] Colored Item with block model


Recommended Posts

I wanted to create a colored Item based on the item's NBT tag data, so I used an IItemColor, which worked well. However, I changed the item's model to that of a block model: 

{
  "parent": "block/cube_all",
  "textures": {
    "all": "modid:item/custom_item"
  }
}

Now, the item is not being colored. How can I color the item model with the NBT tag data? I'm storing DyeColor IDs in the NBT tag to read in the IItemColor instance. 

Edited by DavidQF555
Link to post
Share on other sites
{
	"ambientocclusion": false,
	"textures": {
		"all": "block/water_still"
	},
	"elements": [
		{
			"name": "water",
			"from": [2, 1, 2],
			"to": [14, 12, 15],
			"rotation": {"angle": 0, "axis": "y", "origin": [10, 9, 10]},
			"color": 4,
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "north"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "south"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "west"},
				"up": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up"},
				"down": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "down"}
			}
		}
	]
}

smth like it

Edited by WildTan
Link to post
Share on other sites
50 minutes ago, WildTan said:

{
	"ambientocclusion": false,
	"textures": {
		"all": "block/water_still"
	},
	"elements": [
		{
			"name": "water",
			"from": [2, 1, 2],
			"to": [14, 12, 15],
			"rotation": {"angle": 0, "axis": "y", "origin": [10, 9, 10]},
			"color": 4,
			"faces": {
				"north": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "north"},
				"east": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up"},
				"south": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "south"},
				"west": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "west"},
				"up": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "up"},
				"down": {"uv": [0, 0, 16, 16], "texture": "#all", "cullface": "down"}
			}
		}
	]
}

smth like it

I mean an item that tints the texture under certain conditions like dyed leather armor but I'm trying to use a block model for an item. IItemColor usually works for normal item models but it isn't working for my item with a block model. Is there some solution to this or should I be doing something else? 

Link to post
Share on other sites

To be tinted your model face needs to have a tintindex set (not -1, which is the default and means "do not tint"). block/cube_all has no tintindex set for any of its faces - as such your model does not get tinted.

  • Like 1
Link to post
Share on other sites
1 hour ago, diesieben07 said:

To be tinted your model face needs to have a tintindex set (not -1, which is the default and means "do not tint"). block/cube_all has no tintindex set for any of its faces - as such your model does not get tinted.

yeah that works, thanks

Link to post
Share on other sites
  • DavidQF555 changed the title to [Solved][1.16.5] Colored Item with block model

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.