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.

De Joker

Members
  • Joined

  • Last visited

  1. Solution for future viewers In the render class on doRender add this: GlStateManager.rotate(entity.rotationPitch, 1, 0, 0);
  2. This might be an obvious question but I just started to understand how models work. How do I rotate a model during onUpdate on both Yaw and Pitch angles? Basically the player is on the Entity and I want the entity to look where the passenger is looking at. The current code works for Yaw angle only. I can see the pitch changes on the entity (Blue line on debug) but the model it self does not rotate. @Override public void onUpdate() { super.onUpdate(); if (this.canPassengerSteer() && getControllingPassenger() != null) { Entity entity = this.getControllingPassenger(); setRotation(entity.rotationYaw, entity.rotationPitch); } }
  3. De Joker changed their profile photo
  4. Where are you setting those StatConstants.LONG_BLADE? maybe you are calling the drawString before the actual setting.
  5. Nevermind im an idiot .
  6. I can see my model when it extends EntityLiving. And when it extends Entity I do not see the model rendering at all
  7. Thanks! That did work. Another thing I might ask is why when i extend EntityLiving the model register correctly and when i extend Entityit does not?
  8. Hey, so i created an Entity that extends Entity. I registered it correctly and I see the spawn egg and i can spawn it without any errors. The problem is when i render it, It does not render correctly. I always see the model next to the player and not where the entity is. (The render is registered correctly as well) I think i need to use some GL code but i really didnt see any explantion of this. Here is my render class: (I used boat textures just for testing purposes) package me.dejoker.broomstick.render; import me.dejoker.broomstick.entities.EntityBroomstick; import me.dejoker.broomstick.models.ModelBroomstick; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderBroomstick extends Render<EntityBroomstick> { private static final ResourceLocation BOAT_TEXTURES = new ResourceLocation("textures/entity/boat/boat_oak.png"); ModelBase modelBroom = new ModelBroomstick(); protected RenderBroomstick(RenderManager renderManager) { super(renderManager); } @Override public void doRender(EntityBroomstick entity, double x, double y, double z, float entityYaw, float partialTicks) { modelBroom.render(entity, 0f, 0f, -0.1f, 0f, 0f, 0.0625f); super.doRender(entity, x, y, z, entityYaw, partialTicks); } @Override protected ResourceLocation getEntityTexture(EntityBroomstick entity) { return BOAT_TEXTURES; } }

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.