Fixed pegasi being able to pick up clouds as passengers

This commit is contained in:
Sollace 2019-02-02 18:50:48 +02:00
parent d4948e0e37
commit fd18f80c1f

View file

@ -3,6 +3,7 @@ package com.minelittlepony.unicopia.power;
import org.lwjgl.input.Keyboard;
import com.minelittlepony.unicopia.Race;
import com.minelittlepony.unicopia.entity.EntityCloud;
import com.minelittlepony.unicopia.player.IPlayer;
import com.minelittlepony.unicopia.power.data.Hit;
import com.minelittlepony.util.vector.VecHelper;
@ -50,8 +51,10 @@ public class PowerCarry implements IPower<Hit> {
Entity hit = VecHelper.getLookedAtEntity(player, 10);
if (hit instanceof EntityLivingBase && !player.isRidingOrBeingRiddenBy(hit)) {
if (!(hit instanceof EntityCloud)) {
return (EntityLivingBase)hit;
}
}
return null;
}