Search in sources :

Example 1 with CraftBoat

use of org.bukkit.craftbukkit.v1_18_R2.entity.CraftBoat in project UltraCosmetics by iSach.

the class EntityUtil method moveShip.

@Override
public void moveShip(Player player, org.bukkit.entity.Entity entity, Vector vector) {
    Boat ec = ((CraftBoat) entity).getHandle();
    ec.getBukkitEntity().setVelocity(vector);
    ec.setXRot(player.getLocation().getPitch());
    ec.setYRot(player.getLocation().getYaw() - 180);
    ec.move(MoverType.SELF, new Vec3(1, 0, 0));
}
Also used : Vec3(net.minecraft.world.phys.Vec3) CraftBoat(org.bukkit.craftbukkit.v1_18_R2.entity.CraftBoat) CraftBoat(org.bukkit.craftbukkit.v1_18_R2.entity.CraftBoat) Boat(net.minecraft.world.entity.vehicle.Boat)

Example 2 with CraftBoat

use of org.bukkit.craftbukkit.v1_18_R2.entity.CraftBoat in project UltraCosmetics by iSach.

the class EntityUtil method moveShip.

@Override
public void moveShip(Player player, org.bukkit.entity.Entity entity, Vector vector) {
    Boat ec = ((CraftBoat) entity).getHandle();
    ec.getBukkitEntity().setVelocity(vector);
    ec.setXRot(player.getLocation().getPitch());
    ec.setYRot(player.getLocation().getYaw() - 180);
    ec.move(MoverType.SELF, new Vec3(1, 0, 0));
}
Also used : Vec3(net.minecraft.world.phys.Vec3) CraftBoat(org.bukkit.craftbukkit.v1_17_R1.entity.CraftBoat) CraftBoat(org.bukkit.craftbukkit.v1_17_R1.entity.CraftBoat) Boat(net.minecraft.world.entity.vehicle.Boat)

Aggregations

Boat (net.minecraft.world.entity.vehicle.Boat)2 Vec3 (net.minecraft.world.phys.Vec3)2 CraftBoat (org.bukkit.craftbukkit.v1_17_R1.entity.CraftBoat)1 CraftBoat (org.bukkit.craftbukkit.v1_18_R2.entity.CraftBoat)1