Posted March 21, 20223 yr Hello, I am wanting to check that in the 1.18.* did they change the entity, renderer, model logic. I am asking because in my mod I an making a custom mob and it renders fine but I have assigned a ID to models and an ID to entities and I have noticed using the debug tools in intelij on a model.setupAnim method. the model is always ID 1 but the entity getting passed is entity with ID 1 and then the next resume when the method runs again it is entity with ID 2. and switches between for each resume, This leads me to think that the system now is 1 renderer and model for all entities of the same type e.g. 5 zombies is 5 entities but only 1 model and 1 render. in logic. Renderer Constructor: Spoiler public TestRenderer(EntityRendererProvider.Context context) { super(context, new TestModel(), 1); } Entity Constructor: Spoiler public TestEntity(EntityType<? extends Mob> p_21368_, Level p_21369_) { super(p_21368_, p_21369_); } Model Constructor: Spoiler public TestModel() { this.name = "Test Mob"; } How I am registering the entity: Spoiler public static final RegistryObject<EntityType<TestEntity>> TEST_ENTITY = register("test_entity", EntityType.Builder.<TestEntity>of(TestEntity::new, MobCategory.CREATURE).sized(1,1).clientTrackingRange(4).updateInterval(10)); private static <T extends Entity> RegistryObject<EntityType<T>> register(String key, EntityType.Builder<T> builder) { return ENTITIES.register(key, () -> builder.build(key)); } public static void register(IEventBus eventBus) { ENTITIES.register(eventBus); } How I am registering the renderer: Spoiler event.registerEntityRenderer(TestEntityRegistry.TEST_ENTITY.get(), TestRenderer::new); Edited March 21, 20223 yr by Discult
March 21, 20223 yr Author 1 minute ago, diesieben07 said: I have no idea what ID you are talking about. It was a custom ID I applied to track if the model or entity was the same instance. I have fixed the problem by moving all the logic over to the entity and triggering it from the model.setupAnim method.
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.