Jump to content

Recommended Posts

Posted (edited)

The new properties show up in Minecraft just wanted to check I was storing the properties correctly before I add a few more properties to my block.

 

block in Minecraft. the texture does work until I add size variation to the blockstate, included error at the bottom. 

  Reveal hidden contents
 
 

BlockTent.java

  Reveal hidden contents
 

TileEntityTent

  Reveal hidden contents
 

tentblock.json - if I remove the size variation the textures show up correctly.

  Reveal hidden contents
 

Error Code - blockstate was working fine before I started adding tent size, wasn't sure if I was storing the size data incorrectly.

  Reveal hidden contents
 

 

Edited by tomtomtom09
added notes

Developer of CampCraft

Posted

}//TODO add the other fabric variations

You need to add your other fabric variations, assuming that those variants exist in your code.

 

Second:

        "size":
        {
            "small":
            {
                "fabric":
                {
                    "jungle":
                    {

That is not how variants are specified.

You either need to use the vanilla format ("fabric=jungle,size=small":{ ... }) or the Forge variant ("fabric":"jungle" { ... }, "size":"small" { ... }).

  • Like 1

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 2/10/2018 at 7:29 PM, Draco18s said:

}//TODO add the other fabric variations

You need to add your other fabric variations, assuming that those variants exist in your code.

Expand  
 

I remove the other fabric variations while I get the size properties to work.

 

Spent few days trying different ways to get this json file to work. My other blocks with fabric data work fine just blocktent not loading correctly

 

My last attempt using the vanilla format.

  Reveal hidden contents
 

 

Error code loading model.

  Reveal hidden contents
 

 

Edited by tomtomtom09

Developer of CampCraft

Posted

Show your entire log. The underlying error may be hidden by the missing variant exception.

  • Like 1

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 2/13/2018 at 6:09 PM, Draco18s said:

Show your entire log. The underlying error may be hidden by the missing variant exception.

Expand  

Think I found the problem: 

java.lang.Exception: Could not load model definition for variant campcraft:tentblock

 

Full log:

  Reveal hidden contents
 

 

Developer of CampCraft

Posted
  On 2/13/2018 at 7:34 PM, tomtomtom09 said:


Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 104 column 2 path $

Expand  

The JSON format does not permit comments.

  • Like 1

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)

Thank you for the help draco:) I've played around with the code and got it working nicely with texture layers.

  Reveal hidden contents
 

 

Got one more question about creating a recipe for this block.

 

I can create recipes for all the fabric type but I'm not sure how to go about adding the size property to the block.

Have been looking at how fireworks are created which could be one option.

 

Just wondering if anyone had any tips or ideas on the best way to add recipes with properties stored in the tileentity?

 

 

 

 

 

Edited by tomtomtom09

Developer of CampCraft

Posted
  Quote

Just wondering if anyone had any tips or ideas on the best way to add recipes with properties stored in the tileentity?

Expand  

if you make a custom recipe (like fireworks, banners, dying recipes), you make the output ItemStack yourself. you can add any number of things into the ItemStack's nbt. then, react to the player placing that block (actually to using the item on the ground), get the data from held item and create the block state and the tile entity.

 

but if you only have two or three sizes, i'd likely go with separate simple recipes instead of a custom recipe type.

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.