Jump to content

Recommended Posts

Posted

I thought I posted this last night, but it was late and I was tired, so it may be in the wrong forum, or maybe I just didn't click the post button. If there is a duplicate, my apologies.

 

In my main class I have this, as per the example code:

    public static final DeferredRegister<Block> BLOCKS          = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
    public static final DeferredRegister<Item>  ITEMS              = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
    public static final RegistryObject<Block>   BONE_ALTAR   = BLOCKS.register("bone_altar", () -> new Block(BlockBehaviour.Properties.copy(Material.STONE).requiresCorrectToolForDrops()));
    public static final RegistryObject<Item>    BONE_ALTAR_ITEM = ITEMS.register("bone_altar", () -> new BlockItem(BONE_ALTAR.get(), new Item.Properties()));

 

I figured out how to add it to a creative mode tab, and placed one, and the texture is just a magenta and black check.

The texture I want to use is at src/main/resources/assets/stats_and_skills/textures/blocks/bone_altar.png.

The model file is at src/main/resources/assets/stats_and_skills/models/blocks/bone_altar.json and looks like:

    {
        "parent": "block/cube",
        "textures": {
            "particle": "block/bone_altar",
            "all": "block/bone_altar"
        },
        "elements": [
            {
               "from": [ 0, 0, 0 ],
                "to": [ 16, 16, 16 ],
                "faces": {
                    "down":  { "texture": "#all", "cullface": "down" },
                    "up":    { "texture": "#all", "cullface": "up" },
                    "north": { "texture": "#all", "cullface": "north" },
                    "south": { "texture": "#all", "cullface": "south" },
                    "west":  { "texture": "#all", "cullface": "west" },
                    "east":  { "texture": "#all", "cullface": "east" }
                }
            }
        ]
    }

I am guessing that a file is in the wrong location, or the model file is using the wrong path to the texture. Or something. I have no idea, and the documentation really needs a bit more in the way of examples.

 

 

 

Posted

I have added a few more files and modified the JSON one I had. I now have:

assets/stats_and_skills/blockstates/bone_altar.json:

{
    "variants": {
        "": { "model": "stats_and_skills:block/bone_altar" }
    }
}

assets/stats_and_skills/models/item/bone_altar.json:

{
  "parent": "item/generated",
  "textures": {
    "layer0": "stats_and_skills:block/bone_altar"
  }
}

assets/stats_and_skills/models/block/bone_altar.json:

{
    "parent": "block/cube",
    "textures": {
        "": "stats_and_skills:block/bone_altar",
        "inventory": "stats_and_skills:block/bone_altar",
        "all": "stats_and_skills:block/bone_altar"
    },
    "elements": [
        {
           "from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {
                "down":  { "texture": "#all", "cullface": "down" },
                "up":    { "texture": "#all", "cullface": "up" },
                "north": { "texture": "#all", "cullface": "north" },
                "south": { "texture": "#all", "cullface": "south" },
                "west":  { "texture": "#all", "cullface": "west" },
                "east":  { "texture": "#all", "cullface": "east" }
            }
        }
    ]
}

 

I also renamed the directory from "blocks" to "block" for the textures. The documentation that is available is very inconsistent here. It all seems to work now.

 

Posted
  On 2/23/2023 at 12:16 PM, Jontom Xire said:

The documentation that is available is very inconsistent here. It all seems to work now.

Expand  

Again...if you want to complain about the documentation, please provide an issue. I can't know there are issues unless somebody mentions them. Additionally, as this is vanilla related stuff, all of this is documented on the Minecraft wiki which is linked on the Forge docs.

Posted

I'm not talking about the forge documentation, which has a link to a fairly thorough page on the Minecraft wiki about the model JSON files, but that page in turn is inconsistent in the examples. Specifically, sometimes it uses "block" and sometimes it uses "blocks".

Posted

You are right, it was the community wiki:

 

https://forge.gemwire.uk/wiki/Model_JSONs

    examplemod:blocks/test → assets/examplemod/textures/blocks/test.png

    ...

    minecraft:block/cube_all, not minecraft:block/cube_all.json

 

And this is a doozy at https://forge.gemwire.uk/wiki/Item_Properties:

 

{
  "parent": "item/generated",
  "textures": {
    "__comment": "Default",
    "layer0": "examplemod:items/example_partial"
  },
  "overrides": [
    {
      "__comment": "power >= .75",
      "predicate": {
        "examplemod:power": 0.75
      },
      "model": "examplemod:item/example_powered"
    }
  ]
}

The "layer0" definition uses "items" and the "model" in the overrides uses "item".

 

I think there were more using the plural, but it was a while ago and I don't have time to search them all out right now.

 

Posted
  On 2/24/2023 at 2:50 PM, Jontom Xire said:

You are right, it was the community wiki:

Expand  

