FantaLaTone Posted September 28, 2022 Share Posted September 28, 2022 (edited) Hi! I have a mod entity class, model, renderer. I got error about types are not match. I am trying to fix it for the last 2 hours. Please help me. MainModFile.java (I get where it says ModEntityTypes.WANDERING_RAIDER.get(). It says "reason: Incompatible parameter types in method reference expression" ) private void clientSetup(final FMLClientSetupEvent event) { ItemBlockRenderTypes.setRenderLayer(ModBlocks.GOLDEN_OAK_LEAVES.get(), RenderType.cutout()); ItemBlockRenderTypes.setRenderLayer(ModBlocks.GOLDEN_OAK_SAPLING.get(), RenderType.cutout()); EntityRenderers.register(ModEntityTypes.WANDERING_RAIDER.get(), EntityWanderingRaider::new); } Entity Class https://pastebin.com/ktaFry3Q Mod Entity Types public static final DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, BetterMinecraftMod.MODID); public static final RegistryObject<EntityType<EntityWanderingRaider>> WANDERING_RAIDER = ENTITY_TYPES.register( "wandering_raider", () -> EntityType.Builder.of(EntityWanderingRaider::new, MobCategory.MONSTER) .sized(0.6f, 1.95f) .clientTrackingRange(10).build(new ResourceLocation(BetterMinecraftMod.MODID, "wandering_raider").toString()) ); public static void register(IEventBus bus) { ENTITY_TYPES.register(bus); } Edited September 28, 2022 by FantaLaTone solved Quote Link to comment Share on other sites More sharing options...
FantaLaTone Posted September 28, 2022 Author Share Posted September 28, 2022 I am a idiot. I noticed the problem finally. EntityRenderers.register(ModEntityTypes.WANDERING_RAIDER, EntityWanderingRaider::new); it should be this instead EntityRenderers.register(ModEntityTypes.WANDERING_RAIDER.get(), RendererWanderingRaider::new); I hate myself Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.