Jump to content

Static model with textures changing from blockstate properties


LemADEC

Recommended Posts

I've a model of my block in .obj format. I'm able to load and rotate it from the blockstate JSON.

However I'm unable to change its texture/materials. Am I missing something?

 

Here's my blockstate JSON:

{
"forge_marker": 1,
"defaults": {
	"model": "warpdrive:forcefield/projector_base.obj",
	"textures": {
		"particle": "warpdrive:blocks/forcefield/projector-side_not_connected",
		"mbase"   : "warpdrive:blocks/forcefield/projector-shape_none",
		"mbase2"  : "warpdrive:blocks/forcefield/projector-shape_none",
		"side"    : "warpdrive:blocks/forcefield/projector-side_not_connected"
	},
	"transform": "forge:default-block"
},
"variants": {
	"normal": [{}],
	"inventory": [{}],
	"facing": {
		"north": { "x": 90 },
		"south": { "x": -90 },
		"west" : { "x": 90, "y": -90 },
		"east" : { "x": 90, "y": 90 },
		"up"   : { },
		"down" : { "x": 180 }
	},
	"shape": {
		"none"      : { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_none" } },
		"cube"      : { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_cube" } },
		"cylinder_h": { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_cylinder_h" } },
		"cylinder_v": { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_cylinder_v" } },
		"plane"     : { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_plane" } },
		"sphere"    : { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_sphere" } },
		"tube"      : { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_tube" } },
		"tunnel"    : { "textures": { "mbase": "warpdrive:blocks/forcefield/projector-shape_tunnel" } }
	},
	"is_double_sided": {
		"false": {
			"shape": {
				"none"      : { },
				"cube"      : { },
				"cylinder_h": { },
				"cylinder_v": { },
				"plane"     : { },
				"sphere"    : { },
				"tube"      : { },
				"tunnel"    : { }
			}
		},
		"true": {
			"shape": {
				"none"      : { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_none" } },
				"cube"      : { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_cube" } },
				"cylinder_h": { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_cylinder_h" } },
				"cylinder_v": { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_cylinder_v" } },
				"plane"     : { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_plane" } },
				"sphere"    : { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_sphere" } },
				"tube"      : { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_tube" } },
				"tunnel"    : { "textures": { "mbase2": "warpdrive:blocks/forcefield/projector-shape_tunnel" } }
			}
		}
	},
	"state": {
		"not_connected"        : { "textures": { "side": "warpdrive:blocks/forcefield/projector-side_not_connected" } },
		"connected_not_powered": { "textures": { "side": "warpdrive:blocks/forcefield/projector-side_connected_not_powered" } },
		"connected_offline"    : { "textures": { "side": "warpdrive:blocks/forcefield/projector-side_offline" } },
		"connected_powered"    : { "textures": { "side": "warpdrive:blocks/forcefield/projector-side_powered" } }
	}
}
}

 

The model is from McJty tutorial (https://github.com/McJty/ModTutorials)

# Blender v2.67 (sub 0) OBJ File: 'projector_base.blend'
# www.blender.org
mtllib projector_base.mtl
o Cube.002_Cube
v 0.000000 0.000000 1.000000
v 0.000000 0.000000 0.000000
v 1.000000 0.000000 0.000000
v 1.000000 0.000000 1.000000
v 0.000000 0.200000 1.000000
v 0.000000 0.200000 0.000000
v 1.000000 0.200000 0.000000
v 1.000000 0.200000 1.000000
v 0.105162 0.300000 0.894838
v 0.105162 0.300000 0.105162
v 0.894838 0.300000 0.105162
v 0.894838 0.300000 0.894838
v 0.178033 0.700000 0.821967
v 0.178033 0.700000 0.178033
v 0.821967 0.700000 0.178033
v 0.821967 0.700000 0.821967
vt 0.989803 0.284731
vt 0.004179 0.284731
vt 0.004179 0.007866
vt 0.989803 0.007866
vt 0.990240 0.289015
vt 0.007213 0.289015
vt 0.007213 0.008363
vt 0.990240 0.008363
vt 0.989797 0.289133
vt 0.009384 0.289133
vt 0.009384 0.011379
vt 0.989797 0.011379
vt 0.997982 0.292245
vt 0.009121 0.292245
vt 0.009121 0.014439
vt 0.999135 0.014439
vt 0.001669 0.001666
vt 0.998337 0.001666
vt 0.998337 0.998334
vt 0.001669 0.998334
vt 0.994819 0.431148
vt 0.005943 0.431148
vt 0.005705 0.428010
vt 0.993477 0.428010
vt 0.989785 0.983519
vt 0.004785 0.987554
vt 0.992167 0.424260
vt 0.001816 0.424260
vt 0.991165 0.429341
vt 0.006288 0.429341
vt 0.995247 0.986760
vt 0.009550 0.990795
vt 0.990514 0.986758
vt 0.007624 0.990793
vt 0.987054 0.990643
vt 0.005786 0.994679
usemtl mbase
s off
f 5/1 6/2 2/3 1/4
f 6/5 7/6 3/7 2/8
f 7/9 8/10 4/11 3/12
f 8/13 5/14 1/15 4/16
f 1/17 2/18 3/19 4/20
f 5/14 8/13 12/21 9/22
f 12/23 11/24 15/25 16/26
f 8/10 7/9 11/24 12/23
f 6/2 5/1 9/27 10/28
f 7/6 6/5 10/29 11/30
f 9/22 12/21 16/31 13/32
f 10/28 9/27 13/33 14/34
f 11/30 10/29 14/35 15/36
f 13/17 16/18 15/19 14/20

 

# Blender MTL File: 'projector_base.blend'
# Material Count: 1

newmtl mbase
# Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
# Ks 0.8 0.8 0.8
d 1
# illum 2
map_Kd warpdrive:blocks/forcefield/projector-side_not_connected

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Discovering that a trusted colleague had accessed my Bitcoin account and transferred $30,000 worth of bitcoins was a devastating blow. It shattered the trust I had placed in them and left me feeling vulnerable and betrayed. However, in the face of adversity, I turned to MUYERN TRUST HACKER for assistance in reclaiming control over my finances and holding the perpetrators accountable for their actions. One of the standout features of MUYERN TRUST HACKER was its ability to provide real-time alerts and notifications, keeping me informed every step of the way. With the support of MUYERN TRUST HACKER, I was able to gather irrefutable evidence of the perpetrator's actions and hold them accountable for their crimes. Armed with the information provided by the platform, I pursued legal recourse and ensured that justice was served. The perpetrator faced severe consequences for their actions, including legal penalties and financial restitution. Beyond its role in facilitating the recovery process, MUYERN TRUST HACKER provided me with a sense of empowerment and resilience in the face of adversity. While the experience was undoubtedly challenging, it ultimately served as a testament to the importance of vigilance and the power of technology in safeguarding our digital assets. Thanks to MUYERN TRUST HACKER, I emerged stronger and more resilient, ready to face whatever challenges the future may hold. Mail; muyerntrusted[At] mail-me .c o m
    • Discovering that a trusted colleague had accessed my Bitcoin account and transferred $30,000 worth of bitcoins was a devastating blow. It shattered the trust I had placed in them and left me feeling vulnerable and betrayed. However, in the face of adversity, I turned to MUYERN TRUST HACKER web [ ht tps:// muyerntrusthack.solutions/ ] for assistance in reclaiming control over my finances and holding the perpetrators accountable for their actions. One of the standout features of MUYERN TRUST HACKER was its ability to provide real-time alerts and notifications, keeping me informed every step of the way. With the support of MUYERN TRUST HACKER, I was able to gather irrefutable evidence of the perpetrator's actions and hold them accountable for their crimes. Armed with the information provided by the platform, I pursued legal recourse and ensured that justice was served. The perpetrator faced severe consequences for their actions, including legal penalties and financial restitution. Beyond its role in facilitating the recovery process, MUYERN TRUST HACKER provided me with a sense of empowerment and resilience in the face of adversity. While the experience was undoubtedly challenging, it ultimately served as a testament to the importance of vigilance and the power of technology in safeguarding our digital assets. Thanks to MUYERN TRUST HACKER, I emerged stronger and more resilient, ready to face whatever challenges the future may hold. Mail; muyerntrusted[At] mail-me .c o m  
    • Do you have still this problem? (I have it too so I want to know if you did something with it)  
    • Thank you very much, the mod worked. I almost destroyed my computer out of anger because I couldn't find the error.
  • Topics

×
×
  • Create New...

Important Information

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