Jump to content

YijunYuan

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

YijunYuan's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have to determine which boss is e? Or there is way to do that without knowing the exact kind of boss?
  2. Now I have an Entity object e which I know is a boss (determined by isNonBoss() ), my question is if it's possible to get the bossinfo of e without knowing exactly which entity is e?
  3. entityPlayerMP.sendMessage(new TextComponentString(TextFormatting.RED + "" + TextFormatting.ITALIC + " TESTING!")); WorldServer worldServer = entityPlayerMP.getEntityWorld().getMinecraftServer().worldServerForDimension(home_dim); entityPlayerMP.getServer().getPlayerList().transferPlayerToDimension(entityPlayerMP, home_dim, new YJTeleporter(worldServer)); entityPlayerMP.setPositionAndUpdate(home_x, home_y, home_z); entityPlayerMP.setPositionAndUpdate(home_x, home_y, home_z); worldServer.spawnEntity(entityPlayerMP); worldServer.updateEntityWithOptionalForce(entityPlayerMP, false); The bossInfo bar of Dragon is still in the screen when I transport the player from The End to The Overworld when the Dragon is not beated. (The frozen entity problem has solved.) I'm finding a way to make the bossInfo invisible in the Overworld. Basicly, reconnecting to the server can solve it, but it's obviously not a perfect way.
  4. Well... I've tried his/her method without success......
  5. I'm developing a mod to provide bukkit-plugin-like /home, /sethome, /back command for vanilla server with forge installed. Everything goes fine, except for teleporting player from The End. When player is in the world except for The End, I can use the following code to teleport the player to the dimension and the position I need: if (entityPlayerMP.dimension != homeposition.getHomeDimensionId()) { entityPlayerMP.changeDimension(homeposition.getHomeDimensionId()); } entityPlayerMP.setPositionAndUpdate( homeposition.getHomeCoordinates().xCoord, homeposition.getHomeCoordinates().yCoord, homeposition.getHomeCoordinates().zCoord); However when entityPlayerMP is in The End, i.e. entityPlayerMP.dimension equals 1, this code will lead to an error, that is when the player travels from The End to Overworld, the entity in the Overworld will froze and if the dragon is not beated, it's hit point will appear in the Overworld. The reason of this is the particularity of The End, and teleporting from it will make the player in the process of the End Poem, which is broken by the setPositionAndUpdate (it's hard to explain it in a few words but if you look into the implementation of changeDimension(), you will know clearly what I'm saying). That is to say, if I want the /back and /home command works for the player in The End, I need a user defined method of change dimension, which is beyond my ability.
×
×
  • Create New...

Important Information

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