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
14 minutes ago, Draco18s said:

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

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)
32 minutes ago, Addakis said:

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

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
1 hour ago, 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.

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:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Posted
1 minute ago, 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).

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

Posted
36 minutes ago, 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

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)
53 minutes ago, Addakis said:

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

"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:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

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.