Fixes #293 If you play the game's cross sky mod, the Easter egg will not be triggered in a positive length
Closed this issue ยท 5 comments
The lowest cost method is
@Unique
private static final int KAllFix$max = 10000;
@Unique
private static int KAllFix$size = 0;
@Unique
private static boolean KAllFix$isAprilFools = false;
@Unique
private static boolean KAllFix$_isAprilFools() {
Calendar calendar = Calendar.getInstance();
return calendar.get(2) + 1 == 4 && calendar.get(5) == 1;
}
/**
* @author
* @reason
*/
@Overwrite(remap = false)
public static boolean isAprilFools() {
if (KAllFix$size-- < 1){
KAllFix$isAprilFools = KAllFix$_isAprilFools();
KAllFix$size = KAllFix$max;
}
return KAllFix$isAprilFools;
}
The vertex is delayed for a period of time to trigger, but the overhead of individual threads is higher