Jump to content

[1.11.2] [SOLVED] JSON files texture alignment


Bektor

Recommended Posts

Hi,

 

I've got yet another problem with my json files.:|

I guess it get's obvious what the problem is by just looking at the picture below (the alignment of the darker lines).

 

 

 

My json file (blockstate json):

{
	"forge_marker": 1,
	"defaults": {
        "textures": {
              "centre": "justanotherenergy:blocks/cable",
              "side": "justanotherenergy:blocks/cable"
        },
		"model": "justanotherenergy:cable_base",
		"uvlock": true
	},
	"variants": {
	   "down": {
	       "true": {
	           "submodel": {
	               "cable_down": {
	                   "model": "justanotherenergy:cable_side",
	                   "x": 90,
	                   "uvlock": true
	               }
	           }
	       },
	       "false": {
	       }
	   },
	   "up": {
	       "true": {
	           "submodel": {
                   "cable_up": {
                       "model": "justanotherenergy:cable_side",
                       "x": -90,
                       "uvlock": true
                   }
               }
	       },
	       "false": {
	       }
	   },
	   "north": {
	       "true": {
	           "submodel": {
                   "cable_north": {
                       "model": "justanotherenergy:cable_side",
                       "uvlock": true
                   }
               }
	       },
	       "false": {
	       }
	   },
	   "east": {
	       "true": {
	           "submodel": {
                   "cable_east": {
                       "model": "justanotherenergy:cable_side",
                       "y": 90,
                       "uvlock": true
                   }
               }
	       },
	       "false": {
	       }
       },
       "south": {
           "true": {
               "submodel": {
                   "cable_south": {
                       "model": "justanotherenergy:cable_side",
                       "y": 180,
                       "uvlock": true
                   }
               }
           },
           "false": {
           }
       },
       "west": {
           "true": {
               "submodel": {
                   "cable_west": {
                       "model": "justanotherenergy:cable_side",
                       "y": -90,
                       "uvlock": true
                   }
               }
           },
           "false": {
           }
       },
       "inventory": [{
            "model": "justanotherenergy:cable_base",
            "submodel": {
                "cable_up": {
                    "model": "justanotherenergy:cable_side",
                    "x": -90,
                    "uvlock": true
                },
                "cable_down": {
                    "model": "justanotherenergy:cable_side",
                    "x": 90,
                    "uvlock": true
                }
            },
            "transform": "forge:default-block"
       }]
	}
}

What am I doing wrong here? (still not really a fan of those json... when do they ever work on first try xD

 

Thx in advance.

Bektor

 

 

EDIT: I've also uploaded the texture file itself.

EDIT 2: more problems arrived

EDIT 3: I guess I will let it stay that way and repurpose the block. Somehow with another texture it looks nice that way.

 

Edited by Bektor

Developer of Primeval Forest.

Link to comment
Share on other sites

EDIT: Ok, I reverted those changes... No clue what was wrong... now I've only got the problem from above remaining.

Ok, while trying to fix the problem I got more stuff screwed up....

 

cable.json
  
  {
	"forge_marker": 1,
	"defaults": {
        "textures": {
              "centre": "justanotherenergy:blocks/cable_top",
              "side": "justanotherenergy:blocks/cable"
        },
		"model": "justanotherenergy:cable_base",
		"uvlock": true
	},
	"variants": {
	   "down": {
	       "true": {
	           "submodel": {
	               "cable_down": {
	                   "model": "justanotherenergy:cable_side",
	                   "x": 90,
	                   "uvlock": true
	               }
	           }
	       },
	       "false": {
	       }
	   },
	   "up": {
	       "true": {
	           "submodel": {
                   "cable_up": {
                       "model": "justanotherenergy:cable_side",
                       "x": -90,
                       "uvlock": true
                   }
               }
	       },
	       "false": {
	       }
	   },
	   "north": {
	       "true": {
	           "submodel": {
                   "cable_north": {
                       "model": "justanotherenergy:cable_side",
                       "uvlock": true
                   }
               }
	       },
	       "false": {
	       }
	   },
	   "east": {
	       "true": {
	           "submodel": {
                   "cable_east": {
                       "model": "justanotherenergy:cable_side",
                       "y": 90,
                       "uvlock": true
                   }
               }
	       },
	       "false": {
	       }
       },
       "south": {
           "true": {
               "submodel": {
                   "cable_south": {
                       "model": "justanotherenergy:cable_side",
                       "y": 180,
                       "uvlock": true
                   }
               }
           },
           "false": {
           }
       },
       "west": {
           "true": {
               "submodel": {
                   "cable_west": {
                       "model": "justanotherenergy:cable_side",
                       "y": -90,
                       "uvlock": true
                   }
               }
           },
           "false": {
           }
       },
       "inventory": [{
            "model": "justanotherenergy:cable_base",
            "submodel": {
                "cable_up": {
                    "model": "justanotherenergy:cable_side",
                    "x": -90,
                    "uvlock": true
                },
                "cable_down": {
                    "model": "justanotherenergy:cable_side",
                    "x": 90,
                    "uvlock": true
                }
            },
            "transform": "forge:default-block"
       }]
	}
}




cable_side.json
  
  {
    "textures": { "particle": "#side" },
    "elements": [
        {
            "from": [ 4, 4, 0 ],
            "to": [ 12, 12, 4 ],
            "faces": {
                "down": { "texture": "#side" },
                "up": { "texture": "#side" },
                "north": { "texture": "#side" },
                "south": { "texture": "#side" },
                "west": { "texture": "#side" },
                "east": { "texture": "#side" }
            },
            "__comment": "North cable side"
        }
    ]
}




cable_base.json
  
  {
    "textures": { "particle": "#centre" },
    "elements": [
        {
            "from": [ 4, 4, 4 ],
            "to": [ 12, 12, 12 ],
            "faces": {
                "down": { "texture": "#centre" },
                "up": { "texture": "#centre" },
                "north": { "texture": "#centre" },
                "south": { "texture": "#centre" },
                "west": { "texture": "#centre" },
                "east": { "texture": "#centre" }
            },
            "__comment": "Center cable cube"
        }
    ]
}

 

Unbenannt.png

Unbenannt.png

 

EDIT: Ok, I reverted those changes... No clue what was wrong... now I've only got the problem from above remaining.

Edited by Bektor

Developer of Primeval Forest.

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.