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.

JelloMOO

Members
  • Joined

  • Last visited

  1. Could you give me an example of what you mean? It seems to be vague on step 4
  2. Could you give me an example of what you mean? It seems to be vague on step 4
  3. Alright, new issue. When I put down the chicken, it creates a copy of the chicken, making two chickens, and they walk in sync with each other. What on earth is happening? It appears that when I kill the chickens, the original will die, but the copy will stay. However, this is where it gets creepy. The copy doesn't stay alive. You know when you kill an animal and it turns over and it's color becomes red right before it disappears? Well, the chicken copy does that, except it doesn't disappear. It stays there. Forever. Seriously, what dimension did I just walk into? Whats happening?
  4. Alright, new issue. When I put down the chicken, it creates a copy of the chicken, making two chickens, and they walk in sync with each other. What on earth is happening? It appears that when I kill the chickens, the original will die, but the copy will stay. However, this is where it gets creepy. The copy doesn't stay alive. You know when you kill an animal and it turns over and it's color becomes red right before it disappears? Well, the chicken copy does that, except it doesn't disappear. It stays there. Forever. Seriously, what dimension did I just walk into? Whats happening?
  5. public static class Handler implements IMessageHandler<MessageEntityMove, IMessage> { @Override public IMessage onMessage(final MessageEntityMove message, final MessageContext ctx) { // Know it will be on the server so make it thread-safe IThreadListener mainThread = (IThreadListener) ctx.getServerHandler().playerEntity.worldObj; // or Minecraft.getMinecraft() on the client mainThread.addScheduledTask(new Runnable() { final EntityPlayerMP thePlayer = (EntityPlayerMP) blessup.proxy. getPlayerEntityFromContext(ctx); final Entity theEntity = thePlayer.worldObj.getEntityByID(message.entityId); final WeakReference<Entity> ent1 = new WeakReference<Entity>(theEntity); So I did this. It didn't quite fix my issue unfortunately. What am I doing wrong? EDIT: Using the weak reference really gave me the entity position and I found that the problem was in how I was mounting the entity on the bat. I didnt mount it in the packet like I should have. So now the entity is truly mounted. There seems to be some server lag. Is that normal with this? I'll do some more testing and report back here before setting this to solved.
  6. public static class Handler implements IMessageHandler<MessageEntityMove, IMessage> { @Override public IMessage onMessage(final MessageEntityMove message, final MessageContext ctx) { // Know it will be on the server so make it thread-safe IThreadListener mainThread = (IThreadListener) ctx.getServerHandler().playerEntity.worldObj; // or Minecraft.getMinecraft() on the client mainThread.addScheduledTask(new Runnable() { final EntityPlayerMP thePlayer = (EntityPlayerMP) blessup.proxy. getPlayerEntityFromContext(ctx); final Entity theEntity = thePlayer.worldObj.getEntityByID(message.entityId); final WeakReference<Entity> ent1 = new WeakReference<Entity>(theEntity); So I did this. It didn't quite fix my issue unfortunately. What am I doing wrong? EDIT: Using the weak reference really gave me the entity position and I found that the problem was in how I was mounting the entity on the bat. I didnt mount it in the packet like I should have. So now the entity is truly mounted. There seems to be some server lag. Is that normal with this? I'll do some more testing and report back here before setting this to solved.
  7. OH MY GOD. I just found out.. IT NEVER MOVED THE ENTITY. It appears I never picked up the entity at all. What does this mean?
  8. OH MY GOD. I just found out.. IT NEVER MOVED THE ENTITY. It appears I never picked up the entity at all. What does this mean?
  9. I mount the entity in another class, inside of a @SideOnly(Side.CLIENT) @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onEvent(MouseEvent event) event. using this .network.sendToServer(new MessageEntityPacket(ent.getEntityId())); I successfully get the entity's ID and send it to the server, but only temporarily. It seems like it forgets after a while and teleports the entity back.
  10. I mount the entity in another class, inside of a @SideOnly(Side.CLIENT) @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void onEvent(MouseEvent event) event. using this .network.sendToServer(new MessageEntityPacket(ent.getEntityId())); I successfully get the entity's ID and send it to the server, but only temporarily. It seems like it forgets after a while and teleports the entity back.
  11. public static class Handler implements IMessageHandler<MessageEntityMove, IMessage> { @Override public IMessage onMessage(final MessageEntityMove message, MessageContext ctx) { IThreadListener mainThread = (IThreadListener) ctx.getServerHandler().playerEntity.worldObj; final EntityPlayerMP thePlayer = (EntityPlayerMP) YouLoyal.proxy. getPlayerEntityFromContext(ctx); final Entity theEntity = thePlayer.worldObj. getEntityByID(message.entityId); mainThread.addScheduledTask(new Runnable() { @Override public void run() { This code is taken from a simple packet i made. See what I'm trying to do is pick up a chicken and hold it in my hand. I use a packet to send the chicken's ID to the server so that I can mount the chicken on a bat that i'm constantly teleporting to the player's hand. However, after a while, the server loses the entity, and the chicken goes back to the position it's in before I picked it up. I checked the coords for the bat and the chicken, and I found that the bat isnt the problem. The server will say that the chicken is in it's last position before it teleported back to its original position. So I'm seeing that the server lost the chicken's entity ID. Would this be attributed to a problem with the piece of the packet I showed above? If not, what would be causing this issue, and how do I fix it?
  12. public static class Handler implements IMessageHandler<MessageEntityMove, IMessage> { @Override public IMessage onMessage(final MessageEntityMove message, MessageContext ctx) { IThreadListener mainThread = (IThreadListener) ctx.getServerHandler().playerEntity.worldObj; final EntityPlayerMP thePlayer = (EntityPlayerMP) YouLoyal.proxy. getPlayerEntityFromContext(ctx); final Entity theEntity = thePlayer.worldObj. getEntityByID(message.entityId); mainThread.addScheduledTask(new Runnable() { @Override public void run() { This code is taken from a simple packet i made. See what I'm trying to do is pick up a chicken and hold it in my hand. I use a packet to send the chicken's ID to the server so that I can mount the chicken on a bat that i'm constantly teleporting to the player's hand. However, after a while, the server loses the entity, and the chicken goes back to the position it's in before I picked it up. I checked the coords for the bat and the chicken, and I found that the bat isnt the problem. The server will say that the chicken is in it's last position before it teleported back to its original position. So I'm seeing that the server lost the chicken's entity ID. Would this be attributed to a problem with the piece of the packet I showed above? If not, what would be causing this issue, and how do I fix it?

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.