Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sence i cant use Item stack how do i fix
- @Override
- protected boolean processInteract(EntityPlayer player, EnumHand hand, ItemStack stack) {
- if(stack != null && stack.getItem() == Items.SPAWN_EGG) {
- return super.processInteract(player, hand, stack);
- } else {
- if(!this.isBeingRidden()) {
- if(stack != null && stack.interactWithEntity(player, this, hand)) {
- return true;
- } else {
- this.mountTo(player);
- Minecraft.getMinecraft().gameSettings.thirdPersonView = 1;
- return true;
- }
- } else {
- return super.processInteract(player, hand, stack);
- }
- }
- ---------------------------------------------------------------------------------------------------------------------------------------
- no loger likes worldObj in
- private void mountTo(EntityPlayer player) {
- player.rotationYaw = this.rotationYaw;
- player.rotationPitch = this.rotationPitch;
- if(!this.worldObj.isRemote) {
- player.startRiding(this);
- }
- }
- ---------------------------------------------------------------------------------------------------------------------------------------
- no longer likes sqrt_double in
- this.prevLimbSwingAmount = this.limbSwingAmount;
- double d1 = this.posX - this.prevPosX;
- double d0 = this.posZ - this.prevPosZ;
- float f2 = MathHelper.sqrt_double(d1 * d1 + d0 * d0) * 4.0f;
- if(f2 > 1.0f) {
- f2 = 1.0f;
- }
- this.limbSwingAmount += (f2 - this.limbSwingAmount) * 0.4f;
- this.limbSwing += this.limbSwingAmount;
- } else {
- this.jumpMovementFactor = 0.02f;
- super.moveEntityWithHeading(strafe, forward);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement