lint: Linting and formatting

This commit is contained in:
Jakub Žitník 2025-03-07 11:36:43 +01:00
parent 05e76bd0d0
commit ee12ccb6d7
Signed by: jzitnik
GPG Key ID: C577A802A6AF4EF3
162 changed files with 1252 additions and 1138 deletions

34
pom.xml
View File

@ -16,6 +16,22 @@
<build>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.25.0</version>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
<configuration>
<configFile>${basedir}/checkstyle.xml</configFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@ -70,6 +86,24 @@
<classpathScope>compile</classpathScope> <!-- This ensures the compiled classes are included -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<configLocation>src/main/resources/config/checkstyle/checkstyle.xml</configLocation>
<failsOnError>true</failsOnError> <!-- Fail build if there are style violations -->
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal> <!-- Run Checkstyle in the validate phase -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -51,7 +51,8 @@ public class Main {
}
try {
customLogicProvider.update(game);
} catch (Exception _) {}
} catch (Exception _) {
}
if ( game.getWindow() == Window.WORLD) {
screenRenderer.render(game);

View File

@ -49,7 +49,8 @@ public class Game {
for (int i = 0; i < world.length; i++) {
for (int j = 0; j < world[i].length; j++) {
for (Block block : world[i][j]) {
if (block.getBlockId().equals("steve") && block.getSpriteState().isPresent() && block.getSpriteState().get() == Steve.SteveState.SECOND) {
if (block.getBlockId().equals("steve") && block.getSpriteState().isPresent()
&& block.getSpriteState().get() == Steve.SteveState.SECOND) {
return new int[] { j, i };
}
}
@ -141,7 +142,8 @@ public class Game {
world[y][x].remove(mob);
} else {
mob.decreaseHp(dealDamage);
mob.setSpriteState(gameStates.dependencies.entityHurtAnimation.get(mob.getBlockId()).setHurtAnimation(true, mob.getSpriteState().get()));
mob.setSpriteState(gameStates.dependencies.entityHurtAnimation.get(mob.getBlockId())
.setHurtAnimation(true, mob.getSpriteState().get()));
}
}
screenRenderer.render(this);
@ -154,7 +156,8 @@ public class Game {
}
for (Block mob : mobs) {
mob.setSpriteState(gameStates.dependencies.entityHurtAnimation.get(mob.getBlockId()).setHurtAnimation(false, mob.getSpriteState().get()));
mob.setSpriteState(gameStates.dependencies.entityHurtAnimation.get(mob.getBlockId())
.setHurtAnimation(false, mob.getSpriteState().get()));
}
screenRenderer.render(this);
}).start();
@ -169,7 +172,8 @@ public class Game {
world[y][x].add(breakingBlock);
screenRenderer.render(this);
double hardness = world[y][x].stream().filter(block -> !block.isGhost()).toList().getFirst().calculateHardness(inventory);
double hardness = world[y][x].stream().filter(block -> !block.isGhost()).toList().getFirst()
.calculateHardness(inventory);
this.mining = true;
@ -211,7 +215,10 @@ public class Game {
}
var toolVariants = block.getToolVariants();
if (inventory.getItemInHand().isPresent() && inventory.getItemInHand().get().getToolVariant().isPresent() && block.getTool().isPresent() && block.getTool().get().equals(inventory.getItemInHand().get().getType()) && toolVariants.contains(inventory.getItemInHand().get().getToolVariant().get())) {
if (inventory.getItemInHand().isPresent()
&& inventory.getItemInHand().get().getToolVariant().isPresent() && block.getTool().isPresent()
&& block.getTool().get().equals(inventory.getItemInHand().get().getType())
&& toolVariants.contains(inventory.getItemInHand().get().getToolVariant().get())) {
block.getDrops().forEach(inventory::addItem);
}
}
@ -224,7 +231,8 @@ public class Game {
}
}
CustomPlaceHandler customPlaceHandler = gameStates.dependencies.placeHandler.get(blocks.stream().filter(Block::isMineable).toList().getFirst().getBlockId());
CustomPlaceHandler customPlaceHandler = gameStates.dependencies.placeHandler
.get(blocks.stream().filter(Block::isMineable).toList().getFirst().getBlockId());
customPlaceHandler.mine(this, x, y);
inventory.getItemInHand().ifPresent(Item::use);
@ -245,18 +253,16 @@ public class Game {
int distanceX = Math.abs(playerX - x);
int distanceY = Math.abs(playerY - y);
int[] data = ScreenMovingCalculationProvider.calculate(playerX, playerY, terminal.getHeight(), terminal.getWidth(), world[0].length, world.length);
int[] data = ScreenMovingCalculationProvider.calculate(playerX, playerY, terminal.getHeight(),
terminal.getWidth(), world[0].length, world.length);
int startX = data[0];
int endX = data[1];
int startY = data[2];
int endY = data[3];
return
y >= startY && y < endY - 1 && x >= startX && x < endX - 1
&& distanceX <= 5 && distanceY <= 5
&& !(playerX == x && playerY == y)
&& !(playerX == x && playerY - 1 == y)
return y >= startY && y < endY - 1 && x >= startX && x < endX - 1 && distanceX <= 5 && distanceY <= 5
&& !(playerX == x && playerY == y) && !(playerX == x && playerY - 1 == y)
&& blocks.stream().anyMatch(Block::isMineable);
}
@ -271,18 +277,16 @@ public class Game {
int distanceX = Math.abs(playerX - x);
int distanceY = Math.abs(playerY - y);
int[] data = ScreenMovingCalculationProvider.calculate(playerX, playerY, terminal.getHeight(), terminal.getWidth(), world[0].length, world.length);
int[] data = ScreenMovingCalculationProvider.calculate(playerX, playerY, terminal.getHeight(),
terminal.getWidth(), world[0].length, world.length);
int startX = data[0];
int endX = data[1];
int startY = data[2];
int endY = data[3];
return
y >= startY && y < endY - 1 && x >= startX && x < endX - 1
&& distanceX <= 5 && distanceY <= 5
&& !(playerX == x && playerY == y)
&& !(playerX == x && playerY - 1 == y)
return y >= startY && y < endY - 1 && x >= startX && x < endX - 1 && distanceX <= 5 && distanceY <= 5
&& !(playerX == x && playerY == y) && !(playerX == x && playerY - 1 == y)
&& blocks.stream().anyMatch(Block::isMob);
}
@ -340,9 +344,11 @@ public class Game {
}
if (inventory.getItemInHand().isPresent() && inventory.getItemInHand().get().getType() == ItemType.PICKUPER) {
if (gameStates.dependencies.pickupHandlerProvider.get(inventory.getItemInHand().get().getId()).handle(this, x, y)) {
if (gameStates.dependencies.pickupHandlerProvider.get(inventory.getItemInHand().get().getId()).handle(this,
x, y)) {
screenRenderer.render(this);
};
}
;
return;
}

View File

@ -12,127 +12,54 @@ public class SpriteLoader {
// BLOCKS
// Blocks
AIR,
WATER,
LAVA,
DIRT,
GRASS,
STONE,
BEDROCK,
COBBLESTONE,
WOOL,
OAK_LOG,
OAK_LEAF,
OAK_PLANKS,
OAK_DOOR,
AIR, WATER, LAVA, DIRT, GRASS, STONE, BEDROCK, COBBLESTONE, WOOL, OAK_LOG, OAK_LEAF, OAK_PLANKS, OAK_DOOR,
// Ores
COAL_ORE,
IRON_ORE,
GOLD_ORE,
DIAMOND_ORE,
COAL_ORE, IRON_ORE, GOLD_ORE, DIAMOND_ORE,
COAL_BLOCK,
IRON_BLOCK,
GOLD_BLOCK,
DIAMOND_BLOCK,
COAL_BLOCK, IRON_BLOCK, GOLD_BLOCK, DIAMOND_BLOCK,
// Work
FURNACE,
CHEST,
CRAFTING_TABLE,
BED,
FURNACE, CHEST, CRAFTING_TABLE, BED,
// ENTITIES
STEVE,
PIG,
SHEEP,
COW,
STEVE, PIG, SHEEP, COW,
// UI
BREAKING,
HEART,
HUNGER,
BREAKING, HEART, HUNGER,
// ITEMS
// Items
ITEM_STICK,
ITEM_LEATHER,
ITEM_STICK, ITEM_LEATHER,
// Block Items
ITEM_DIRT,
ITEM_OAK_LOG,
ITEM_OAK_PLANKS,
ITEM_COBBLESTONE,
ITEM_STONE,
ITEM_OAK_DOOR,
ITEM_WOOL,
ITEM_DIRT, ITEM_OAK_LOG, ITEM_OAK_PLANKS, ITEM_COBBLESTONE, ITEM_STONE, ITEM_OAK_DOOR, ITEM_WOOL,
// Ore Items
ITEM_COAL_ORE,
ITEM_IRON_ORE,
ITEM_GOLD_ORE,
ITEM_DIAMOND_ORE,
ITEM_COAL_ORE, ITEM_IRON_ORE, ITEM_GOLD_ORE, ITEM_DIAMOND_ORE,
ITEM_COAL_BLOCK,
ITEM_IRON_BLOCK,
ITEM_GOLD_BLOCK,
ITEM_DIAMOND_BLOCK,
ITEM_COAL_BLOCK, ITEM_IRON_BLOCK, ITEM_GOLD_BLOCK, ITEM_DIAMOND_BLOCK,
COAL,
ITEM_IRON_INGOT,
ITEM_GOLD_INGOT,
DIAMOND,
COAL, ITEM_IRON_INGOT, ITEM_GOLD_INGOT, DIAMOND,
// Work Items
ITEM_CRAFTING_TABLE,
ITEM_CHEST,
ITEM_FURNACE,
ITEM_BED,
ITEM_CRAFTING_TABLE, ITEM_CHEST, ITEM_FURNACE, ITEM_BED,
// Tools
WOODEN_SWORD,
WOODEN_PICKAXE,
WOODEN_AXE,
WOODEN_SHOVEL,
WOODEN_HOE,
WOODEN_SWORD, WOODEN_PICKAXE, WOODEN_AXE, WOODEN_SHOVEL, WOODEN_HOE,
STONE_SWORD,
STONE_PICKAXE,
STONE_AXE,
STONE_SHOVEL,
STONE_HOE,
STONE_SWORD, STONE_PICKAXE, STONE_AXE, STONE_SHOVEL, STONE_HOE,
IRON_SWORD,
IRON_PICKAXE,
IRON_AXE,
IRON_SHOVEL,
IRON_HOE,
IRON_SWORD, IRON_PICKAXE, IRON_AXE, IRON_SHOVEL, IRON_HOE,
GOLDEN_SWORD,
GOLDEN_PICKAXE,
GOLDEN_AXE,
GOLDEN_SHOVEL,
GOLDEN_HOE,
GOLDEN_SWORD, GOLDEN_PICKAXE, GOLDEN_AXE, GOLDEN_SHOVEL, GOLDEN_HOE,
DIAMOND_SWORD,
DIAMOND_PICKAXE,
DIAMOND_AXE,
DIAMOND_SHOVEL,
DIAMOND_HOE,
DIAMOND_SWORD, DIAMOND_PICKAXE, DIAMOND_AXE, DIAMOND_SHOVEL, DIAMOND_HOE,
BUCKET,
WATER_BUCKET,
LAVA_BUCKET,
MILK_BUCKET,
BUCKET, WATER_BUCKET, LAVA_BUCKET, MILK_BUCKET,
// Food
ITEM_PORKCHOP,
ITEM_COOKED_PORKCHOP,
ITEM_MUTTON,
ITEM_COOKED_MUTTON,
ITEM_BEEF,
ITEM_STEAK,
ITEM_PORKCHOP, ITEM_COOKED_PORKCHOP, ITEM_MUTTON, ITEM_COOKED_MUTTON, ITEM_BEEF, ITEM_STEAK,
}
public static final HashMap<SPRITES, Sprite> SPRITES_MAP = new HashMap<>();

View File

@ -9,5 +9,6 @@ import java.lang.annotation.ElementType;
@Target(ElementType.TYPE)
public @interface BlockRegistry {
String value();
String drops() default "";
}

View File

@ -6,7 +6,10 @@ import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface CraftingRecipeRegistry {
String[] recipe();
String result();
int amount();
boolean usingRegex() default false;
}

View File

@ -9,5 +9,6 @@ import java.lang.annotation.ElementType;
@Target(ElementType.TYPE)
public @interface ItemRegistry {
String value();
String block() default "";
}

View File

@ -70,13 +70,16 @@ public class Chest implements RightClickHandler {
int heightPixels = ROW_AMOUNT * (CELL_HEIGHT) - 10;
int moveLeft = Math.max(0, (terminal.getWidth() / 2) - (widthPixels / 2));
if (x > moveLeft && x <= moveLeft + widthPixels && y > 0 && y <= heightPixels && mouseEvent.getType() == MouseEvent.Type.Pressed) {
if (mouseEvent.getType() != MouseEvent.Type.Pressed) return;
if (x > moveLeft && x <= moveLeft + widthPixels && y > 0 && y <= heightPixels
&& mouseEvent.getType() == MouseEvent.Type.Pressed) {
if (mouseEvent.getType() != MouseEvent.Type.Pressed)
return;
int blockX = (x - moveLeft) / 52;
int blockY = y / 26;
InventoryClickHandler.handleItemClick(mouseEvent, game.getInventory(), items, blockY * COLUMN_AMOUNT + blockX, 50, Optional.of(items));
InventoryClickHandler.handleItemClick(mouseEvent, game.getInventory(), items,
blockY * COLUMN_AMOUNT + blockX, 50, Optional.of(items));
screenRenderer.render(game);
@ -84,7 +87,8 @@ public class Chest implements RightClickHandler {
}
// TODO: Why I need to add 20 here. Like wtf
InventoryClickHandler.click(mouseEvent, terminal, screenRenderer, game, Optional.of(size + 20), Optional.of(items));
InventoryClickHandler.click(mouseEvent, terminal, screenRenderer, game, Optional.of(size + 20),
Optional.of(items));
}
public void breakBlock(Game game) {

View File

@ -43,12 +43,13 @@ public class Furnace implements RightClickHandler {
List<String> sprites = game.getInventory().getSprites(items, spriteList, inventory.getSelectedItemInv() - 50);
String[] outputSprite = outputItem == null ? null : SpriteCombiner.combineTwoSprites(
outputItem.getItem().getFirst().getSpriteState().isPresent() ?
spriteList.getSprite(outputItem.getItem().getFirst().getSprite()).getSprite(outputItem.getItem().getFirst().getSpriteState().get()) :
spriteList.getSprite(outputItem.getItem().getFirst().getSprite()).getSprite() ,
Numbers.getNumberSprite(outputItem.getAmount())
).split("\n");
String[] outputSprite = outputItem == null ? null
: SpriteCombiner.combineTwoSprites(
outputItem.getItem().getFirst().getSpriteState().isPresent()
? spriteList.getSprite(outputItem.getItem().getFirst().getSprite())
.getSprite(outputItem.getItem().getFirst().getSpriteState().get())
: spriteList.getSprite(outputItem.getItem().getFirst().getSprite()).getSprite(),
Numbers.getNumberSprite(outputItem.getAmount())).split("\n");
for (int j = 0; j < CELL_HEIGHT; j++) {
buffer.append("\033[0m").append(" ".repeat(moveLeft));
@ -122,7 +123,8 @@ public class Furnace implements RightClickHandler {
int widthPixels = COLUMN_AMOUNT * (CELL_WIDTH + BORDER_SIZE) + BORDER_SIZE;
int moveLeft = Math.max(0, (terminal.getWidth() / 2) - (widthPixels / 2));
if (x > moveLeft && x <= moveLeft + CELL_WIDTH + BORDER_SIZE && y > 0 && y < CELL_HEIGHT && mouseEvent.getType() == MouseEvent.Type.Pressed) {
if (x > moveLeft && x <= moveLeft + CELL_WIDTH + BORDER_SIZE && y > 0 && y < CELL_HEIGHT
&& mouseEvent.getType() == MouseEvent.Type.Pressed) {
InventoryItem selectedItem = game.getInventory().getSelectedItemNo(Optional.of(items));
if (selectedItem != null && !Smelting.smeltingList.containsKey(selectedItem.getItem().getFirst().getId())) {
return;
@ -132,10 +134,13 @@ public class Furnace implements RightClickHandler {
screenRenderer.render(game);
checkSmelt(game, screenRenderer);
} else if (x > moveLeft + (2 * (2 * BORDER_SIZE + CELL_WIDTH)) && x <= moveLeft + (3 * (2 * BORDER_SIZE + CELL_WIDTH)) && y > CELL_HEIGHT && y <= 2*CELL_HEIGHT && mouseEvent.getType() == MouseEvent.Type.Pressed) {
} else if (x > moveLeft + (2 * (2 * BORDER_SIZE + CELL_WIDTH))
&& x <= moveLeft + (3 * (2 * BORDER_SIZE + CELL_WIDTH)) && y > CELL_HEIGHT && y <= 2 * CELL_HEIGHT
&& mouseEvent.getType() == MouseEvent.Type.Pressed) {
pickup(game);
screenRenderer.render(game);
} else if (x > moveLeft && x <= moveLeft + CELL_WIDTH + BORDER_SIZE && y > 2 * CELL_HEIGHT && y < 3 * CELL_HEIGHT && mouseEvent.getType() == MouseEvent.Type.Pressed) {
} else if (x > moveLeft && x <= moveLeft + CELL_WIDTH + BORDER_SIZE && y > 2 * CELL_HEIGHT
&& y < 3 * CELL_HEIGHT && mouseEvent.getType() == MouseEvent.Type.Pressed) {
InventoryItem selectedItem = game.getInventory().getSelectedItemNo(Optional.of(items));
if (selectedItem != null && !Smelting.fuelList.containsKey(selectedItem.getItem().getFirst().getId())) {
return;
@ -146,13 +151,15 @@ public class Furnace implements RightClickHandler {
screenRenderer.render(game);
checkSmelt(game, screenRenderer);
} else {
InventoryClickHandler.click(mouseEvent, terminal, screenRenderer, game, Optional.of(size + 20), Optional.of(items));
InventoryClickHandler.click(mouseEvent, terminal, screenRenderer, game, Optional.of(size + 20),
Optional.of(items));
}
}
public void setSmelting(boolean smelting) {
this.smelting = smelting;
this.block.setSpriteState(smelting ? cz.jzitnik.game.sprites.Furnace.FurnaceState.ON : cz.jzitnik.game.sprites.Furnace.FurnaceState.OFF);
this.block.setSpriteState(smelting ? cz.jzitnik.game.sprites.Furnace.FurnaceState.ON
: cz.jzitnik.game.sprites.Furnace.FurnaceState.OFF);
}
public void checkSmelt(Game game, ScreenRenderer screenRenderer) {

View File

@ -30,7 +30,6 @@ public class OakDoorData implements RightClickHandler {
var blocks = game.getWorld()[y][x];
var door = blocks.stream().filter(block -> block.getBlockId().equals("oak_door")).toList().getFirst();
switch (door.getSpriteState().get()) {
case OakDoor.OakDoorState.TOP, OakDoor.OakDoorState.TOPCLOSED -> {
var blocks2 = game.getWorld()[y + 1][x];

View File

@ -24,7 +24,8 @@ public class CraftingRecipeList {
String[][] recipeGrid = convertTo2DGrid(annotation.recipe());
recipes.add(new CraftingRecipe(recipeGrid,
() -> new InventoryItem(annotation.amount(), ItemBlockSupplier.getItem(annotation.result())), annotation.usingRegex()));
() -> new InventoryItem(annotation.amount(), ItemBlockSupplier.getItem(annotation.result())),
annotation.usingRegex()));
} catch (Exception e) {
e.printStackTrace();
}
@ -104,7 +105,8 @@ public class CraftingRecipeList {
if (array1[i][j] == null && array2[i][j] != null) {
return false;
}
if (array1[i][j] != null && (usingRegex ? !array2[i][j].matches(array1[i][j]) : !array1[i][j].equals(array2[i][j])) ) {
if (array1[i][j] != null
&& (usingRegex ? !array2[i][j].matches(array1[i][j]) : !array1[i][j].equals(array2[i][j]))) {
return false;
}
}

View File

@ -2,14 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"^.*_wool$", "^.*_wool$", "^.*_wool$",
"^oak_planks$", "^oak_planks$", "^oak_planks$",
"_", "_", "_"
},
result = "bed",
amount = 1,
usingRegex = true
)
public class BedRecipe {}
@CraftingRecipeRegistry(recipe = { "^.*_wool$", "^.*_wool$", "^.*_wool$", "^oak_planks$", "^oak_planks$",
"^oak_planks$", "_", "_", "_" }, result = "bed", amount = 1, usingRegex = true)
public class BedRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"iron_ingot", "_", "iron_ingot",
"_", "iron_ingot", "_",
"_", "_", "_"
},
result = "bucket",
amount = 1
)
public class BucketRecipe {}
@CraftingRecipeRegistry(recipe = { "iron_ingot", "_", "iron_ingot", "_", "iron_ingot", "_", "_", "_",
"_" }, result = "bucket", amount = 1)
public class BucketRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "oak_planks", "oak_planks",
"oak_planks", "_", "oak_planks",
"oak_planks", "oak_planks", "oak_planks"
},
result = "chest",
amount = 1
)
public class ChestRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "oak_planks", "oak_planks", "oak_planks", "_", "oak_planks",
"oak_planks", "oak_planks", "oak_planks" }, result = "chest", amount = 1)
public class ChestRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"coal", "coal", "coal",
"coal", "coal", "coal",
"coal", "coal", "coal"
},
result = "coal_block",
amount = 1
)
public class CoalBlockRecipe {}
@CraftingRecipeRegistry(recipe = { "coal", "coal", "coal", "coal", "coal", "coal", "coal", "coal",
"coal" }, result = "coal_block", amount = 1)
public class CoalBlockRecipe {
}

View File

@ -2,13 +2,6 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"coal_block", "_", "_",
"_", "_", "_",
"_", "_", "_"
},
result = "coal",
amount = 9
)
public class CoalRecipe {}
@CraftingRecipeRegistry(recipe = { "coal_block", "_", "_", "_", "_", "_", "_", "_", "_" }, result = "coal", amount = 9)
public class CoalRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "oak_planks", "_",
"oak_planks", "oak_planks", "_",
"_", "_", "_"
},
result = "crafting_table",
amount = 1
)
public class CraftingTableRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "oak_planks", "_", "oak_planks", "oak_planks", "_", "_", "_",
"_" }, result = "crafting_table", amount = 1)
public class CraftingTableRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "diamond", "diamond",
"_", "stick", "diamond",
"_", "stick", "_"
},
result = "diamond_axe",
amount = 1
)
public class DiamondAxe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "diamond", "diamond", "_", "stick", "diamond", "_", "stick",
"_" }, result = "diamond_axe", amount = 1)
public class DiamondAxe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"diamond", "diamond", "_",
"diamond", "stick", "_",
"_", "stick", "_"
},
result = "diamond_axe",
amount = 1
)
public class DiamondAxeRecipe {}
@CraftingRecipeRegistry(recipe = { "diamond", "diamond", "_", "diamond", "stick", "_", "_", "stick",
"_" }, result = "diamond_axe", amount = 1)
public class DiamondAxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"diamond", "diamond", "diamond",
"diamond", "diamond", "diamond",
"diamond", "diamond", "diamond"
},
result = "diamond_block",
amount = 1
)
public class DiamondBlockRecipe {}
@CraftingRecipeRegistry(recipe = { "diamond", "diamond", "diamond", "diamond", "diamond", "diamond", "diamond",
"diamond", "diamond" }, result = "diamond_block", amount = 1)
public class DiamondBlockRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "diamond", "diamond",
"_", "stick", "_",
"_", "stick", "_"
},
result = "diamond_hoe",
amount = 1
)
public class DiamondHoe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "diamond", "diamond", "_", "stick", "_", "_", "stick",
"_" }, result = "diamond_hoe", amount = 1)
public class DiamondHoe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"diamond", "diamond", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "diamond_hoe",
amount = 1
)
public class DiamondHoeRecipe {}
@CraftingRecipeRegistry(recipe = { "diamond", "diamond", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "diamond_hoe", amount = 1)
public class DiamondHoeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"diamond", "diamond", "diamond",
"_", "stick", "_",
"_", "stick", "_"
},
result = "diamond_pickaxe",
amount = 1
)
public class DiamondPickaxeRecipe {}
@CraftingRecipeRegistry(recipe = { "diamond", "diamond", "diamond", "_", "stick", "_", "_", "stick",
"_" }, result = "diamond_pickaxe", amount = 1)
public class DiamondPickaxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"diamond_block", "_", "_",
"_", "_", "_",
"_", "_", "_"
},
result = "diamond",
amount = 9
)
public class DiamondRecipe {}
@CraftingRecipeRegistry(recipe = { "diamond_block", "_", "_", "_", "_", "_", "_", "_",
"_" }, result = "diamond", amount = 9)
public class DiamondRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "diamond", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "diamond_shovel",
amount = 1
)
public class DiamondShovelRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "diamond", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "diamond_shovel", amount = 1)
public class DiamondShovelRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "diamond", "_",
"_", "diamond", "_",
"_", "stick", "_"
},
result = "diamond_sword",
amount = 1
)
public class DiamondSwordRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "diamond", "_", "_", "diamond", "_", "_", "stick",
"_" }, result = "diamond_sword", amount = 1)
public class DiamondSwordRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"cobblestone", "cobblestone", "cobblestone",
"cobblestone", "_", "cobblestone",
"cobblestone", "cobblestone", "cobblestone"
},
result = "furnace",
amount = 1
)
public class FurnaceRecipe {}
@CraftingRecipeRegistry(recipe = { "cobblestone", "cobblestone", "cobblestone", "cobblestone", "_", "cobblestone",
"cobblestone", "cobblestone", "cobblestone" }, result = "furnace", amount = 1)
public class FurnaceRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"gold_ingot", "gold_ingot", "gold_ingot",
"gold_ingot", "gold_ingot", "gold_ingot",
"gold_ingot", "gold_ingot", "gold_ingot"
},
result = "gold_block",
amount = 1
)
public class GoldBlockRecipe {}
@CraftingRecipeRegistry(recipe = { "gold_ingot", "gold_ingot", "gold_ingot", "gold_ingot", "gold_ingot", "gold_ingot",
"gold_ingot", "gold_ingot", "gold_ingot" }, result = "gold_block", amount = 1)
public class GoldBlockRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"gold_block", "_", "_",
"_", "_", "_",
"_", "_", "_"
},
result = "gold_ingot",
amount = 9
)
public class GoldIngotRecipe {}
@CraftingRecipeRegistry(recipe = { "gold_block", "_", "_", "_", "_", "_", "_", "_",
"_" }, result = "gold_ingot", amount = 9)
public class GoldIngotRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "gold_ingot", "gold_ingot",
"_", "stick", "gold_ingot",
"_", "stick", "_"
},
result = "golden_axe",
amount = 1
)
public class GoldenAxe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "gold_ingot", "gold_ingot", "_", "stick", "gold_ingot", "_", "stick",
"_" }, result = "golden_axe", amount = 1)
public class GoldenAxe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"gold_ingot", "gold_ingot", "_",
"gold_ingot", "stick", "_",
"_", "stick", "_"
},
result = "golden_axe",
amount = 1
)
public class GoldenAxeRecipe {}
@CraftingRecipeRegistry(recipe = { "gold_ingot", "gold_ingot", "_", "gold_ingot", "stick", "_", "_", "stick",
"_" }, result = "golden_axe", amount = 1)
public class GoldenAxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "gold_ingot", "gold_ingot",
"_", "stick", "_",
"_", "stick", "_"
},
result = "golden_hoe",
amount = 1
)
public class GoldenHoe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "gold_ingot", "gold_ingot", "_", "stick", "_", "_", "stick",
"_" }, result = "golden_hoe", amount = 1)
public class GoldenHoe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"gold_ingot", "gold_ingot", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "golden_hoe",
amount = 1
)
public class GoldenHoeRecipe {}
@CraftingRecipeRegistry(recipe = { "gold_ingot", "gold_ingot", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "golden_hoe", amount = 1)
public class GoldenHoeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"gold_ingot", "gold_ingot", "gold_ingot",
"_", "stick", "_",
"_", "stick", "_"
},
result = "golden_pickaxe",
amount = 1
)
public class GoldenPickaxeRecipe {}
@CraftingRecipeRegistry(recipe = { "gold_ingot", "gold_ingot", "gold_ingot", "_", "stick", "_", "_", "stick",
"_" }, result = "golden_pickaxe", amount = 1)
public class GoldenPickaxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "gold_ingot", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "golden_shovel",
amount = 1
)
public class GoldenShovelRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "gold_ingot", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "golden_shovel", amount = 1)
public class GoldenShovelRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "gold_ingot", "_",
"_", "gold_ingot", "_",
"_", "stick", "_"
},
result = "golden_sword",
amount = 1
)
public class GoldenSwordRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "gold_ingot", "_", "_", "gold_ingot", "_", "_", "stick",
"_" }, result = "golden_sword", amount = 1)
public class GoldenSwordRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "iron_ingot", "iron_ingot",
"_", "stick", "iron_ingot",
"_", "stick", "_"
},
result = "iron_axe",
amount = 1
)
public class IronAxe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "iron_ingot", "iron_ingot", "_", "stick", "iron_ingot", "_", "stick",
"_" }, result = "iron_axe", amount = 1)
public class IronAxe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"iron_ingot", "iron_ingot", "_",
"iron_ingot", "stick", "_",
"_", "stick", "_"
},
result = "iron_axe",
amount = 1
)
public class IronAxeRecipe {}
@CraftingRecipeRegistry(recipe = { "iron_ingot", "iron_ingot", "_", "iron_ingot", "stick", "_", "_", "stick",
"_" }, result = "iron_axe", amount = 1)
public class IronAxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"iron_ingot", "iron_ingot", "iron_ingot",
"iron_ingot", "iron_ingot", "iron_ingot",
"iron_ingot", "iron_ingot", "iron_ingot"
},
result = "iron_block",
amount = 1
)
public class IronBlockRecipe {}
@CraftingRecipeRegistry(recipe = { "iron_ingot", "iron_ingot", "iron_ingot", "iron_ingot", "iron_ingot", "iron_ingot",
"iron_ingot", "iron_ingot", "iron_ingot" }, result = "iron_block", amount = 1)
public class IronBlockRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "iron_ingot", "iron_ingot",
"_", "stick", "_",
"_", "stick", "_"
},
result = "iron_hoe",
amount = 1
)
public class IronHoe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "iron_ingot", "iron_ingot", "_", "stick", "_", "_", "stick",
"_" }, result = "iron_hoe", amount = 1)
public class IronHoe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"iron_ingot", "iron_ingot", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "iron_hoe",
amount = 1
)
public class IronHoeRecipe {}
@CraftingRecipeRegistry(recipe = { "iron_ingot", "iron_ingot", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "iron_hoe", amount = 1)
public class IronHoeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"iron_block", "_", "_",
"_", "_", "_",
"_", "_", "_"
},
result = "iron_ingot",
amount = 9
)
public class IronIngotRecipe {}
@CraftingRecipeRegistry(recipe = { "iron_block", "_", "_", "_", "_", "_", "_", "_",
"_" }, result = "iron_ingot", amount = 9)
public class IronIngotRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"iron_ingot", "iron_ingot", "iron_ingot",
"_", "stick", "_",
"_", "stick", "_"
},
result = "iron_pickaxe",
amount = 1
)
public class IronPickaxeRecipe {}
@CraftingRecipeRegistry(recipe = { "iron_ingot", "iron_ingot", "iron_ingot", "_", "stick", "_", "_", "stick",
"_" }, result = "iron_pickaxe", amount = 1)
public class IronPickaxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "iron_shovel", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "iron_shovel",
amount = 1
)
public class IronShovelRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "iron_shovel", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "iron_shovel", amount = 1)
public class IronShovelRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "iron_ingot", "_",
"_", "iron_ingot", "_",
"_", "stick", "_"
},
result = "iron_sword",
amount = 1
)
public class IronSwordRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "iron_ingot", "_", "_", "iron_ingot", "_", "_", "stick",
"_" }, result = "iron_sword", amount = 1)
public class IronSwordRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "oak_planks", "_",
"oak_planks", "oak_planks", "_",
"oak_planks", "oak_planks", "_"
},
result = "oak_door",
amount = 3
)
public class OakDoorRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "oak_planks", "_", "oak_planks", "oak_planks", "_", "oak_planks",
"oak_planks", "_" }, result = "oak_door", amount = 3)
public class OakDoorRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_log", "_", "_",
"_", "_", "_",
"_", "_", "_"
},
result = "oak_planks",
amount = 4
)
public class OakPlanksRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_log", "_", "_", "_", "_", "_", "_", "_",
"_" }, result = "oak_planks", amount = 4)
public class OakPlanksRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "_", "_",
"oak_planks", "_", "_",
"_", "_", "_"
},
result = "stick",
amount = 4
)
public class StickRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "_", "_", "oak_planks", "_", "_", "_", "_",
"_" }, result = "stick", amount = 4)
public class StickRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "cobblestone", "cobblestone",
"_", "stick", "cobblestone",
"_", "stick", "_"
},
result = "stone_pickaxe",
amount = 1
)
public class StoneAxe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "cobblestone", "cobblestone", "_", "stick", "cobblestone", "_", "stick",
"_" }, result = "stone_pickaxe", amount = 1)
public class StoneAxe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"cobblestone", "cobblestone", "_",
"cobblestone", "stick", "_",
"_", "stick", "_"
},
result = "stone_pickaxe",
amount = 1
)
public class StoneAxeRecipe {}
@CraftingRecipeRegistry(recipe = { "cobblestone", "cobblestone", "_", "cobblestone", "stick", "_", "_", "stick",
"_" }, result = "stone_pickaxe", amount = 1)
public class StoneAxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "stone", "stone",
"_", "stick", "_",
"_", "stick", "_"
},
result = "stone_hoe",
amount = 1
)
public class StoneHoe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "stone", "stone", "_", "stick", "_", "_", "stick",
"_" }, result = "stone_hoe", amount = 1)
public class StoneHoe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"stone", "stone", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "stone_hoe",
amount = 1
)
public class StoneHoeRecipe {}
@CraftingRecipeRegistry(recipe = { "stone", "stone", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "stone_hoe", amount = 1)
public class StoneHoeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"cobblestone", "cobblestone", "cobblestone",
"_", "stick", "_",
"_", "stick", "_"
},
result = "stone_pickaxe",
amount = 1
)
public class StonePickaxeRecipe {}
@CraftingRecipeRegistry(recipe = { "cobblestone", "cobblestone", "cobblestone", "_", "stick", "_", "_", "stick",
"_" }, result = "stone_pickaxe", amount = 1)
public class StonePickaxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "cobblestone", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "stone_shovel",
amount = 1
)
public class StoneShovelRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "cobblestone", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "stone_shovel", amount = 1)
public class StoneShovelRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "cobblestone", "_",
"_", "cobblestone", "_",
"_", "stick", "_"
},
result = "stone_sword",
amount = 1
)
public class StoneSwordRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "cobblestone", "_", "_", "cobblestone", "_", "_", "stick",
"_" }, result = "stone_sword", amount = 1)
public class StoneSwordRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "oak_planks", "oak_planks",
"_", "stick", "oak_planks",
"_", "stick", "_"
},
result = "wooden_axe",
amount = 1
)
public class WoodenAxe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "oak_planks", "oak_planks", "_", "stick", "oak_planks", "_", "stick",
"_" }, result = "wooden_axe", amount = 1)
public class WoodenAxe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "oak_planks", "_",
"oak_planks", "stick", "_",
"_", "stick", "_"
},
result = "wooden_axe",
amount = 1
)
public class WoodenAxeRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "oak_planks", "_", "oak_planks", "stick", "_", "_", "stick",
"_" }, result = "wooden_axe", amount = 1)
public class WoodenAxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "oak_planks", "oak_planks",
"_", "stick", "_",
"_", "stick", "_"
},
result = "wooden_hoe",
amount = 1
)
public class WoodenHoe2Recipe {}
@CraftingRecipeRegistry(recipe = { "_", "oak_planks", "oak_planks", "_", "stick", "_", "_", "stick",
"_" }, result = "wooden_hoe", amount = 1)
public class WoodenHoe2Recipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "oak_planks", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "wooden_hoe",
amount = 1
)
public class WoodenHoeRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "oak_planks", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "wooden_hoe", amount = 1)
public class WoodenHoeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"oak_planks", "oak_planks", "oak_planks",
"_", "stick", "_",
"_", "stick", "_"
},
result = "wooden_pickaxe",
amount = 1
)
public class WoodenPickaxeRecipe {}
@CraftingRecipeRegistry(recipe = { "oak_planks", "oak_planks", "oak_planks", "_", "stick", "_", "_", "stick",
"_" }, result = "wooden_pickaxe", amount = 1)
public class WoodenPickaxeRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "oak_planks", "_",
"_", "stick", "_",
"_", "stick", "_"
},
result = "wooden_shovel",
amount = 1
)
public class WoodenShovelRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "oak_planks", "_", "_", "stick", "_", "_", "stick",
"_" }, result = "wooden_shovel", amount = 1)
public class WoodenShovelRecipe {
}

View File

@ -2,13 +2,7 @@ package cz.jzitnik.game.crafting.recipes;
import cz.jzitnik.game.annotations.CraftingRecipeRegistry;
@CraftingRecipeRegistry(
recipe = {
"_", "oak_planks", "_",
"_", "oak_planks", "_",
"_", "stick", "_"
},
result = "wooden_sword",
amount = 1
)
public class WoodenSwordRecipe {}
@CraftingRecipeRegistry(recipe = { "_", "oak_planks", "_", "_", "oak_planks", "_", "_", "stick",
"_" }, result = "wooden_sword", amount = 1)
public class WoodenSwordRecipe {
}

View File

@ -47,7 +47,8 @@ public class Block {
this.hardness = hardness;
}
public Block(String blockId, SpriteLoader.SPRITES sprite, int hardness, ItemType tool, List<ToolVariant> toolVariants) {
public Block(String blockId, SpriteLoader.SPRITES sprite, int hardness, ItemType tool,
List<ToolVariant> toolVariants) {
this.blockId = blockId;
this.sprite = sprite;
this.hardness = hardness;
@ -55,7 +56,8 @@ public class Block {
this.toolVariants = toolVariants;
}
public Block(String blockId, SpriteLoader.SPRITES sprite, int hardness, ItemType tool, List<ToolVariant> toolVariants, Object data) {
public Block(String blockId, SpriteLoader.SPRITES sprite, int hardness, ItemType tool,
List<ToolVariant> toolVariants, Object data) {
this.blockId = blockId;
this.sprite = sprite;
this.hardness = hardness;
@ -70,7 +72,8 @@ public class Block {
public double calculateHardness(Inventory inventory) {
double holdingDecrease = 0;
if (inventory.getItemInHand().isPresent() && tool.isPresent() && inventory.getItemInHand().get().getType().equals(tool.get())) {
if (inventory.getItemInHand().isPresent() && tool.isPresent()
&& inventory.getItemInHand().get().getType().equals(tool.get())) {
holdingDecrease = inventory.getItemInHand().get().getMiningDecrease();
}

View File

@ -26,7 +26,8 @@ public class Item {
private int dealDamage = 1;
private Optional<Block> block = Optional.empty();
public Item(String id, String name, ItemType type, SpriteLoader.SPRITES sprite, ToolVariant toolVariant, int durability, boolean stackable, int dealDamage) {
public Item(String id, String name, ItemType type, SpriteLoader.SPRITES sprite, ToolVariant toolVariant,
int durability, boolean stackable, int dealDamage) {
this.id = id;
this.name = name;
this.type = type;
@ -37,7 +38,8 @@ public class Item {
this.dealDamage = dealDamage;
}
public Item(String id, String name, ItemType type, SpriteLoader.SPRITES sprite, ToolVariant toolVariant, double miningDecrease, int durability, boolean stackable) {
public Item(String id, String name, ItemType type, SpriteLoader.SPRITES sprite, ToolVariant toolVariant,
double miningDecrease, int durability, boolean stackable) {
this.id = id;
this.name = name;
this.type = type;
@ -77,8 +79,10 @@ public class Item {
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Item item = (Item) o;
return name.equals(item.name);

View File

@ -66,7 +66,8 @@ public class ItemBlockSupplier {
ItemRegistry annotation = clazz.getAnnotation(ItemRegistry.class);
registeredItems.put(annotation.value(), itemInstance);
blockList.put(annotation.value(), annotation.block().isEmpty() ? annotation.value() : annotation.block());
blockList.put(annotation.value(),
annotation.block().isEmpty() ? annotation.value() : annotation.block());
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -1,14 +1,5 @@
package cz.jzitnik.game.entities.items;
public enum ItemType {
PICKAXE,
SHOVEL,
AXE,
SHEARS,
BLOCK,
FOOD,
USELESS_ITEM,
HOE,
SWORD,
PICKUPER
PICKAXE, SHOVEL, AXE, SHEARS, BLOCK, FOOD, USELESS_ITEM, HOE, SWORD, PICKUPER
}

View File

@ -1,9 +1,5 @@
package cz.jzitnik.game.entities.items;
public enum ToolVariant {
WOODEN,
STONE,
IRON,
GOLDEN,
DIAMOND,
WOODEN, STONE, IRON, GOLDEN, DIAMOND,
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("coal_block")
public class CoalBlock extends Block {
public CoalBlock() {
super("coal_block", SpriteLoader.SPRITES.COAL_BLOCK, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("coal_block", SpriteLoader.SPRITES.COAL_BLOCK, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("coal_ore")
public class CoalOreBlock extends Block {
public CoalOreBlock() {
super("coal_ore", SpriteLoader.SPRITES.COAL_ORE, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("coal_ore", SpriteLoader.SPRITES.COAL_ORE, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("cobblestone")
public class CobblestoneBlock extends Block {
public CobblestoneBlock() {
super("cobblestone", SpriteLoader.SPRITES.COBBLESTONE, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("cobblestone", SpriteLoader.SPRITES.COBBLESTONE, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("diamond_block")
public class DiamondBlock extends Block {
public DiamondBlock() {
super("diamond_block", SpriteLoader.SPRITES.DIAMOND_BLOCK, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("diamond_block", SpriteLoader.SPRITES.DIAMOND_BLOCK, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("diamond_ore")
public class DiamondOreBlock extends Block {
public DiamondOreBlock() {
super("diamond_ore", SpriteLoader.SPRITES.DIAMOND_ORE, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("diamond_ore", SpriteLoader.SPRITES.DIAMOND_ORE, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -12,7 +12,8 @@ import java.util.Arrays;
@BlockRegistry("furnace")
public class FurnaceBlock extends Block {
public FurnaceBlock() {
super("furnace", SpriteLoader.SPRITES.FURNACE, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("furnace", SpriteLoader.SPRITES.FURNACE, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
setData(new Furnace(this));
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("gold_block")
public class GoldBlock extends Block {
public GoldBlock() {
super("gold_block", SpriteLoader.SPRITES.GOLD_BLOCK, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("gold_block", SpriteLoader.SPRITES.GOLD_BLOCK, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("gold_ore")
public class GoldOreBlock extends Block {
public GoldOreBlock() {
super("gold_ore", SpriteLoader.SPRITES.GOLD_BLOCK, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("gold_ore", SpriteLoader.SPRITES.GOLD_BLOCK, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("iron_block")
public class IronBlock extends Block {
public IronBlock() {
super("iron_block", SpriteLoader.SPRITES.IRON_BLOCK, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("iron_block", SpriteLoader.SPRITES.IRON_BLOCK, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -11,6 +11,7 @@ import java.util.Arrays;
@BlockRegistry("iron_ore")
public class IronOreBlock extends Block {
public IronOreBlock() {
super("iron_ore", SpriteLoader.SPRITES.IRON_ORE, 15, ItemType.PICKAXE, Arrays.stream(ToolVariant.values()).toList());
super("iron_ore", SpriteLoader.SPRITES.IRON_ORE, 15, ItemType.PICKAXE,
Arrays.stream(ToolVariant.values()).toList());
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("diamond_axe")
public class DiamondAxe extends Item {
public DiamondAxe() {
super("diamond_axe", "Diamond axe", ItemType.AXE, SpriteLoader.SPRITES.DIAMOND_AXE, ToolVariant.DIAMOND, 2, 1561, false);
super("diamond_axe", "Diamond axe", ItemType.AXE, SpriteLoader.SPRITES.DIAMOND_AXE, ToolVariant.DIAMOND, 2,
1561, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("diamond_hoe")
public class DiamondHoe extends Item {
public DiamondHoe() {
super("diamond_hoe", "Diamond hoe", ItemType.HOE, SpriteLoader.SPRITES.DIAMOND_HOE, ToolVariant.DIAMOND, 0, 1561, false);
super("diamond_hoe", "Diamond hoe", ItemType.HOE, SpriteLoader.SPRITES.DIAMOND_HOE, ToolVariant.DIAMOND, 0,
1561, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("diamond_pickaxe")
public class DiamondPickaxe extends Item {
public DiamondPickaxe() {
super("diamond_pickaxe", "Diamond pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.DIAMOND_PICKAXE, ToolVariant.DIAMOND, 14, 1561, false);
super("diamond_pickaxe", "Diamond pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.DIAMOND_PICKAXE,
ToolVariant.DIAMOND, 14, 1561, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("diamond_shovel")
public class DiamondShovel extends Item {
public DiamondShovel() {
super("diamond_shovel", "Diamond shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.DIAMOND_SHOVEL, ToolVariant.DIAMOND, 0.5, 1561, false);
super("diamond_shovel", "Diamond shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.DIAMOND_SHOVEL,
ToolVariant.DIAMOND, 0.5, 1561, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("diamond_sword")
public class DiamondSword extends Item {
public DiamondSword() {
super("diamond_sword", "Diamond sword", ItemType.SWORD, SpriteLoader.SPRITES.DIAMOND_SWORD, ToolVariant.DIAMOND, 1562, false, 4);
super("diamond_sword", "Diamond sword", ItemType.SWORD, SpriteLoader.SPRITES.DIAMOND_SWORD, ToolVariant.DIAMOND,
1562, false, 4);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("golden_axe")
public class GoldenAxe extends Item {
public GoldenAxe() {
super("golden_axe", "Golden axe", ItemType.AXE, SpriteLoader.SPRITES.GOLDEN_AXE, ToolVariant.GOLDEN, 2.25, 32, false);
super("golden_axe", "Golden axe", ItemType.AXE, SpriteLoader.SPRITES.GOLDEN_AXE, ToolVariant.GOLDEN, 2.25, 32,
false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("golden_hoe")
public class GoldenHoe extends Item {
public GoldenHoe() {
super("golden_hoe", "Golden hoe", ItemType.HOE, SpriteLoader.SPRITES.GOLDEN_HOE, ToolVariant.GOLDEN, 0, 32, false);
super("golden_hoe", "Golden hoe", ItemType.HOE, SpriteLoader.SPRITES.GOLDEN_HOE, ToolVariant.GOLDEN, 0, 32,
false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("golden_pickaxe")
public class GoldenPickaxe extends Item {
public GoldenPickaxe() {
super("golden_pickaxe", "Golden pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.GOLDEN_PICKAXE, ToolVariant.GOLDEN, 14.5, 32, false);
super("golden_pickaxe", "Golden pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.GOLDEN_PICKAXE,
ToolVariant.GOLDEN, 14.5, 32, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("golden_shovel")
public class GoldenShovel extends Item {
public GoldenShovel() {
super("golden_shovel", "Golden shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.GOLDEN_SHOVEL, ToolVariant.GOLDEN, 0.625, 32, false);
super("golden_shovel", "Golden shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.GOLDEN_SHOVEL, ToolVariant.GOLDEN,
0.625, 32, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("golden_sword")
public class GoldenSword extends Item {
public GoldenSword() {
super("golden_sword", "Golden sword", ItemType.SWORD, SpriteLoader.SPRITES.GOLDEN_SWORD, ToolVariant.GOLDEN, 32, false, 2);
super("golden_sword", "Golden sword", ItemType.SWORD, SpriteLoader.SPRITES.GOLDEN_SWORD, ToolVariant.GOLDEN, 32,
false, 2);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@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);
super("iron_pickaxe", "Iron pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.IRON_PICKAXE, ToolVariant.IRON,
13.5, 250, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("iron_shovel")
public class IronShovel extends Item {
public IronShovel() {
super("iron_shovel", "Iron shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.IRON_SHOVEL, ToolVariant.IRON, 0.375, 250, false);
super("iron_shovel", "Iron shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.IRON_SHOVEL, ToolVariant.IRON, 0.375,
250, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("iron_sword")
public class IronSword extends Item {
public IronSword() {
super("iron_sword", "Iron sword", ItemType.SWORD, SpriteLoader.SPRITES.IRON_SWORD, ToolVariant.IRON, 250, false, 3);
super("iron_sword", "Iron sword", ItemType.SWORD, SpriteLoader.SPRITES.IRON_SWORD, ToolVariant.IRON, 250, false,
3);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("stone_pickaxe")
public class StonePickaxeItem extends Item {
public StonePickaxeItem() {
super("stone_pickaxe", "Stone pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.STONE_PICKAXE, ToolVariant.STONE, 12.5, 132, false);
super("stone_pickaxe", "Stone pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.STONE_PICKAXE, ToolVariant.STONE,
12.5, 132, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("stone_shovel")
public class StoneShovelItem extends Item {
public StoneShovelItem() {
super("stone_shovel", "Stone shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.STONE_SHOVEL, ToolVariant.STONE, 0.5, 132, false);
super("stone_shovel", "Stone shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.STONE_SHOVEL, ToolVariant.STONE,
0.5, 132, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("stone_sword")
public class StoneSword extends Item {
public StoneSword() {
super("stone_sword", "Stone sword", ItemType.SWORD, SpriteLoader.SPRITES.STONE_SWORD, ToolVariant.STONE, 131, false, 3);
super("stone_sword", "Stone sword", ItemType.SWORD, SpriteLoader.SPRITES.STONE_SWORD, ToolVariant.STONE, 131,
false, 3);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("wooden_axe")
public class WoodenAxeItem extends Item {
public WoodenAxeItem() {
super("wooden_axe", "Wooden axe", ItemType.AXE, SpriteLoader.SPRITES.WOODEN_AXE, ToolVariant.WOODEN, 0.5, 59, false);
super("wooden_axe", "Wooden axe", ItemType.AXE, SpriteLoader.SPRITES.WOODEN_AXE, ToolVariant.WOODEN, 0.5, 59,
false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("wooden_hoe")
public class WoodenHoe extends Item {
public WoodenHoe() {
super("wooden_hoe", "Wooden hoe", ItemType.HOE, SpriteLoader.SPRITES.WOODEN_HOE, ToolVariant.WOODEN, 0, 59, false);
super("wooden_hoe", "Wooden hoe", ItemType.HOE, SpriteLoader.SPRITES.WOODEN_HOE, ToolVariant.WOODEN, 0, 59,
false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("wooden_pickaxe")
public class WoodenPickaxeItem extends Item {
public WoodenPickaxeItem() {
super("wooden_pickaxe", "Wooden pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.WOODEN_PICKAXE, ToolVariant.WOODEN, 12, 59, false);
super("wooden_pickaxe", "Wooden pickaxe", ItemType.PICKAXE, SpriteLoader.SPRITES.WOODEN_PICKAXE,
ToolVariant.WOODEN, 12, 59, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("wooden_shovel")
public class WoodenShovelItem extends Item {
public WoodenShovelItem() {
super("wooden_shovel", "Wooden shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.WOODEN_SHOVEL, ToolVariant.WOODEN, 0.3, 59, false);
super("wooden_shovel", "Wooden shovel", ItemType.SHOVEL, SpriteLoader.SPRITES.WOODEN_SHOVEL, ToolVariant.WOODEN,
0.3, 59, false);
}
}

View File

@ -9,6 +9,7 @@ import cz.jzitnik.game.entities.items.ToolVariant;
@ItemRegistry("wooden_sword")
public class WoodenSword extends Item {
public WoodenSword() {
super("wooden_sword", "Wooden sword", ItemType.SWORD, SpriteLoader.SPRITES.WOODEN_SWORD, ToolVariant.WOODEN, 59, false, 2);
super("wooden_sword", "Wooden sword", ItemType.SWORD, SpriteLoader.SPRITES.WOODEN_SWORD, ToolVariant.WOODEN, 59,
false, 2);
}
}

View File

@ -95,7 +95,8 @@ public class Generation {
for (int i = 10; i < 502; i += random.nextInt(20) + 20) {
int treeBase = terrainHeight[i];
if (treeBase - 3 < 0) continue;
if (treeBase - 3 < 0)
continue;
for (int j = 0; j < 3; j++) {
if (treeBase - j >= 0) {
@ -112,7 +113,8 @@ public class Generation {
for (int dx = -size / 2; dx <= size / 2; dx++) {
for (int dy = -size / 2; dy <= size / 2; dy++) {
if (i + dx >= 0 && i + dx < world[0].length && offsetY >= 0) {
world[offsetY][i + dx].add(new Block("oak_leaves", SpriteLoader.SPRITES.OAK_LEAF, 1, ItemType.SHEARS, new ArrayList<>()));
world[offsetY][i + dx].add(new Block("oak_leaves", SpriteLoader.SPRITES.OAK_LEAF, 1,
ItemType.SHEARS, new ArrayList<>()));
}
}
}

View File

@ -24,7 +24,8 @@ public class PickupHandlerProvider {
for (Class<?> clazz : handlerClasses) {
if (CustomPickupHandler.class.isAssignableFrom(clazz)) {
try {
CustomPickupHandler handlerInstance = (CustomPickupHandler) clazz.getDeclaredConstructor().newInstance();
CustomPickupHandler handlerInstance = (CustomPickupHandler) clazz.getDeclaredConstructor()
.newInstance();
PickupHandler annotation = clazz.getAnnotation(PickupHandler.class);
String key = annotation.value();
if (!key.contains(",")) {

Some files were not shown because too many files have changed in this diff Show More