Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/23/17 in all areas

  1. I'm trying to create an item that allows you to take over a living entity on right click, possibly leaving the players body where it is. To leave the players body I think I just have to create a custom entity and spawn it where the player was with players data. How do I go about actually taking over the living entity? I think there are two possibilities: 1. There is a relatively easy way that allows control over a living entity and moves the players camera position to the eye height of the entity, already built into Minecraft/Minecraft Forge. 2. Despawn the living entity (or EntityLiving::setDead()) and store living entity data in player, give the player the model of the living entity that was right clicked, and set the player position to the living entities position. Then when the player wants to switch back do the opposite.
    1 point
  2. Also, you should use breakBlock(), which is called if the block is replaced by another block (could be air, but also another block) instead of onBlockDestroyedByExplosion() and onBlockDestroyedByPlayer().
    1 point
  3. Choonster's guess was correct, you are spawning the item on both the logical server and logical client. You need to check that the world is not a client (!world.isRemote) before spawning any type of entity - and read the page Choonster linked to make sure you understand about sides.
    1 point
  4. There shouldn't need to be any pause between spawning items. What's more likely is that you're spawning the items on both the logical client and server, when you should only be doing so on the server. See Forge's documentation for an explanation of sides. If this isn't the case, post your actual code.
    1 point
  5. See if you can find the source for the Morph Mod
    1 point
  6. There's a whole tangle of code associated with being a player, so I think you're going to need to go with an extension of EntityPlayer. That means try the substitution(s) and re-skin.
    1 point
  7. net.minecraft.util.text.translation.I18n , I think. At least that is what I use.
    1 point
×
×
  • Create New...

Important Information

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