• Recently Browsing

    No registered users viewing this page.

  • Posts

    • GASP. WHO'D HAVE GUESSED. Yes, yes it does. That's literally why they are there. Json resources aren't magic. Conditions are automatically deserialized. Not the rest of it. Conditions are JUST this part:   ...yes You have custom data. So read your custom data.
    • same error message... and the xray is for a server me and my brothers have, just to mess with their secret bases. 
    • Im looking for something simple, like you just put stuff in crafting table and that's it. But thank you for suggestion.
    • Yes. JK Please Don't Hurt me   The Hypixel command was just an example. My actual use case is much more complicated. It would be infeasible to connect by hand.   Like there are so many functions pertaining to just the client size. There has to be something for connecting to a server. Also, if anyone knows how to do it in NM, I'm all ears.    
    • Hi,   I'm trying to dynamically color blocks (Metal Blocks). It works fine for items (ingots, dust, etc) but it sadly doesn't work for blocks. I'm having these events: @SubscribeEvent public static void colorItems(final ColorHandlerEvent.Item e) { ItemColors colors = e.getItemColors(); ModuleCore.materials.forEach((materialName, materialDefinition) -> { materialDefinition.parts.forEach((part, item) -> { if(item instanceof BaseItem) { Item i = (Item) item; // This works as it's supposed to be. colors.register((stack, tintIndex) -> materialDefinition.color.getRGB(), i); } else if(item instanceof MaterialBlock) { Item i = ((MaterialBlock) item).item; // These two were tests to see if I had to color the Blocks items instead of the block. But it didn't do anything. colors.register((stack, tintIndex) -> materialDefinition.color.getRGB(), Item.getItemFromBlock((MaterialBlock) item)); colors.register((stack, tintIndex) -> materialDefinition.color.getRGB(), i); } }); }); } @SubscribeEvent public static void colorBlocks(final ColorHandlerEvent.Block e) { BlockColors colors = e.getBlockColors(); ModuleCore.materials.forEach((materialName, materialDefinition) -> { if(materialDefinition.parts.containsKey(Part.BLOCK)) { // The code is executed but the block isn't colored. colors.register((state, worldIn, pos, tintIndex) -> materialDefinition.color.getRGB(), (Block) materialDefinition.parts.get(Part.BLOCK)); } }); } When I add a Logger.info in the if-condition I can see that the method is called and executed for every material I have defined to have a Block. The coloring of the BaseItems works fine, but all tries to color the Block doesn't seem to work.   I looked at the Documentation (which seems to be outdated), I found this forum thread I tried several other approaches, but all tries didn't seem to work. I tried to use an alpha of 0 instead of 255, but it didn't had any influence too.   I can see in the Debugger that the colors are being a added (See attached screenshot of the Debugging Information)   Does anyone know what am I doing wrong and what do I have to change?     You can see the complete Code here (https://github.com/IcedReaper/IcedResources/blob/main/src/main/java/com/icedreaper/icedresources/handlers/ColorEventHandler.java) (I currently have the code to color the blocks commented out and instead implemented a way to create new colored images for the blocks, but this shouldn't be the way I'd imagine ;))   Thanks in Advance, IcedReaper
  • Topics

  • Who's Online (See full list)