• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Are they never called or do you just not see the result because you never set the tint index on your models?
    • Fluid::getBlockState and then schedule a Fluid tick directly afterward. This will force to fluid to update and flow.
    • so i downloaded forge before and had 50 or so mods and my pc became very slow and it was to the point where i couldnt open minecraft anymore so i reset my whole computer. and i just dowloaded minecraft and wanted to get all my mods back so i went to download forge, (1.15.2 newest version) and i downloaded it and tried to open the installer and it said something like "there is no app to open this file" and i dont understand whats happening becuase you dont need an app to open a .jar file and i did download forge from curseforge no other places and ive tried a bunch of times and this keeps happening. can someone please help me resolve this.
    • public class BlockColorHandler { @OnlyIn(Dist.CLIENT) @SubscribeEvent public void registerBlockColourHandlers(final ColorHandlerEvent.Block event) { // Use the colour of the biome or the default colour final IBlockColor grassColourHandler = (state, blockAccess, pos, tintIndex) -> { if (blockAccess != null && pos != null) { return BiomeColors.getFoliageColor(blockAccess, pos); } return GrassColors.get(0.5D, 1.0D); }; event.getBlockColors().register(grassColourHandler, ModBlocks.BAOBAB_LEAVES, ModBlocks.MANGROVE_LEAVES, ModBlocks.PALM_LEAVES); } @OnlyIn(Dist.CLIENT) @SubscribeEvent public void registerItemColourHandlers(final ColorHandlerEvent.Item event) { // Use the Block's colour handler for an ItemBlock final IItemColor itemBlockColourHandler = (stack, tintIndex) -> { BlockState iblockstate = ((BlockItem) stack.getItem()).getBlock().getDefaultState(); return event.getBlockColors().getColor(iblockstate, null, null, tintIndex); }; event.getItemColors().register(itemBlockColourHandler, ModBlocks.BAOBAB_LEAVES, ModBlocks.MANGROVE_LEAVES, ModBlocks.PALM_LEAVES); } } MinecraftForge.EVENT_BUS.register(new BlockColorHandler()); So here are my events, but they never get called.   Initially i used: Minecraft.GetInstance().getBlockColors().register(); like in the Coloring Textures section in the Forge Documentation, but that results in a nullPointerException error
    • The javadoc says: "Implement" and "Override" are specific keywords that have specific meanings in programming and if the intent was that mods should not listen for the event, then it would (or should) say "don't" use or "don't listen for" or be marked as deprecated.   A search of both the git repo and the forums return no results of anyone of any authority saying anything about the event.   I'm more than happy to be wrong, but my reading says nothing about not using the event.
  • Topics

  • Who's Online (See full list)