Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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" }
            }
        }
    ]
}

 

 

 

 

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.

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.

  • Author
8 hours ago, Draco18s said:

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

I want to colour the second texture (the metal pieces) to my desired colour and not the base Stone texture:

copper.png.04e1195f7cfa27209affef7cf881b81b.png

  • Author

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

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.

  • Author
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?

  • Author
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" }

 

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.