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.

Arsleust

Members
  • Joined

  • Last visited

  1. Works like a charm ! Thanks ! (for noobs like me this is a good link : http://www.minecraftforge.net/forum/index.php?topic=20138.0 )
  2. Thank you for the quick answer, I will try to do like that EDIT : About server/client behaviors and my game not crashing, render methods are called only client side and i used @SideOnly(Side.CLIENT) for the listener part. So I still don't get why there are different worlds.
  3. Hello, I want to modify the player view point to the one of a custom entity. So i just do : public class SoulstickEventListener { @SideOnly(Side.CLIENT) @SubscribeEvent public void entityInteract(EntityInteract event) { if(event.getTarget() != null) { if(event.getTarget() instanceof EntityPhantom) { if(event.getItemStack() != null && event.getItemStack().getItem() == ModItems.soulstick) { Minecraft.getMinecraft().setRenderViewEntity(event.getTarget()); } } } } } The viewpoint is correctly change but I can only see the entity face so I want to prevent the render if the pov is from the entity that tries to be rendered. I have a Render class like that : public class RendererPhantom extends RenderBiped<EntityPhantom> { public static final ResourceLocation PHANTOM_TEXTURES = new ResourceLocation(References.MOD_ID + ":textures/entities/phantom.png"); public RendererPhantom(RenderManager renderManager) { super(renderManager, new ModelPlayer(0.0F, false), 0.5F); } @Override protected ResourceLocation getEntityTexture(EntityPhantom entity) { return PHANTOM_TEXTURES; } @Override public void doRender(EntityPhantom entity, double x, double y, double z, float entityYaw, float partialTicks) { if(!(getRenderManager().renderViewEntity.isEntityEqual(entity))) { // DEBUG System.out.println(getRenderManager().renderViewEntity); System.out.println(entity); super.doRender(entity, x, y, z, entityYaw, partialTicks); } } } Now this is where it gets tricky, this does not prevent the render because i get in the log : So the first call getRenderManager().renderViewEntity gives the entity but says it is in world "New World" (which is right) but the entity given to my doRender is said to be in world "MpServer" (which is weird). Anyone would know the cause ?

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.