Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. sence i cant use Item stack how do i fix
  2.  
  3. @Override
  4. protected boolean processInteract(EntityPlayer player, EnumHand hand, ItemStack stack) {
  5. if(stack != null && stack.getItem() == Items.SPAWN_EGG) {
  6. return super.processInteract(player, hand, stack);
  7. } else {
  8. if(!this.isBeingRidden()) {
  9. if(stack != null && stack.interactWithEntity(player, this, hand)) {
  10. return true;
  11. } else {
  12. this.mountTo(player);
  13. Minecraft.getMinecraft().gameSettings.thirdPersonView = 1;
  14. return true;
  15. }
  16. } else {
  17. return super.processInteract(player, hand, stack);
  18. }
  19. }
  20.  
  21.  
  22. ---------------------------------------------------------------------------------------------------------------------------------------
  23.  
  24. no loger likes worldObj in
  25.  
  26.  
  27. private void mountTo(EntityPlayer player) {
  28. player.rotationYaw = this.rotationYaw;
  29. player.rotationPitch = this.rotationPitch;
  30.  
  31. if(!this.worldObj.isRemote) {
  32. player.startRiding(this);
  33. }
  34. }
  35.  
  36. ---------------------------------------------------------------------------------------------------------------------------------------
  37. no longer likes sqrt_double in
  38.  
  39. this.prevLimbSwingAmount = this.limbSwingAmount;
  40. double d1 = this.posX - this.prevPosX;
  41. double d0 = this.posZ - this.prevPosZ;
  42. float f2 = MathHelper.sqrt_double(d1 * d1 + d0 * d0) * 4.0f;
  43.  
  44. if(f2 > 1.0f) {
  45. f2 = 1.0f;
  46. }
  47.  
  48. this.limbSwingAmount += (f2 - this.limbSwingAmount) * 0.4f;
  49. this.limbSwing += this.limbSwingAmount;
  50. } else {
  51. this.jumpMovementFactor = 0.02f;
  52. super.moveEntityWithHeading(strafe, forward);
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement