test: Added some more tests

This commit is contained in:
2025-03-02 21:17:11 +01:00
parent fed35d3a02
commit bb4e7423e3
12 changed files with 100 additions and 17 deletions

View File

@ -8,7 +8,7 @@ import org.reflections.Reflections;
import java.util.*;
public class CraftingRecipeList {
private static final List<CraftingRecipe> recipes = new ArrayList<>();
public static final List<CraftingRecipe> recipes = new ArrayList<>();
static {
registerRecipes();

View File

@ -6,7 +6,7 @@ import cz.jzitnik.game.entities.items.Item;
import cz.jzitnik.game.entities.items.ItemType;
import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("wooden_pickaxe")
@ItemRegistry("iron_pickaxe")
public class IronPickaxe extends Item {
public IronPickaxe() {
super("iron_pickaxe", "Iron pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.IRON_PICKAXE, ToolVariant.IRON, 13.5, 250, false);

View File

@ -7,7 +7,7 @@ import cz.jzitnik.game.annotations.EntityHurtAnimationHandler;
import org.reflections.Reflections;
public class EntityHurtAnimation {
private final HashMap<String, EntityHurtAnimationChanger> handlerList = new HashMap<>();
public final HashMap<String, EntityHurtAnimationChanger> handlerList = new HashMap<>();
public EntityHurtAnimation() {
registerHandlers();

View File

@ -7,7 +7,7 @@ import cz.jzitnik.game.annotations.EntityKillHandler;
import org.reflections.Reflections;
public class EntityKill {
private final HashMap<String, EntityKillInterface> handlerList = new HashMap<>();
public final HashMap<String, EntityKillInterface> handlerList = new HashMap<>();
public EntityKill() {
registerHandlers();

View File

@ -14,7 +14,7 @@ import org.reflections.Reflections;
public class EntityLogicProvider {
private static final int CHUNK_SIZE = 20;
private final HashMap<String, EntityLogicInterface> logicList = new HashMap<>();
public final HashMap<String, EntityLogicInterface> logicList = new HashMap<>();
@AllArgsConstructor
@Getter

View File

@ -15,15 +15,6 @@ import org.reflections.Reflections;
public class EntitySpawnProvider {
private final List<EntitySpawnInterface> spawnList = new ArrayList<>();
@AllArgsConstructor
@Getter
public static class EntityLogicMobDTO {
private Game game;
private Block mob;
private int x;
private int y;
}
public void update(Game game, Terminal terminal) {
int[] playerLocation = game.getPlayerCords();
int playerX = playerLocation[0];