@@ -49,6 +49,8 @@ public class Uniques {
49
49
private static Trophy birthdayTrophyDecoy ;
50
50
@ Getter
51
51
private static Trophy birthdayTrophyOddish ;
52
+ @ Getter
53
+ private static Trophy tenthAnniversaryTrophy ;
52
54
53
55
public static void setup () {
54
56
@@ -282,11 +284,56 @@ public static void setup() {
282
284
}
283
285
);
284
286
287
+ // Tenth Anniversary
288
+ RecipeItem anniversaryTrophy = new RecipeItem (
289
+ new ItemStack (Material .COOKIE ),
290
+ StoryType .HUMAN , 500 ,
291
+ StoryType .ELEMENTAL , 500 ,
292
+ StoryType .VOID , 500 ,
293
+ Uniques ::isTenthAnniversary
294
+ );
295
+ tenthAnniversaryTrophy = new Trophy (
296
+ ItemGroups .UNIQUES ,
297
+ CrystaStacks .ANNIVERSARY_TROPHY ,
298
+ CrystaRecipeTypes .LIQUEFACTION_CRAFTING ,
299
+ anniversaryTrophy .getDisplayRecipe (),
300
+ location -> {
301
+ final int rand = ThreadLocalRandom .current ().nextInt (9 );
302
+
303
+ if (rand != 0 ) {
304
+ return ;
305
+ }
306
+
307
+ for (int i = 0 ; i < 4 ; i ++) {
308
+ final Location spawnLocation = location .add (0 , 0.3 , 0 );
309
+ final Color color = Color .fromRGB (55 , 180 , 30 );
310
+ spawnBirthdayFirework (spawnLocation , color );
311
+ ParticleUtils .displayParticleEffect (
312
+ spawnLocation ,
313
+ 1 ,
314
+ 3 ,
315
+ new Particle .DustOptions (color , 2 )
316
+ );
317
+ }
318
+
319
+ final Location spawnLocation = location .add (0 , 0.2 , 0 );
320
+ final Color color = Color .fromRGB (255 , 255 , 255 );
321
+ spawnBirthdayFirework (spawnLocation , color );
322
+ ParticleUtils .displayParticleEffect (
323
+ spawnLocation ,
324
+ 1 ,
325
+ 3 ,
326
+ new Particle .DustOptions (color , 2 )
327
+ );
328
+ }
329
+ );
330
+
285
331
spellTrophy .register (plugin );
286
332
storyTrophy .register (plugin );
287
333
gildingTrophy .register (plugin );
288
334
christmasTrophy .register (plugin );
289
335
valentinesTrophy .register (plugin );
336
+ tenthAnniversaryTrophy .register (plugin );
290
337
291
338
birthdayTrophyCheesy .register (plugin );
292
339
birthdayTrophyBWhite .register (plugin );
@@ -328,7 +375,7 @@ private static boolean isChristmas(@Nonnull Player player) {
328
375
private static boolean isBirthdayCheesy (@ Nonnull Player player ) {
329
376
final LocalDate now = LocalDate .now ();
330
377
final int year = now .getYear ();
331
- final LocalDate start = LocalDate .of (year , 3 , 29 );
378
+ final LocalDate start = LocalDate .of (year , 3 , 28 );
332
379
final LocalDate end = LocalDate .of (year , 3 , 30 );
333
380
334
381
return now .isAfter (start ) && now .isBefore (end );
@@ -337,26 +384,26 @@ private static boolean isBirthdayCheesy(@Nonnull Player player) {
337
384
private static boolean isBirthdayBWhite (@ Nonnull Player player ) {
338
385
final LocalDate now = LocalDate .now ();
339
386
final int year = now .getYear ();
340
- final LocalDate start = LocalDate .of (year , 9 , 10 );
341
- final LocalDate end = LocalDate .of (year , 9 , 10 );
387
+ final LocalDate start = LocalDate .of (year , 9 , 9 );
388
+ final LocalDate end = LocalDate .of (year , 9 , 11 );
342
389
343
390
return now .isAfter (start ) && now .isBefore (end );
344
391
}
345
392
346
393
private static boolean isBirthdayDecoy (@ Nonnull Player player ) {
347
394
final LocalDate now = LocalDate .now ();
348
395
final int year = now .getYear ();
349
- final LocalDate start = LocalDate .of (year , 12 , 11 );
350
- final LocalDate end = LocalDate .of (year , 12 , 11 );
396
+ final LocalDate start = LocalDate .of (year , 12 , 10 );
397
+ final LocalDate end = LocalDate .of (year , 12 , 12 );
351
398
352
399
return now .isAfter (start ) && now .isBefore (end );
353
400
}
354
401
355
402
private static boolean isBirthdayOddish (@ Nonnull Player player ) {
356
403
final LocalDate now = LocalDate .now ();
357
404
final int year = now .getYear ();
358
- final LocalDate start = LocalDate .of (year , 2 , 12 );
359
- final LocalDate end = LocalDate .of (year , 2 , 12 );
405
+ final LocalDate start = LocalDate .of (year , 2 , 11 );
406
+ final LocalDate end = LocalDate .of (year , 2 , 13 );
360
407
361
408
return now .isAfter (start ) && now .isBefore (end );
362
409
}
@@ -370,6 +417,15 @@ private static boolean isValentines(@Nonnull Player player) {
370
417
return now .isAfter (start ) && now .isBefore (end );
371
418
}
372
419
420
+ private static boolean isTenthAnniversary (@ Nonnull Player player ) {
421
+ final LocalDate now = LocalDate .now ();
422
+ final int year = 2023 ;
423
+ final LocalDate start = LocalDate .of (year , 3 , 8 );
424
+ final LocalDate end = LocalDate .of (year , 3 , 22 );
425
+
426
+ return now .isAfter (start ) && now .isBefore (end );
427
+ }
428
+
373
429
private static void spawnBirthdayFirework (@ Nonnull Location location , @ Nonnull Color color ) {
374
430
final Firework firework = (Firework ) location .getWorld ().spawnEntity (location , EntityType .FIREWORK );
375
431
final FireworkMeta fireworkMeta = firework .getFireworkMeta ();
0 commit comments