File tree Expand file tree Collapse file tree 3 files changed +10
-25
lines changed
main/java/world/bentobox/boxed
test/java/world/bentobox/boxed/mocks Expand file tree Collapse file tree 3 files changed +10
-25
lines changed Original file line number Diff line number Diff line change 112112 </profiles >
113113
114114 <repositories >
115- <repository >
116- <id >papermc</id >
117- <url >https://repo.papermc.io/repository/maven-public/</url >
118- </repository >
119- <repository >
115+ <repository >
120116 <id >spigot-repo</id >
121117 <url >https://hub.spigotmc.org/nexus/content/repositories/snapshots</url >
122118 </repository >
119+ <repository >
120+ <id >papermc</id >
121+ <url >https://repo.papermc.io/repository/maven-public/</url >
122+ </repository >
123123 <repository >
124124 <id >bentoboxworld</id >
125125 <url >https://repo.codemc.org/repository/bentoboxworld/</url >
144144 </repositories >
145145
146146 <dependencies >
147- <!-- Paper API -->
148- <dependency >
149- <groupId >io.papermc.paper</groupId >
150- <artifactId >paper-api</artifactId >
151- <version >${paper.version} </version >
152- <scope >provided</scope >
153- </dependency >
154- <!-- PaperLib -->
155- <dependency >
156- <groupId >io.papermc</groupId >
157- <artifactId >paperlib</artifactId >
158- <version >1.0.6</version >
159- <scope >compile</scope >
160- </dependency >
161147 <!-- Spigot API -->
162148 <dependency >
163149 <groupId >org.spigotmc</groupId >
Original file line number Diff line number Diff line change @@ -250,11 +250,9 @@ public int getScore(Advancement a) {
250250 }
251251 if (advConfig .getBoolean ("settings.automatic-scoring" )) {
252252 if (!a .getKey ().getKey ().contains ("recipes" ) && a .getDisplay () != null ) {
253- int score = 1 ;
254- while (a .getParent () != null ) {
255- score ++;
256- }
257- return score ;
253+ float x = a .getDisplay ().getX ();
254+ float y = a .getDisplay ().getY ();
255+ return (int ) Math .round (Math .sqrt (x * x + y * y ));
258256 } else {
259257 return 0 ;
260258 }
Original file line number Diff line number Diff line change 2424
2525public final class ServerMocks {
2626
27+ @ SuppressWarnings ({ "deprecation" , "unchecked" })
2728 public static @ NonNull Server newServer () {
2829 Server mock = mock (Server .class );
2930
@@ -66,7 +67,7 @@ public final class ServerMocks {
6667 doReturn (key ).when (keyed ).getKey ();
6768 return keyed ;
6869 });
69- }).when (registry ).get (notNull ());
70+ }).when (registry ).get (( NamespacedKey ) notNull ());
7071 return registry ;
7172 })).when (mock ).getRegistry (notNull ());
7273
You can’t perform that action at this time.
0 commit comments