Skip to content

Commit

Permalink
remove render type from MultiblockRenderHelper and change color regis…
Browse files Browse the repository at this point in the history
…tration to event
  • Loading branch information
bdew committed Jul 14, 2022
1 parent 7acbde9 commit 0bba224
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/scala/net/bdew/generators/ClientHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import net.bdew.lib.multiblock.render.MultiblockRenderHelper
import net.minecraft.client.renderer.{ItemBlockRenderTypes, RenderType}
import net.minecraftforge.api.distmarker.Dist
import net.minecraftforge.client.event.ModelEvent.RegisterGeometryLoaders
import net.minecraftforge.client.event.RegisterColorHandlersEvent
import net.minecraftforge.eventbus.api.SubscribeEvent
import net.minecraftforge.fml.common.Mod
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus
Expand All @@ -17,11 +18,15 @@ object ClientHandler {
ev.register("multiblock_model", CustomModels.multiblockModelLoader)
}

@SubscribeEvent
def registerBlockColors(ev: RegisterColorHandlersEvent.Block): Unit = {
MultiblockRenderHelper.setupColors(ev, Blocks.all.map(_.get()), GeneratorsResourceProvider)
}

@SubscribeEvent
def clientSetup(ev: FMLClientSetupEvent): Unit = {
ev.enqueueWork(new Runnable {
override def run(): Unit = {
MultiblockRenderHelper.setup(Blocks.all.map(_.get()), GeneratorsResourceProvider)
ItemBlockRenderTypes.setRenderLayer(Fluids.syngas.source.get(), RenderType.translucent())
ItemBlockRenderTypes.setRenderLayer(Fluids.syngas.flowing.get(), RenderType.translucent())
}
Expand Down

0 comments on commit 0bba224

Please sign in to comment.