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, isFalling, license, packet, player, standMain, standMainSeat, standRotors, standSkin, vehicleType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Check the next block - carpets, slabs, snow - and do an appropriate action.protected boolean
isPassable(org.bukkit.block.Block block)
Check whether a block is passable.protected void
rotateVehicle(float yaw)
Rotate the vehicle to a specified yawprotected float
Get steering packet's rotationprotected float
Get steering packet's movement (forwards × backwards)protected boolean
Checked 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:VehicleMovement
Check the next block - carpets, slabs, snow - and do an appropriate action.- Overrides:
blockCheck
in 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:VehicleMovement
Check whether a block is passable. Method used because 1.12 does not have this method natively.- Overrides:
isPassable
in classVehicleMovement
- Parameters:
block
- Checked block- Returns:
- True if the checked block is passable.
-
rotateVehicle
protected void rotateVehicle(float yaw)Description copied from class:VehicleMovement
Rotate the vehicle to a specified yaw- Overrides:
rotateVehicle
in classVehicleMovement
-
steerIsJumping
protected boolean steerIsJumping()Description copied from class:VehicleMovement
Checked whether a player is jumping (got from the steering packet)- Overrides:
steerIsJumping
in classVehicleMovement
- Returns:
- True if player is jumping
-
steerGetXxa
protected float steerGetXxa()Description copied from class:VehicleMovement
Get steering packet's rotation- Overrides:
steerGetXxa
in classVehicleMovement
- Returns:
- Rotation from the packet
-
steerGetZza
protected float steerGetZza()Description copied from class:VehicleMovement
Get steering packet's movement (forwards × backwards)- Overrides:
steerGetZza
in classVehicleMovement
- Returns:
- Movement from the packet
-