package pokefenn.totemic.handler;

import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block;
import net.minecraftforge.client.event.RegisterColorHandlersEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import pokefenn.totemic.block.totem.TotemPoleBlock;
import pokefenn.totemic.init.ModBlocks;

public class ModBlockColors {
    @SubscribeEvent
    public static void registerBlockColors(RegisterColorHandlersEvent.Block event) {
        event.register((state, tintGetter, pos, tintIndex) -> TotemPoleBlock.getBlockColor(tintIndex),
                ModBlocks.getTotemPoles().values().toArray(Block[]::new));
    }

    @SubscribeEvent
    public static void registerItemColors(RegisterColorHandlersEvent.Item event) {
        event.register((stack, tintIndex) -> TotemPoleBlock.getBlockColor(tintIndex),
                ModBlocks.getTotemPoles().values().toArray(ItemLike[]::new));
    }
}

@@ -235,24 +235,77 @@
 cribeEvent;%0A
+import net.minecraftforge.registries.RegistryObject;%0A
 import pokef
@@ -340,24 +340,24 @@
 mPoleBlock;%0A
-
 import pokef
@@ -665,32 +665,116 @@
 Poles().values()
+.stream()%0A                        .map(RegistryObject::get)%0A                        
 .toArray(Block%5B%5D
@@ -970,32 +970,32 @@
 lor(tintIndex),%0A
-
                 
@@ -1028,16 +1028,100 @@
 values()
+.stream()%0A                        .map(RegistryObject::get)%0A                        
 .toArray

Fix another ArrayStoreException