Posted June 4, 20178 yr I've been doing some research into how to get items to have colors and to be dyeable - like leather armor (though I'm not making armor, just an item). I've discovered ItemColors, but my attempts to register a handler don't appear to be working, so I've got some questions: When should I register the color? preinit? init? Is there a registry event for it? How do I format the texture to get the color to apply, and are there any properties I need to add to the item class? I know that it will only affect layer0, but is there anything else I need to know? Thanks for any help provided! Registering like so at the moment (mod is in pre-testing phase; will be moved to proxy eventually, don't worry): @Mod.EventHandler @SideOnly(Side.CLIENT) public void onPreInit(FMLPreInitializationEvent ev) { Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> { return Color.BLUE.getRGB(); }, BagItems.arcaneBag, BagItems.infiniteBag); } Edited June 4, 20178 yr by Socratic_Phoenix Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes). I know Java pretty well... So yeah... Quote This is where I'd put an inspirational and/or clever quote, but I can't think of one right now... This is the output of the totally, 100% working compiler for my programming language, Planet9: Beginning Compilation... Failed compilation! planet9.compiler.error.CompilationException: Compiler not yet implemented at planet9.compiler.Compiler.compile(Compiler.java:39) at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)
June 4, 20178 yr Author Ignore everything I just said... I included the listener in the item file, not the mod file (they have very similar names...)... [solved] Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes). I know Java pretty well... So yeah... Quote This is where I'd put an inspirational and/or clever quote, but I can't think of one right now... This is the output of the totally, 100% working compiler for my programming language, Planet9: Beginning Compilation... Failed compilation! planet9.compiler.error.CompilationException: Compiler not yet implemented at planet9.compiler.Compiler.compile(Compiler.java:39) at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)
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.