• Recently Browsing

    No registered users viewing this page.

  • Posts

    • 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
    • OS: Ubuntu 18.04 LTS Server Platform: AMP (https://cubecoders.com/AMP) Memory Dedicated to Server: 10GB Modpack: https://www.curseforge.com/minecraft/modpacks/valhelsia-2 Issue: When performing the /stop command the server will hang until a manual kill command is issued. Debug.log:  https://gist.github.com/SkilledAlpaca/9d927e1d35881714b438700c96ebacf5 Troubleshooting: There are probably a couple things I've missed and I will add/edit them as I remember them as this has been ongoing for quite some time. Attempted to host another platform (MineOS) Created a brand new modpack instance, this works fine Imported my world and JSON files into the new and working instance, issue comes back I think there may be an issue with the world files Installed Valhelsia 3 modpack in AMP, no issues restarting Checked for corrupted chunks using (https://github.com/Fenixin/Minecraft-Region-Fixer/) Logs and Troubleshooting: https://github.com/Fenixin/Minecraft-Region-Fixer/issues/138#issuecomment-716060510 Restarted AMP and the Server Disabled FTB Backups on stop   So at the moment I'm at a loss and the debug.log file hasn't been super helpful to me. I don't think this is a Forge issue persay but maybe I can get some experienced eyes on it and we can figure this out?
    • Where would I find the vanilla files for a hopper or chest? I can't figure out what any of the stuff in the minecraft folder means  
    • Does anyone have any example code or could explain to me with code how to do ore generation in 1.16.3?
    • It's looking like you didn't buy the game. You know Minecraft is not a free game, right?
  • Topics

  • Who's Online (See full list)