Class VehicleMovement1_12
java.lang.Object
nl.mtvehicles.core.movement.VehicleMovement
nl.mtvehicles.core.movement.versions.VehicleMovement1_12
Class concerning the movement of vehicles in 1_12_R2 (because the NMS differ a lot)
-
Field Summary
Fields inherited from class nl.mtvehicles.core.movement.VehicleMovement
extremeFalling, headlightsEnabled, isFalling, license, packet, player, standMain, standMainSeat, standRotors, standSkin, vehicleType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanCheck the next block - carpets, slabs, snow - and do an appropriate action.protected booleanisPassable(org.bukkit.block.Block block) Check whether a block is passable.protected voidrotateVehicle(float yaw) Rotate the vehicle to a specified yawprotected floatGet steering packet's rotationprotected floatGet steering packet's movement (forwards × backwards)protected booleanChecked whether a player is jumping (got from the steering packet)Methods inherited from class nl.mtvehicles.core.movement.VehicleMovement
boatPassable, getLayerHeight, getLocationOfBlockAhead, getTeleportMethod, mainSeat, move, pushVehicleDown, pushVehicleUp, putFrictionSpeed, putFuelUsage, rotation, rotors, spawnParticles, tankShoot, teleportSeat, teleportSeat, updateStand, vehicleMovement
-
Constructor Details
-
VehicleMovement1_12
public VehicleMovement1_12()
-
-
Method Details
-
blockCheck
protected boolean blockCheck()Description copied from class:VehicleMovementCheck the next block - carpets, slabs, snow - and do an appropriate action.- Overrides:
blockCheckin classVehicleMovement- Returns:
- True if the vehicle is moving upwards (in any way)
-
isPassable
protected boolean isPassable(org.bukkit.block.Block block) Description copied from class:VehicleMovementCheck whether a block is passable. Method used because 1.12 does not have this method natively.- Overrides:
isPassablein classVehicleMovement- Parameters:
block- Checked block- Returns:
- True if the checked block is passable.
-
rotateVehicle
protected void rotateVehicle(float yaw) Description copied from class:VehicleMovementRotate the vehicle to a specified yaw- Overrides:
rotateVehiclein classVehicleMovement
-
steerIsJumping
protected boolean steerIsJumping()Description copied from class:VehicleMovementChecked whether a player is jumping (got from the steering packet)- Overrides:
steerIsJumpingin classVehicleMovement- Returns:
- True if player is jumping
-
steerGetXxa
protected float steerGetXxa()Description copied from class:VehicleMovementGet steering packet's rotation- Overrides:
steerGetXxain classVehicleMovement- Returns:
- Rotation from the packet
-
steerGetZza
protected float steerGetZza()Description copied from class:VehicleMovementGet steering packet's movement (forwards × backwards)- Overrides:
steerGetZzain classVehicleMovement- Returns:
- Movement from the packet
-