From 50facdf88f1596e9310b066265e13bd44c17902c Mon Sep 17 00:00:00 2001 From: david Date: Sun, 23 Jun 2024 20:43:47 +0200 Subject: [PATCH] pass interfaces instead of implementations --- .../net/thenextlvl/gopaint/api/math/curve/BezierSpline.java | 4 ++-- .../net/thenextlvl/gopaint/brush/standard/PaintBrush.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/net/thenextlvl/gopaint/api/math/curve/BezierSpline.java b/api/src/main/java/net/thenextlvl/gopaint/api/math/curve/BezierSpline.java index 21e06ee1..547f9c4a 100644 --- a/api/src/main/java/net/thenextlvl/gopaint/api/math/curve/BezierSpline.java +++ b/api/src/main/java/net/thenextlvl/gopaint/api/math/curve/BezierSpline.java @@ -23,7 +23,7 @@ import org.jetbrains.annotations.Contract; import java.util.Arrays; -import java.util.LinkedList; +import java.util.List; import java.util.OptionalDouble; @Getter @@ -33,7 +33,7 @@ public class BezierSpline { private final BezierSplineSegment[] segments; private final double curveLength; - public BezierSpline(LinkedList curve) { + public BezierSpline(List curve) { this.knots = curve.toArray(new Vector[0]); this.segments = new BezierSplineSegment[knots.length - 1]; for (var segment = 0; segment < knots.length - 1; segment++) { diff --git a/src/main/java/net/thenextlvl/gopaint/brush/standard/PaintBrush.java b/src/main/java/net/thenextlvl/gopaint/brush/standard/PaintBrush.java index c523f633..6b9f67ee 100644 --- a/src/main/java/net/thenextlvl/gopaint/brush/standard/PaintBrush.java +++ b/src/main/java/net/thenextlvl/gopaint/brush/standard/PaintBrush.java @@ -57,7 +57,7 @@ public Component[] getDescription(Audience audience) { return provider.bundle().components(audience, "brush.description.paint"); } - private static final HashMap> selectedPoints = new HashMap<>(); + private static final Map> selectedPoints = new HashMap<>(); @Override public void paint(Location target, Player player, BrushSettings brushSettings) {