Jump to content

[1.7.10] 6 questions


Jacky2611

Recommended Posts

Hi!

 

After a long break i finally continued to develop my mod.

Everything is working out quite nicely but now i have a few questions i need to be answered before i can continue.

 

1  are mob nbt tags automatically synced? I remember vaguely that i had to manualy sync some tile entity data but i am not sure if its the same for mobs.

    If so is there an easy way to do this without having to rely on netty (don't want to add it for just this one thing)?

 

2  How would i create a mob that can't be pushed around by other mobs, players and pistons?

 

3  What is the best way to keep a player/mob at the exact same place and to block any actions? I believe tp him over and over again to the same cords could    make the server a bit laggy

 

4  What would be the easiest way to create a clone of a player?

 

5  Can i use the following code to "revive" a player in mp Hardcore? I never actually played hardcore bevor :P

 

 

MinecraftServer minecraftserver = MinecraftServer.getServer();
GameProfile gameprofile = minecraftserver.getConfigurationManager().func_152608_h().func_152703_a("PLAYERNAME");
minecraftserver.getConfigurationManager().func_152608_h().func_152684_c(gameprofile);

 

 

 

6  How exactly can i figure out if my mod is running on a hardcore server?

 

I would really appreciate it if someone could help me with these problems.

 

Jacky

Here could be your advertisement!

Link to comment
Share on other sites

1. NBT is not synced, meaning you have to use packets. If you have your own mob, there's an alternative to packets: DataWatchers (Google is your friend).

2. Try to override isMovementBlocked() in your entity and return true.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.