chore: remove unused qualifier org.joml.* (#4644)

This commit is contained in:
Michael Pollind 2021-05-02 21:15:25 -07:00 committed by GitHub
parent e0f93feedd
commit 0d39a3bca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -213,13 +213,13 @@ public class CharacterSystem extends BaseComponentSystem implements UpdateSubscr
if (!onItemUseEvent.isConsumed()) { if (!onItemUseEvent.isConsumed()) {
EntityRef gazeEntity = GazeAuthoritySystem.getGazeEntityForCharacter(character); EntityRef gazeEntity = GazeAuthoritySystem.getGazeEntityForCharacter(character);
LocationComponent gazeLocation = gazeEntity.getComponent(LocationComponent.class); LocationComponent gazeLocation = gazeEntity.getComponent(LocationComponent.class);
org.joml.Vector3f direction = gazeLocation.getWorldDirection(new org.joml.Vector3f()); Vector3f direction = gazeLocation.getWorldDirection(new Vector3f());
org.joml.Vector3f originPos = gazeLocation.getWorldPosition(new org.joml.Vector3f()); Vector3f originPos = gazeLocation.getWorldPosition(new Vector3f());
if (recordAndReplayCurrentStatus.getStatus() == RecordAndReplayStatus.RECORDING) { if (recordAndReplayCurrentStatus.getStatus() == RecordAndReplayStatus.RECORDING) {
directionAndOriginPosRecorderList.getAttackEventDirectionAndOriginPosRecorder().add(direction, directionAndOriginPosRecorderList.getAttackEventDirectionAndOriginPosRecorder().add(direction,
originPos); originPos);
} else if (recordAndReplayCurrentStatus.getStatus() == RecordAndReplayStatus.REPLAYING) { } else if (recordAndReplayCurrentStatus.getStatus() == RecordAndReplayStatus.REPLAYING) {
org.joml.Vector3f[] data = Vector3f[] data =
directionAndOriginPosRecorderList.getAttackEventDirectionAndOriginPosRecorder().poll(); directionAndOriginPosRecorderList.getAttackEventDirectionAndOriginPosRecorder().poll();
direction = data[0]; direction = data[0];
originPos = data[1]; originPos = data[1];
@ -311,14 +311,14 @@ public class CharacterSystem extends BaseComponentSystem implements UpdateSubscr
CharacterComponent characterComponent = character.getComponent(CharacterComponent.class); CharacterComponent characterComponent = character.getComponent(CharacterComponent.class);
EntityRef camera = GazeAuthoritySystem.getGazeEntityForCharacter(character); EntityRef camera = GazeAuthoritySystem.getGazeEntityForCharacter(character);
LocationComponent location = camera.getComponent(LocationComponent.class); LocationComponent location = camera.getComponent(LocationComponent.class);
org.joml.Vector3f direction = location.getWorldDirection(new org.joml.Vector3f()); Vector3f direction = location.getWorldDirection(new Vector3f());
if (!(event.getDirection().equals(direction, 0.0001f))) { if (!(event.getDirection().equals(direction, 0.0001f))) {
logger.error("Direction at client {} was different than direction at server {}", event.getDirection(), direction); logger.error("Direction at client {} was different than direction at server {}", event.getDirection(), direction);
} }
// Assume the exact same value in case there are rounding mistakes: // Assume the exact same value in case there are rounding mistakes:
direction = event.getDirection(); direction = event.getDirection();
org.joml.Vector3f originPos = location.getWorldPosition(new org.joml.Vector3f()); Vector3f originPos = location.getWorldPosition(new Vector3f());
if (!(event.getOrigin().equals(originPos, 0.0001f))) { if (!(event.getOrigin().equals(originPos, 0.0001f))) {
String msg = "Player {} seems to have cheated: It stated that it performed an action from {} but the predicted position is {}"; String msg = "Player {} seems to have cheated: It stated that it performed an action from {} but the predicted position is {}";
logger.info(msg, getPlayerNameFromCharacter(character), event.getOrigin(), originPos); logger.info(msg, getPlayerNameFromCharacter(character), event.getOrigin(), originPos);

View File

@ -4,6 +4,7 @@ package org.terasology.engine.logic.characters;
import org.joml.Math; import org.joml.Math;
import org.joml.Quaternionf; import org.joml.Quaternionf;
import org.joml.RoundingMode;
import org.joml.Vector3f; import org.joml.Vector3f;
import org.joml.Vector3i; import org.joml.Vector3i;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -91,8 +92,8 @@ public class KinematicCharacterMover implements CharacterMover {
// The CharacterMovementComponent also has a 'radius' which may be used here. // The CharacterMovementComponent also has a 'radius' which may be used here.
// Question: Is this connected with _shapes_ or bounding boxes in some way? // Question: Is this connected with _shapes_ or bounding boxes in some way?
checkBlockEntry(entity, checkBlockEntry(entity,
new Vector3i(initial.getPosition(), org.joml.RoundingMode.HALF_UP), new Vector3i(initial.getPosition(), RoundingMode.HALF_UP),
new Vector3i(result.getPosition(), org.joml.RoundingMode.HALF_UP), new Vector3i(result.getPosition(), RoundingMode.HALF_UP),
characterMovementComponent.height); characterMovementComponent.height);
} }
if (result.getMode() != MovementMode.GHOSTING && result.getMode() != MovementMode.NONE) { if (result.getMode() != MovementMode.GHOSTING && result.getMode() != MovementMode.NONE) {

View File

@ -142,7 +142,7 @@ public enum Side {
/** /**
* The side normal closes to dir * The side normal closes to dir
* *
* @param dir direction * @param dir direction
* @return side * @return side
*/ */
@ -299,7 +299,7 @@ public enum Side {
* @param dest will hold the result * @param dest will hold the result
* @return dest * @return dest
*/ */
public org.joml.Vector3i getAdjacentPos(Vector3ic pos, org.joml.Vector3i dest) { public Vector3i getAdjacentPos(Vector3ic pos, Vector3i dest) {
return dest.set(pos).add(direction()); return dest.set(pos).add(direction());
} }