Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by FantaLaTone
solved

  • Author

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

  • FantaLaTone changed the title to [SOLVE][1.18.2] Mod Entity Types .get() gives error!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.