Jump to content

Recommended Posts

Posted

Hello, my name is flight and I wish to seek help. I am new to to the forums and am excited to be here! Anyway here is the problem. I was making a new block called Ancient Grass. I made the code and json files to give textures to the block when it is in hand and placed. Although it seems to still give me the purple and black texture when I break the block. Here is my code and json files.

 

BlockMod Class (This is where my blocks are registered to the game)

 

 

  Reveal hidden contents

 

Ancient Grass Class

[/size]

  Reveal hidden contents

 

Ancient Grass(BlockStates JSON[/font])

 

  Reveal hidden contents

 

Ancient Grass(Block JSON)[/font]

 

  Reveal hidden contents

Help would be greatly appreciated!

Posted

And you got no error on loading?

 

Is your modid lowercase? Are assets package names lowercase (fit modid)?

  Quote

1.7.10 is no longer supported by forge, you are on your own.

Posted

Yup I don't get any error when I execute my code. It's just when I break the block I get he purple and black particle effects. Sorry I don't think I stated my problem clearly.

Posted

Where do I need to put that in my block state? Would you mind showing me? I didn't mean to write that earlier comment. If you don't know what I mean don't worry about it.

Posted

Second post corrects my error but it would be like this.

 

{
    "textures": {
        "0": "cammod:blocks/Ancient_side",
        "1": "cammod:blocks/AncientGrass",
        "2": "cammod:blocks/AncientGrass_bottom"
    },
    "elements": [
        {
            "name": "Cube",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
                "particle": "modid:blocks/texturename"
            }
        }
    ]
}[/font]

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Not exactly... (Just warnings except the first line)

 

  Reveal hidden contents

 

 

Posted

That's because it's specified in the blockstate file, not the model.

 

Eg:

 

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "particle": "blocks/planks_oak"
        },
        "model": "harderores:sifter",
        "uvlock": false
    },
    "variants": {
        "normal": [{

        }],
        "inventory": [{
            
        }]
    }
}

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 7/31/2016 at 4:47 AM, Draco18s said:

That's because it's specified in the blockstate file, not the model.

 

Eg:

 

{
    "forge_marker": 1,
    "defaults": {
        "textures": {
            "particle": "blocks/planks_oak"
        },
        "model": "harderores:sifter",
        "uvlock": false
    },
    "variants": {
        "normal": [{

        }],
        "inventory": [{
            
        }]
    }
}

 

No, it's specified in the block model JSON, code below is an example of a vanilla's block model

[spoiler=Beacon Block Model JSON]

{
    "ambientocclusion": false,
    "textures": {
        "particle": "blocks/glass",
        "glass": "blocks/glass",
        "obsidian": "blocks/obsidian",
        "beacon": "blocks/beacon"
    },
    "elements": [
        {   "__comment": "Glass shell",
            "from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {
                "down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" },
                "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#glass" }
            }
        },
        {   "__comment": "Obsidian base",
            "from": [ 2, 0.1, 2 ],
            "to": [ 14, 3, 14 ],
            "faces": {
                "down":  { "uv": [ 2,  2, 14, 14 ], "texture": "#obsidian" },
                "up":    { "uv": [ 2,  2, 14, 14 ], "texture": "#obsidian" },
                "north": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
                "south": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
                "west":  { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
                "east":  { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" }
            }
        },
        {   "__comment": "Inner beacon texture",
            "from": [ 3, 3, 3 ],
            "to": [ 13, 14, 13 ],
            "faces": {
                "down":  { "uv": [ 3, 3, 13, 13 ], "texture": "#beacon" },
                "up":    { "uv": [ 3, 3, 13, 13 ], "texture": "#beacon" },
                "north": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
                "south": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
                "west":  { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
                "east":  { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" }
            }
        }
    ]
}

 

 

 

It's specified above all the other textures used for the block's appearance, "particle": "modid:blocks/texture_name",.

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

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.