Jump to content

[1.16.5] RenderTypeLookup does not seem to be working.


The_Peoples_Bee

Recommended Posts

Despite it being in a FMLClientSetupEvent, RenderTypeLookup does not seem to be modifying any of the blocks' render types.

 

    private void setup(final FMLClientSetupEvent event)
    {
        RenderTypeLookup.setRenderLayer(EarlyDaysRegistries.MOON_CREAM_BLOCK.get(), RenderType.getTranslucent());
    }
    public static final RegistryObject<Block> MOON_CREAM_BLOCK = BLOCKS.register("moon_cream_block",()->new SlimeBlock(AbstractBlock.Properties.create(Material.CLAY, MaterialColor.SAND).slipperiness(0.8F).sound(SoundType.SLIME).notSolid().variableOpacity()));

I have attempted this with other blocks as well with the same result.

Link to comment
Share on other sites

@Mod("earlydays")
@Mod.EventBusSubscriber(modid = EarlyDays.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class EarlyDays
{
    public static final Logger LOGGER = LogManager.getLogger();
    public static final String MODID = "earlydays";
    public EarlyDays() {
        IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
        EarlyDaysRegistries.ITEMS.register(bus);
        EarlyDaysRegistries.BLOCKS.register(bus);
        EarlyDaysRegistries.TILE_ENTITY_TYPES.register(bus);
        MinecraftForge.EVENT_BUS.register(this);
    }
    @SubscribeEvent
    public static void onRegisterItems(final RegistryEvent.Register<Item> event){
        EarlyDaysRegistries.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(block -> {
            event.getRegistry().register(new BlockItem(block, new Item.Properties().group(EarlyDaysItemGroup.EARLY_DAYS)).setRegistryName(block.getRegistryName()));
        });
    }
    @SubscribeEvent
    public void setup(final FMLClientSetupEvent event)
    {
        RenderTypeLookup.setRenderLayer(EarlyDaysRegistries.MOON_CREAM_BLOCK.get(), RenderType.getTranslucent());
    }
}

I should have done that sooner perhaps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.