Like I said, we have issue trackers for all that stuff which need to be reported to rather than saying it's wrong and either not informing us or fixing it (since the wiki can be contributed to by anyone); however, I don't believe the wiki was ever updated to 1.19.3, so that still would've been fine in 1.19.2 where that convention was still used often.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • New users at Temu receive a $100 discount on orders over $100 Use the code [aci789589] during checkout to get Temu Coupon Code $100 off For New Users. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. Temu 100% Off coupon code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. You can get a$100 bonus plus 30% off any purchase at Temu with the$100 Coupon Bundle at Temu if you sign up with the referral code [aci789589] and make a first purchase of$50 or more. The Temu $100 Off coupon code (aci789589) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes Temu offers $100 Off Coupon Code “aci789589” for First Time Users. Yes, Temu offers $100 off coupon code {aci789589} for first-time users. You can get a $100 bonus plus 100% off any purchase at Temu with the $100 Coupon Bundle if you sign up with the referral code [aci789589] and make a first purchase of $100 or more. If you are who wish to join Temu, then you should use this exclusive Temu coupon code $100 off (aci789589) and get $100 off on your purchase with Temu. You can get a $100 discount with Temu coupon code {aci789589}. This exclusive offer is for existing customers and can be used for a $100 reduction on your total purchase. Enter coupon code {aci789589} at checkout to avail of the discount. You can use the code {aci789589} to get a $100 off Temu coupon as a new customer. Apply this Temu coupon code $100 off (aci789589) to get a $100 discount on your shopping with Temu. If you’re a first-time user and looking for a Temu coupon code $100 first time user(aci789589) then using this code will give you a flat $100 Off and a 90% discount on your Temu shopping. Temu $100% Off Coupon Code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Temu coupon code$100off-{aci789589} Temu coupon code -{aci789589} Temu coupon code$50 off-{aci789589} Temu Coupon code [aci789589] for existing users can get up to 50% discount on product during checkout. Temu Coupon Codes for Existing Customers-aci789589 Temu values its loyal customers and offers various promo codes, including the Legit Temu Coupon Code (aci789589]) or (aci789589), which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.
    • Try other builds: https://www.curseforge.com/minecraft/mc-mods/geckolib/files/all?page=1&pageSize=20&version=1.16.5&gameVersionTypeId=1 Currently, you are using build 96 - the latest one that I linked is build 106 So try 97 to 105  
    • New users at Temu receive a $100 discount on orders over $100 Use the code [aci789589] during checkout to get Temu Coupon Code $100 off For New Users. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. Temu 100% Off coupon code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. You can get a$100 bonus plus 30% off any purchase at Temu with the$100 Coupon Bundle at Temu if you sign up with the referral code [aci789589] and make a first purchase of$50 or more. The Temu $100 Off coupon code (aci789589) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes Temu offers $100 Off Coupon Code “aci789589” for First Time Users. Yes, Temu offers $100 off coupon code {aci789589} for first-time users. You can get a $100 bonus plus 100% off any purchase at Temu with the $100 Coupon Bundle if you sign up with the referral code [aci789589] and make a first purchase of $100 or more. If you are who wish to join Temu, then you should use this exclusive Temu coupon code $100 off (aci789589) and get $100 off on your purchase with Temu. You can get a $100 discount with Temu coupon code {aci789589}. This exclusive offer is for existing customers and can be used for a $100 reduction on your total purchase. Enter coupon code {aci789589} at checkout to avail of the discount. You can use the code {aci789589} to get a $100 off Temu coupon as a new customer. Apply this Temu coupon code $100 off (aci789589) to get a $100 discount on your shopping with Temu. If you’re a first-time user and looking for a Temu coupon code $100 first time user(aci789589) then using this code will give you a flat $100 Off and a 90% discount on your Temu shopping. Temu $100% Off Coupon Code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Temu coupon code$100off-{aci789589} Temu coupon code -{aci789589} Temu coupon code$50 off-{aci789589} Temu Coupon code [aci789589] for existing users can get up to 50% discount on product during checkout. Temu Coupon Codes for Existing Customers-aci789589 Temu values its loyal customers and offers various promo codes, including the Legit Temu Coupon Code (aci789589]) or (aci789589), which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.
    • New users at Temu receive a $100 discount on orders over $100 Use the code [aci789589] during checkout to get Temu Coupon Code $100 off For New Users. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. Temu 100% Off coupon code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers $100 off coupon code “aci789589” for first-time users. You can get a$100 bonus plus 30% off any purchase at Temu with the$100 Coupon Bundle at Temu if you sign up with the referral code [aci789589] and make a first purchase of$50 or more. The Temu $100 Off coupon code (aci789589) will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Yes Temu offers $100 Off Coupon Code “aci789589” for First Time Users. Yes, Temu offers $100 off coupon code {aci789589} for first-time users. You can get a $100 bonus plus 100% off any purchase at Temu with the $100 Coupon Bundle if you sign up with the referral code [aci789589] and make a first purchase of $100 or more. If you are who wish to join Temu, then you should use this exclusive Temu coupon code $100 off (aci789589) and get $100 off on your purchase with Temu. You can get a $100 discount with Temu coupon code {aci789589}. This exclusive offer is for existing customers and can be used for a $100 reduction on your total purchase. Enter coupon code {aci789589} at checkout to avail of the discount. You can use the code {aci789589} to get a $100 off Temu coupon as a new customer. Apply this Temu coupon code $100 off (aci789589) to get a $100 discount on your shopping with Temu. If you’re a first-time user and looking for a Temu coupon code $100 first time user(aci789589) then using this code will give you a flat $100 Off and a 90% discount on your Temu shopping. Temu $100% Off Coupon Code "aci789589" will save you $100 on your order. To get a discount, click on the item to purchase and enter the code. Temu coupon code$100off-{aci789589} Temu coupon code -{aci789589} Temu coupon code$50 off-{aci789589} Temu Coupon code [aci789589] for existing users can get up to 50% discount on product during checkout. Temu Coupon Codes for Existing Customers-aci789589 Temu values its loyal customers and offers various promo codes, including the Legit Temu Coupon Code (aci789589]) or (aci789589), which existing users can use. This ensures that repeat shoppers can also benefit from significant discounts on their purchases. Keep an eye out for special promotions and offers that are periodically available to enhance your shopping experience.
    • Both Ars Nouveau and Chaos Awakens require a range of geckolib versions, and the build you sent is outside the range. Ars Nouveau has an update, but Chaos Awakens doesn't, which means I can't use the build you sent. Is there any other way to fix the crash?
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.