2022-10-11 17:19:50 +02:00
|
|
|
package com.minelittlepony.unicopia;
|
|
|
|
|
2023-09-02 19:34:57 +02:00
|
|
|
import com.minelittlepony.unicopia.entity.mob.AirBalloonEntity;
|
|
|
|
import com.minelittlepony.unicopia.entity.mob.UEntities;
|
2023-08-13 11:04:09 +02:00
|
|
|
|
|
|
|
import net.minecraft.entity.vehicle.BoatEntity;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
2022-12-04 20:13:57 +01:00
|
|
|
public interface Debug {
|
2023-08-13 11:04:09 +02:00
|
|
|
boolean SPELLBOOK_CHAPTERS = Boolean.getBoolean("unicopia.debug.spellbookChapters");
|
|
|
|
boolean CHECK_GAME_VALUES = Boolean.getBoolean("unicopia.debug.checkGameValues");
|
|
|
|
|
|
|
|
boolean[] TESTS_COMPLETE = {false};
|
|
|
|
|
|
|
|
static void runTests(World world) {
|
|
|
|
if (!CHECK_GAME_VALUES || TESTS_COMPLETE[0]) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
TESTS_COMPLETE[0] = true;
|
|
|
|
|
|
|
|
try {
|
|
|
|
for (var type : BoatEntity.Type.values()) {
|
|
|
|
var balloon = UEntities.AIR_BALLOON.create(world);
|
2023-08-14 21:31:33 +02:00
|
|
|
balloon.setBasketType(AirBalloonEntity.BasketType.of(type));
|
2023-08-13 11:04:09 +02:00
|
|
|
balloon.asItem();
|
|
|
|
}
|
|
|
|
} catch (Throwable t) {
|
|
|
|
throw new IllegalStateException("Tests failed", t);
|
|
|
|
}
|
|
|
|
}
|
2022-10-11 17:19:50 +02:00
|
|
|
}
|