Jump to content

[1.13.2] Block Model texture colour


Simon_kungen

Recommended Posts

Hi

 

I got help with making an ore that can have different density. But as it is right now they all look the same..

Spoiler

2019-07-02_21_24_35.png.193b743e7d7f3cf7c5a772377d1ba1a9.png

 

 

.. with the vanilla Stone texture and then this applied on top of it:

Spoiler

ore_3_red.png.d5f05f51ccdb8c109d7ca29211eb269b.png

 

 

ore_3.json

Spoiler

{
    "textures": {
        "base": "minecraft:block/stone",
        "ore": "intercraftcore:block/ore_faces/ore_3",
        "particle": "minecraft:block/stone"
    },
    "elements": [
        {   "from": [0,0,0],
            "to": [16,16,16],
            "faces": {
                "down": { "texture": "#base" },
                "up": { "texture": "#base" },
                "north": { "texture": "#base" },
                "south": { "texture": "#base" },
                "west": { "texture": "#base" },
                "east": { "texture": "#base" }
            }
        },
        {   "from": [0,0,0],
            "to": [16,16,16],
            "faces": {
                "down": { "texture": "#ore" },
                "up": { "texture": "#ore" },
                "north": { "texture": "#ore" },
                "south": { "texture": "#ore" },
                "west": { "texture": "#ore" },
                "east": { "texture": "#ore" }
            }
        }
    ]
}

 

 

 

 

Link to comment
Share on other sites

Ok...so what's the problem?

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.

Link to comment
Share on other sites

Do what, exactly?

 

You've said that you have X working and that you don't know how to do Y, but haven't said what Y is

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.

Link to comment
Share on other sites

Here is a bit of my code I would suggest would do it but running this changes the particle's colour and not the actual block:

Spoiler

    public static void ColorBlockHandlerEvent(ColorHandlerEvent.Block blockColorEvent) {
        blockColorEvent.getBlockColors().register((a,b,c,d) -> {
            return ((BlockHardOre)a.getBlock()).getTint();
        }, IntercraftBlocks.COPPERORE);
    }

 

 

 

(Note, in my example the colour is orange, but the actual colour should be green)

copper_colour.gif

Edited by Simon_kungen
Link to comment
Share on other sites

I believe you're looking for the IBlockColor interface.

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.

Link to comment
Share on other sites

1 hour ago, Draco18s said:

I believe you're looking for the IBlockColor interface.

How would I use it?

Spoiler

public class BlockHardOre extends Block implements IBlockColor {

    private Item drop;
    private int tint;
  
  
    public int getColor(IBlockState p_getColor_1, IWorldReaderBase p_getColor_2, BlockPos p_getColor_3_, int p_getColor_4_) {
        return this.tint;
    }
}

 

 

 

This doesn't do anything. Do I have to register it somewhere?

Link to comment
Share on other sites

18 minutes ago, Simon_kungen said:

How would I use it?

  Reveal hidden contents


public class BlockHardOre extends Block implements IBlockColor {

    private Item drop;
    private int tint;
  
  
    public int getColor(IBlockState p_getColor_1, IWorldReaderBase p_getColor_2, BlockPos p_getColor_3_, int p_getColor_4_) {
        return this.tint;
    }
}

 

 

 

This doesn't do anything. Do I have to register it somewhere?

Nevermind, I figured it out. Had to add the tintindex to my model file:

"down": { "tintindex": 1, "texture": "#ore" },
"up": { "tintindex": 1, "texture": "#ore" },
"north": { "tintindex": 1, "texture": "#ore" },
"south": { "tintindex": 1, "texture": "#ore" },
"west": { "tintindex": 1, "texture": "#ore" },
"east": { "tintindex": 1, "texture": "#ore" }

 

Link to comment
Share on other sites

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

    • Hi, I have a 1.19.2 mod pack, but every time i install the apotheosis mod the game doesn't start, can someone help me to find the mod that conflicts with apotheosis? here there is the mod list and the logs: https://pastebin.com/K3xJ1NPr
    • If you are using AMD/ATI, get the latest drivers from their website
    • Add the mod lmft: https://www.curseforge.com/minecraft/mc-mods/lmft   If there is no change, you have to remove the mods in groups/one by one until you find the one causing this issue
    • +256754810143 NATIVE BLACK MAGIC SPELLS CASTER IN SOUTH AMERICA-SOUTH AFRICA-CANADA-AUSTRALIA-ASIA-NEW ZEALAND.@@@$+256754810143@powerful-black-magic-instant-revenge-spell-caster-in-uganda-netherlands-spain-scotland-south-africa-instant-revenge-spell-caster-revenge-spell-in-italy-norway-austria-vienna% POWERFUL DEATH SPELL CASTER INSTANT DEATH SPELLS IN, USA UK U.A.E.**^^SPELL CASTER, DEATH SPELL, SPELL CASTER REVIEW, WITCHCRAFT, PSYCHIC, MAGIC FORUM, BLACK MAGIC IN AMSTERDAM, GERMANY, SPAIN Results are 100% s=ure and guaranteed, spell casting specialist, , black magic death spells that work overnight or by accident. I Cast these strongest black magic revenge death spells that work fast overnight to kill ex-lover, husband, wife girlfriend Enemies  she is in a far location, I guarantee you to have your results you are looking for immediately. Just make sure before you contact me you are committed and you want what you are looking for (Victim Death) because my death spell work fast overnight after casting the spells that work, guaranteed black magic love spells, guaranteed voodoo spells, spell to make someone sick and die, revenge spells that work instantly, real witches for hire, revenge spells on an ex- lover, how to put a Black magic death spells on ex-lover, Revenge instant death spells on toxic uncles powerful instant death spells online instant spell that work fast in USA, UK, Kuwait, Germany, Asian, Europe, Philippines, Canada, South Africa, Italy, Peru, India, Iran, Gambia. Sweden, Australia, Nigeria, Spain, Ghana, California, Greece. Death spell on someone, death spells that Death Revenge Spell on wicked friends, Voodoo Death Spells to kill Enemies Black Magic Spells To Harm Someone, Black magic death spells on ex-lover, Revenge instant death spells on toxic uncles powerful instant death spells online instant spell that work fast in USA, UK, Kuwait, Germany, Asian, Europe, Philippines, Canada, revenge spells, most powerful death spell, spell to die in your sleep, successful death spell, most powerful voodoo spell caster, voodoo spell casters in new Orleans, voodoo love spells reviews, proven authentic voodoo spell casters, most powerful voodoo priest in world, black magic tricks to destroy enemy. Results are 100% sure and guaranteed whatapp or cal, Europe, Philippines, Canada, South Africa, Italy, Peru, India, Iran, Gambia. spells, guaranteed voodoo spells, spell to make someone sick and die, revenge spells that work instantly, real witches for hire, revenge spells on an ex- lover, how to put a spell on someone who hurts you, spell to make someone sick, voodoo spells to hurt someone, spells to curse someone, powerful revenge spells, most powerful death spell, spell to die in your sleep, successful death spell, most powerful voodoo spell caster, voodoo spell casters in new Orleans, voodoo love spells reviews, proven authentic voodoo spell casters, most powerful voodoo priest in world, black magic tricks to destroy enemy. Results are 100% sure and guaranteed whatapp or call  ஜ۩۞۩ஜ ??@@$+256754810143
  • Topics

×
×
  • Create New...

Important Information

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