Jump to content

Recommended Posts

Posted

Im looking to adjust my block models based on neighboring blocks but Im not sure how to implement and up(), down(), east(), etc methods which can be used in my blockstate json. Any help is much appreciated. Thanks!

Posted

You don't implement methods in a blockstate, you implement properties.

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.

Posted
  On 4/22/2020 at 9:49 PM, Draco18s said:

You don't implement methods in a blockstate, you implement properties.

Expand  

That's what I meant, sorry I'm new to modding. My current blockstate is as follows.
{
  "multipart": [
    {"apply": {"model": "ai:copper_cable"}},
    {   "if": { "Up": "true" },
      "apply": { "model": "ai:copper_cable_turn" }
    },
    {   "if": { "North": "true" },
      "apply": { "model": "ai:copper_cable0"}
    },
    {   "if": { "East": "true" },
      "apply": { "model": "ai:copper_cable_turn", "y": 90}
    },
    {   "if": { "South": "true" },
      "apply": { "model": "ai:copper_cable_turn", "y": 180}
    },
    {   "if": { "West": "true" },
      "apply": { "model": "ai:copper_cable_turn", "y": 270}
    },
    {   "if": { "Down": "true" },
      "apply": { "model": "ai:copper_cable_turn", "y": 270}
    }
  ]
}

Note: I have tried both "if" and "when"

What am I doing wrong?

Posted

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.

Posted (edited)
  On 4/22/2020 at 10:38 PM, Addakis said:

I based it off of minecraft's cobblestone wall json.

Expand  

Which is also fine.

You now need to look at the cobblestone wall java class to see how those properties are set.

 

Just changing around the json to use different "words" doesn't actually do anything. Those words have specific meaning and changing it to something else makes the entire block useless.

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.

Posted
  On 4/22/2020 at 11:10 PM, Draco18s said:

Which is also fine.

You now need to look at the cobblestone wall java class to see how those properties are set.

 

Just changing around the json to use different "words" doesn't actually do anything. Those words have specific meaning and changing it to something else makes the entire block useless.

Expand  

Yeah i get that. But doesnt mcp not work any more? I dont know of any other way to get to the class files. Other tha. Searching through the mess that is not decompiled 1.12.2 files

Posted

You should use 'when' instead if 'if'.

Also words like 'north' and 'up' should be all lower case (unless you explicitly set the property name to upper case).

Some tips:

  Reveal hidden contents

 

Posted
  On 4/23/2020 at 1:08 AM, DavidM said:

You should use 'when' instead if 'if'.

Also words like 'north' and 'up' should be all lower case (unless you explicitly set the property name to upper case).

Expand  

Thats how I had it initially but it still gave me the model not found model/texture.

Posted
  On 4/23/2020 at 12:57 AM, Addakis said:

Yeah i get that. But doesnt mcp not work any more? I dont know of any other way to get to the class files. Other tha. Searching through the mess that is not decompiled 1.12.2 files

Expand  

Set up Forge properly, the class files are in the referenced libaries group in your project hierarchy.

If you're not using Forge then why are you posting on the Forge forums?

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.

Posted (edited)
  On 4/23/2020 at 1:10 AM, Addakis said:

Thats how I had it initially but it still gave me the model not found model/texture.

Expand  

"Model not found" does not mean the arguments in the JSONs file is wrong, it means that the game cannot find the file. The two problems are not related.

Check your path and file names.

Edited by DavidM

Some tips:

  Reveal hidden contents

 

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.