Jump to content

[1.11.2] [SEMI-SOLVED] OBJ Item doesn't change with transforms


SuperHB

Recommended Posts

I added an OBJ block to my mod that also renders the OBJ model as an item. When I try changing the gui display rotation or scale, nothing changes. All it looks like is flat with no rotation.

 

This is my current blockstate json file. I've tried using gui display as well and that didn't work either. I'm pretty sure the model isn't changed for thirdperson or hand display either.

{
	"forge_marker": 1,
	"defaults": {
		"model": "arcademod:generic_machine.obj",
		"custom": { "flip-v": true },
        "transform": "forge:default-block"
	},
	"variants": {
        "game": {
			"snake": {
				"textures": {
					"#Back": "arcademod:blocks/generic_machine"
				}
			},
            "tetrominoes": {
                "model": "arcademod:tetris.obj"
            },
            "pacman": {
            	"model": "arcademod:pacman.obj"
            }
		},
		"facing": {
			"south": {
				"y": 0
			},
			"west": {
				"y": 90
			},
			"north": {
				"y": 180
			},
			"east": {
				"y": 270
			}
		}
	}
}

 

Edited by SuperHB
Link to comment
Share on other sites

alright, so i literally put "transform": "forge:default-block" everywhere and it now works. It seems like it has to be in the "facing" variants... which also breaks the block from being able to rotate...

 

{
	"forge_marker": 1,
	"transform": "forge:default-block",
	"defaults": {
		"transform": "forge:default-block",
		"model": "arcademod:generic_machine.obj",
		"custom": { "flip-v": true }
	},
	"variants": {
        "game": {
			"snake": {
				"transform": "forge:default-block",
				"textures": {
					"#Back": "arcademod:blocks/generic_machine"
				}
			},
            "tetrominoes": {
            	"transform": "forge:default-block",
                "model": "arcademod:tetris.obj"
            },
            "pacman": {
            	"transform": "forge:default-block",
            	"model": "arcademod:pacman.obj"
            }
		},
		"facing": {
			"south": {
                "transform": "forge:default-block",
				"y": 0
			},
			"west": {
                "transform": "forge:default-block",
				"y": 90
			},
			"north": {
                "transform": "forge:default-block",
				"y": 180
			},
			"east": {
                "transform": "forge:default-block",
				"y": 270
			}
		}
	}
}

 

EDIT: Since my ItemMeshDefinition only tries to get the facing=north variant I removed all the other "transform" except for the one under "facing=north" and that fixed my block facing issue. Except for north. I can switch ItemMeshDefinition to get "facing=south" as a way around this. But is this a bug? as putting the transform under "default" or anywhere else didn't work

Edited by SuperHB
Link to comment
Share on other sites

If it's in defaults and the variants don't change it, you don't need it in the variant block.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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



×
×
  • Create New...

Important Information

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