Posted July 2, 20196 yr 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 .. with the vanilla Stone texture and then this applied on top of it: Spoiler 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" } } } ] }
July 2, 20196 yr 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.
July 2, 20196 yr Author 47 minutes ago, Draco18s said: Ok...so what's the problem? The problem is that I have no idea how to do that.
July 2, 20196 yr 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.
July 3, 20196 yr 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:
July 3, 20196 yr 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) Edited July 3, 20196 yr by Simon_kungen
July 3, 20196 yr 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.
July 3, 20196 yr 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?
July 3, 20196 yr 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.