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'm trying to make a new entity in my mod however i can't find the class GlobalEntityTypeAttributes in 1.17.1. I think it got renamed but after hours of research i can't find it at all here is what i'm trying to do in my mod main class :

private void setup(final FMLCommonSetupEvent event) {
        DeferredWorkQueue.runLater(() -> {
            GlobalEntityTypeAttributes.put(ModEntityType.ENTITY.get(), Entity.setCustomAttributes().create());
        });
    }

Can someone help me ?

  • Author

I did that

@SubscribeEvent
	public static final void entityClientRederer(EntityRenderersEvent.RegisterRenderers event) {
		event.registerEntityRenderer(EntityInit.SLEEPING_PLAYER.get(), SleepingPlayerRenderer::new);
	}

But it says that :

The type SleepingPlayerRenderer does not define SleepingPlayerRenderer(EntityRendererProvider.Context) that is applicable here

can you help me ? Thank you btw diesieben07 

  • Author

I know that the problem is here but i don't know what to change ... 

public class SleepingPlayerRenderer extends MobRenderer<SleepingPlayerEntity, SleepingPlayerModel<SleepingPlayerEntity>> {

	
	protected static final ResourceLocation Texture = new ResourceLocation(DreamyMain.MOD_ID, "textures/entity/sleeping_player.png");
	public SleepingPlayerRenderer(Context p_174304_, SleepingPlayerModel<SleepingPlayerEntity> p_174305_) {
		super(p_174304_, p_174305_, 0.7f);
	}
	
	@Override
	public ResourceLocation getTextureLocation(SleepingPlayerEntity p_114482_) {
		// TODO Auto-generated method stub
		return Texture;
	}

}

 

  • Author

The tutorial i'm following has EntityRendererManager instead of context ( net.minecraft.client.renderer.entity.EntityRendererProvider.Context) but it doesn't exists anymore

  • Author

The second parameter aka the problem is an entityRendererProvider The renderer provider, can be a lambda like MyRenderer::new.

What i sent to him was a lambda. So i really don't know whats the problem.

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.