Compare commits
18 Commits
581db639e4
...
main
Author | SHA1 | Date | |
---|---|---|---|
61dee148e4
|
|||
9727ad732f
|
|||
069183e5c1
|
|||
418117c7fe
|
|||
d09209848e
|
|||
2e2f4b00f7 | |||
f09519773b
|
|||
1d29972087
|
|||
10b81d018c
|
|||
c2f895bc8b
|
|||
587cd938f6
|
|||
aa6a47fff9
|
|||
4dd785fdfc
|
|||
aced312df1
|
|||
6028b54d10
|
|||
6ece6d3096
|
|||
72e4594165
|
|||
d1923a4dd5
|
50
normalize.js
Normal file
50
normalize.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
if (process.argv.length < 4) {
|
||||||
|
console.error("Usage: node script.js <inputFile> <outputFile>");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const inputFile = process.argv[2];
|
||||||
|
const outputFile = process.argv[3];
|
||||||
|
|
||||||
|
const file = fs.readFileSync(inputFile, "utf8");
|
||||||
|
const lines = file.split("\n");
|
||||||
|
|
||||||
|
const final = [];
|
||||||
|
|
||||||
|
for (const line of lines) {
|
||||||
|
let str = "";
|
||||||
|
const chars = line.split("");
|
||||||
|
|
||||||
|
function testSpace(index) {
|
||||||
|
if (chars[index - 2] == " ") {
|
||||||
|
return testSpace(index - 1);
|
||||||
|
} else if (chars[index - 2] == "m") {
|
||||||
|
if (chars.join("").substring(index - 5, index - 1) == "[49m") {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < chars.length; i++) {
|
||||||
|
const char = chars[i];
|
||||||
|
if (char === " ") {
|
||||||
|
if (testSpace(i)) {
|
||||||
|
str += "\x1b[49m ";
|
||||||
|
} else {
|
||||||
|
str += char;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
str += char;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final.push(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.writeFileSync(outputFile, final.join("\n"), "utf8");
|
||||||
|
console.log(`Processed file saved as: ${outputFile}`);
|
21
pom.xml
21
pom.xml
@ -19,13 +19,13 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.11.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<annotationProcessorPaths>
|
<annotationProcessorPaths>
|
||||||
<path>
|
<path>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.36</version>
|
<version>1.18.38</version>
|
||||||
</path>
|
</path>
|
||||||
</annotationProcessorPaths>
|
</annotationProcessorPaths>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.36</version>
|
<version>1.18.38</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -128,11 +128,16 @@
|
|||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>1.5.18</version> <!-- latest at the time -->
|
<version>1.5.18</version> <!-- latest at the time -->
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.trilarion</groupId>
|
<groupId>com.github.trilarion</groupId>
|
||||||
<artifactId>java-vorbis-support</artifactId>
|
<artifactId>java-vorbis-support</artifactId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.esotericsoftware</groupId>
|
||||||
|
<artifactId>kryo</artifactId>
|
||||||
|
<version>5.6.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -14,6 +14,10 @@ import org.jline.terminal.TerminalBuilder;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main class that starts the whole game. It initializes providers and sets
|
||||||
|
* up a terminal and creates the main game loop.
|
||||||
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
@ -31,7 +35,8 @@ public class Main {
|
|||||||
|
|
||||||
var spriteList = SpriteLoader.load();
|
var spriteList = SpriteLoader.load();
|
||||||
var screenRenderer = new ScreenRenderer(spriteList, terminal);
|
var screenRenderer = new ScreenRenderer(spriteList, terminal);
|
||||||
var game = GameSaver.load();
|
var gameSaver = new GameSaver();
|
||||||
|
var game = gameSaver.load();
|
||||||
|
|
||||||
final boolean[] isRunning = { true };
|
final boolean[] isRunning = { true };
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ import cz.jzitnik.game.handlers.place.CustomPlaceHandler;
|
|||||||
import cz.jzitnik.game.mobs.EntitySpawnProvider;
|
import cz.jzitnik.game.mobs.EntitySpawnProvider;
|
||||||
import cz.jzitnik.game.sprites.Breaking;
|
import cz.jzitnik.game.sprites.Breaking;
|
||||||
import cz.jzitnik.game.sprites.Steve.SteveState;
|
import cz.jzitnik.game.sprites.Steve.SteveState;
|
||||||
import cz.jzitnik.game.annotations.AutoTransient;
|
|
||||||
import cz.jzitnik.game.annotations.WalkSound;
|
import cz.jzitnik.game.annotations.WalkSound;
|
||||||
import cz.jzitnik.game.annotations.BreaksByPlace;
|
import cz.jzitnik.game.annotations.BreaksByPlace;
|
||||||
import cz.jzitnik.game.annotations.MineSound;
|
import cz.jzitnik.game.annotations.MineSound;
|
||||||
@ -20,15 +19,13 @@ import cz.jzitnik.game.annotations.PlaceSound;
|
|||||||
import cz.jzitnik.game.blocks.Chest;
|
import cz.jzitnik.game.blocks.Chest;
|
||||||
import cz.jzitnik.game.blocks.Furnace;
|
import cz.jzitnik.game.blocks.Furnace;
|
||||||
import cz.jzitnik.game.config.Configuration;
|
import cz.jzitnik.game.config.Configuration;
|
||||||
import cz.jzitnik.game.core.autotransient.AutoTransientSupport;
|
|
||||||
import cz.jzitnik.game.core.autotransient.initilizers.GameMiningInitializer;
|
|
||||||
import cz.jzitnik.game.core.autotransient.initilizers.GameWindowInitializer;
|
|
||||||
import cz.jzitnik.game.core.sound.SoundKey;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.ui.Window;
|
import cz.jzitnik.game.ui.Window;
|
||||||
import cz.jzitnik.game.ui.Inventory;
|
import cz.jzitnik.game.ui.Inventory;
|
||||||
import cz.jzitnik.game.handlers.rightclick.RightClickHandlerProvider;
|
import cz.jzitnik.game.handlers.rightclick.RightClickHandlerProvider;
|
||||||
import cz.jzitnik.tui.ScreenMovingCalculationProvider;
|
import cz.jzitnik.tui.ScreenMovingCalculationProvider;
|
||||||
import cz.jzitnik.tui.ScreenRenderer;
|
import cz.jzitnik.tui.ScreenRenderer;
|
||||||
|
import cz.jzitnik.game.stats.Stats;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@ -38,29 +35,46 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main class representing the game world and core logic.
|
||||||
|
* <p>
|
||||||
|
* Manages the game state, player actions, world updates and interactions.
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public class Game extends AutoTransientSupport {
|
public class Game {
|
||||||
|
/**
|
||||||
|
* The 2D world grid consisting of block lists for each coordinate.
|
||||||
|
* Dimensions: [height][width] = [256][512].
|
||||||
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private final List<Block>[][] world = (List<Block>[][]) new CopyOnWriteArrayList[256][512];
|
private final List<Block>[][] world = (List<Block>[][]) new CopyOnWriteArrayList[256][512];
|
||||||
private final Player player = new Player();
|
private final Player player = new Player();
|
||||||
@AutoTransient(initializer = GameMiningInitializer.class)
|
|
||||||
private transient boolean mining = false;
|
private transient boolean mining = false;
|
||||||
@Setter
|
@Setter
|
||||||
@AutoTransient(initializer = GameWindowInitializer.class)
|
|
||||||
private transient Window window = Window.WORLD;
|
private transient Window window = Window.WORLD;
|
||||||
private final Inventory inventory = new Inventory();
|
private final Inventory inventory = new Inventory();
|
||||||
@AutoTransient
|
|
||||||
private transient EntitySpawnProvider entitySpawnProvider = new EntitySpawnProvider();
|
private transient EntitySpawnProvider entitySpawnProvider = new EntitySpawnProvider();
|
||||||
@AutoTransient
|
|
||||||
private transient GameStates gameStates = new GameStates(this);
|
private transient GameStates gameStates = new GameStates(this);
|
||||||
|
private Stats stats = new Stats();
|
||||||
|
|
||||||
|
/** Current time of day in the game (0–600 range). */
|
||||||
@Setter
|
@Setter
|
||||||
private int daytime = 0; // 0-600
|
private int daytime = 0;
|
||||||
|
//
|
||||||
private Configuration configuration = new Configuration();
|
private Configuration configuration = new Configuration();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs the game instance and generates the initial world.
|
||||||
|
*/
|
||||||
public Game() {
|
public Game() {
|
||||||
Generation.generateWorld(this);
|
Generation.generateWorld(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current coordinates of the player (bottom half).
|
||||||
|
*
|
||||||
|
* @return int array with x and y coordinates, or null if not found.
|
||||||
|
*/
|
||||||
public int[] getPlayerCords() {
|
public int[] getPlayerCords() {
|
||||||
for (int i = 0; i < world.length; i++) {
|
for (int i = 0; i < world.length; i++) {
|
||||||
for (int j = 0; j < world[i].length; j++) {
|
for (int j = 0; j < world[i].length; j++) {
|
||||||
@ -80,6 +94,12 @@ public class Game extends AutoTransientSupport {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the player one block to the right if possible.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
* @param terminal the terminal instance used for layout.
|
||||||
|
*/
|
||||||
public void movePlayerRight(ScreenRenderer screenRenderer, Terminal terminal) {
|
public void movePlayerRight(ScreenRenderer screenRenderer, Terminal terminal) {
|
||||||
if (window != Window.WORLD) {
|
if (window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -96,6 +116,8 @@ public class Game extends AutoTransientSupport {
|
|||||||
world[cords[1] - 1][cords[0]].remove(player.getPlayerBlock1());
|
world[cords[1] - 1][cords[0]].remove(player.getPlayerBlock1());
|
||||||
screenRenderer.render(this);
|
screenRenderer.render(this);
|
||||||
|
|
||||||
|
stats.setBlocksTraveled(stats.getBlocksTraveled() + 1);
|
||||||
|
|
||||||
entitySpawnProvider.update(this, terminal);
|
entitySpawnProvider.update(this, terminal);
|
||||||
|
|
||||||
playMovePlayerSound(cords[0] + 1, cords[1]);
|
playMovePlayerSound(cords[0] + 1, cords[1]);
|
||||||
@ -103,6 +125,12 @@ public class Game extends AutoTransientSupport {
|
|||||||
update(screenRenderer);
|
update(screenRenderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the player one block to the left if possible.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
* @param terminal the terminal instance used for layout.
|
||||||
|
*/
|
||||||
public void movePlayerLeft(ScreenRenderer screenRenderer, Terminal terminal) {
|
public void movePlayerLeft(ScreenRenderer screenRenderer, Terminal terminal) {
|
||||||
if (window != Window.WORLD) {
|
if (window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -119,6 +147,8 @@ public class Game extends AutoTransientSupport {
|
|||||||
world[cords[1] - 1][cords[0]].remove(player.getPlayerBlock1());
|
world[cords[1] - 1][cords[0]].remove(player.getPlayerBlock1());
|
||||||
screenRenderer.render(this);
|
screenRenderer.render(this);
|
||||||
|
|
||||||
|
stats.setBlocksTraveled(stats.getBlocksTraveled() + 1);
|
||||||
|
|
||||||
entitySpawnProvider.update(this, terminal);
|
entitySpawnProvider.update(this, terminal);
|
||||||
|
|
||||||
playMovePlayerSound(cords[0] - 1, cords[1]);
|
playMovePlayerSound(cords[0] - 1, cords[1]);
|
||||||
@ -126,6 +156,11 @@ public class Game extends AutoTransientSupport {
|
|||||||
update(screenRenderer);
|
update(screenRenderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the player upward by one block, if jumping is valid.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
*/
|
||||||
public void movePlayerUp(ScreenRenderer screenRenderer) {
|
public void movePlayerUp(ScreenRenderer screenRenderer) {
|
||||||
if (window != Window.WORLD) {
|
if (window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -141,6 +176,8 @@ public class Game extends AutoTransientSupport {
|
|||||||
world[cords[1] - 2][cords[0]].add(player.getPlayerBlock1());
|
world[cords[1] - 2][cords[0]].add(player.getPlayerBlock1());
|
||||||
world[cords[1]][cords[0]].remove(player.getPlayerBlock2());
|
world[cords[1]][cords[0]].remove(player.getPlayerBlock2());
|
||||||
|
|
||||||
|
stats.setBlocksTraveled(stats.getBlocksTraveled() + 1);
|
||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(400);
|
Thread.sleep(400);
|
||||||
@ -152,6 +189,13 @@ public class Game extends AutoTransientSupport {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attacks mobs at a specified location.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
* @param x x-coordinate.
|
||||||
|
* @param y y-coordinate.
|
||||||
|
*/
|
||||||
public void hit(ScreenRenderer screenRenderer, int x, int y) {
|
public void hit(ScreenRenderer screenRenderer, int x, int y) {
|
||||||
if (mining || window != Window.WORLD) {
|
if (mining || window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -189,6 +233,13 @@ public class Game extends AutoTransientSupport {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initiates the mining process at a given location.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
* @param x x-coordinate.
|
||||||
|
* @param y y-coordinate.
|
||||||
|
*/
|
||||||
public void mine(ScreenRenderer screenRenderer, int x, int y) {
|
public void mine(ScreenRenderer screenRenderer, int x, int y) {
|
||||||
if (mining || window != Window.WORLD) {
|
if (mining || window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -257,6 +308,14 @@ public class Game extends AutoTransientSupport {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantly mines a block without animation delay.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
* @param x x-coordinate.
|
||||||
|
* @param y y-coordinate.
|
||||||
|
* @param minedDirectly whether the block was mined directly by player.
|
||||||
|
*/
|
||||||
public void mineInstant(ScreenRenderer screenRenderer, int x, int y, boolean minedDirectly) {
|
public void mineInstant(ScreenRenderer screenRenderer, int x, int y, boolean minedDirectly) {
|
||||||
var blocks = world[y][x];
|
var blocks = world[y][x];
|
||||||
var blocksCopy = new ArrayList<>(blocks);
|
var blocksCopy = new ArrayList<>(blocks);
|
||||||
@ -318,11 +377,21 @@ public class Game extends AutoTransientSupport {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stats.setBlocksMined(stats.getBlocksMined() + 1);
|
||||||
|
|
||||||
screenRenderer.render(this);
|
screenRenderer.render(this);
|
||||||
|
|
||||||
update(screenRenderer);
|
update(screenRenderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether a block is valid for mining based on proximity and visibility.
|
||||||
|
*
|
||||||
|
* @param x x-coordinate.
|
||||||
|
* @param y y-coordinate.
|
||||||
|
* @param terminal terminal context used to determine screen bounds.
|
||||||
|
* @return true if mineable, false otherwise.
|
||||||
|
*/
|
||||||
public boolean isMineable(int x, int y, Terminal terminal) {
|
public boolean isMineable(int x, int y, Terminal terminal) {
|
||||||
List<Block> blocks = world[y][x];
|
List<Block> blocks = world[y][x];
|
||||||
|
|
||||||
@ -347,6 +416,15 @@ public class Game extends AutoTransientSupport {
|
|||||||
&& blocks.stream().anyMatch(Block::isMineable);
|
&& blocks.stream().anyMatch(Block::isMineable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether a block is valid for hitting (attacking).
|
||||||
|
*
|
||||||
|
* @param x x-coordinate.
|
||||||
|
* @param y y-coordinate.
|
||||||
|
* @param terminal terminal context used to determine screen bounds.
|
||||||
|
* @return true if a mob can be hit at the given location.
|
||||||
|
*/
|
||||||
public boolean isHitable(int x, int y, Terminal terminal) {
|
public boolean isHitable(int x, int y, Terminal terminal) {
|
||||||
List<Block> blocks = world[y][x];
|
List<Block> blocks = world[y][x];
|
||||||
|
|
||||||
@ -371,6 +449,11 @@ public class Game extends AutoTransientSupport {
|
|||||||
&& blocks.stream().anyMatch(Block::isMob);
|
&& blocks.stream().anyMatch(Block::isMob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Periodically checks and updates the player’s falling state due to gravity.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
*/
|
||||||
public void update(ScreenRenderer screenRenderer) {
|
public void update(ScreenRenderer screenRenderer) {
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
@ -387,6 +470,8 @@ public class Game extends AutoTransientSupport {
|
|||||||
world[cords2[1]][cords2[0]].remove(player.getPlayerBlock2());
|
world[cords2[1]][cords2[0]].remove(player.getPlayerBlock2());
|
||||||
player.addFalling();
|
player.addFalling();
|
||||||
|
|
||||||
|
stats.setBlocksTraveled(stats.getBlocksTraveled() + 1);
|
||||||
|
|
||||||
screenRenderer.render(this);
|
screenRenderer.render(this);
|
||||||
} else {
|
} else {
|
||||||
ArrayList<Block> combinedList = new ArrayList<>();
|
ArrayList<Block> combinedList = new ArrayList<>();
|
||||||
@ -402,6 +487,14 @@ public class Game extends AutoTransientSupport {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attempts to place a block or interact with the environment at a given location.
|
||||||
|
* Also handles eating and tool usage.
|
||||||
|
*
|
||||||
|
* @param x x-coordinate.
|
||||||
|
* @param y y-coordinate.
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
*/
|
||||||
public void build(int x, int y, ScreenRenderer screenRenderer) {
|
public void build(int x, int y, ScreenRenderer screenRenderer) {
|
||||||
if (window != Window.WORLD) {
|
if (window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -479,10 +572,17 @@ public class Game extends AutoTransientSupport {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
gameStates.dependencies.eventHandlerProvider.handlePlace(screenRenderer, this, x, y);
|
gameStates.dependencies.eventHandlerProvider.handlePlace(screenRenderer, this, x, y);
|
||||||
|
stats.setBlocksPlaced(stats.getBlocksPlaced() + 1);
|
||||||
screenRenderer.render(this);
|
screenRenderer.render(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Switches the selected inventory slot (hotbar).
|
||||||
|
*
|
||||||
|
* @param slot the slot index to switch to.
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
*/
|
||||||
public void changeSlot(int slot, ScreenRenderer screenRenderer) {
|
public void changeSlot(int slot, ScreenRenderer screenRenderer) {
|
||||||
if (window != Window.WORLD) {
|
if (window != Window.WORLD) {
|
||||||
return;
|
return;
|
||||||
@ -492,10 +592,21 @@ public class Game extends AutoTransientSupport {
|
|||||||
screenRenderer.render(this);
|
screenRenderer.render(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a block list represents a solid space (i.e., not all ghost blocks).
|
||||||
|
*
|
||||||
|
* @param blocks list of blocks at a coordinate.
|
||||||
|
* @return true if any block is not a ghost block.
|
||||||
|
*/
|
||||||
public boolean isSolid(List<Block> blocks) {
|
public boolean isSolid(List<Block> blocks) {
|
||||||
return !blocks.stream().allMatch(Block::isGhost);
|
return !blocks.stream().allMatch(Block::isGhost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Visually and logically triggers the player "hit" (damage) animation.
|
||||||
|
*
|
||||||
|
* @param screenRenderer the renderer used to refresh the screen.
|
||||||
|
*/
|
||||||
public void playerHit(ScreenRenderer screenRenderer) {
|
public void playerHit(ScreenRenderer screenRenderer) {
|
||||||
player.getPlayerBlock1().setSpriteState(SteveState.FIRST_HURT);
|
player.getPlayerBlock1().setSpriteState(SteveState.FIRST_HURT);
|
||||||
player.getPlayerBlock2().setSpriteState(SteveState.SECOND_HURT);
|
player.getPlayerBlock2().setSpriteState(SteveState.SECOND_HURT);
|
||||||
|
@ -1,46 +1,66 @@
|
|||||||
package cz.jzitnik.game;
|
package cz.jzitnik.game;
|
||||||
|
|
||||||
|
import com.esotericsoftware.kryo.Kryo;
|
||||||
|
import com.esotericsoftware.kryo.io.Input;
|
||||||
|
import com.esotericsoftware.kryo.io.Output;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
/**
|
||||||
|
* Handles saving and loading the game state using Kryo serialization.
|
||||||
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class GameSaver {
|
public class GameSaver {
|
||||||
|
|
||||||
|
private static final String SAVE_FILE = "world.ser";
|
||||||
|
|
||||||
|
private final Kryo kryo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the GameSaver with Kryo serialization setup.
|
||||||
|
*/
|
||||||
|
public GameSaver() {
|
||||||
|
this.kryo = new Kryo();
|
||||||
|
kryo.setRegistrationRequired(false);
|
||||||
|
kryo.setReferences(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Saves the current game state to a file.
|
||||||
|
*
|
||||||
|
* @param game the game instance to be saved
|
||||||
|
*/
|
||||||
public void save(Game game) {
|
public void save(Game game) {
|
||||||
try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("world.ser"))) {
|
try (Output output = new Output(new FileOutputStream(SAVE_FILE))) {
|
||||||
out.writeObject(game);
|
kryo.writeClassAndObject(output, game);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
log.error("Failed to save game", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This will need rewrite
|
/**
|
||||||
public static Game load() {
|
* Loads the game state from a file. If the save file does not exist,
|
||||||
|
* a new game instance is returned.
|
||||||
|
*
|
||||||
|
* @return the loaded game instance or a new game if no save is found
|
||||||
|
*/
|
||||||
|
public Game load() {
|
||||||
log.info("Loading game");
|
log.info("Loading game");
|
||||||
File file = new File("world.ser");
|
|
||||||
|
|
||||||
|
File file = new File(SAVE_FILE);
|
||||||
if (!file.isFile()) {
|
if (!file.isFile()) {
|
||||||
|
log.info("No save file found, creating new game");
|
||||||
return new Game();
|
return new Game();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try (Input input = new Input(new FileInputStream(SAVE_FILE))) {
|
||||||
log.info("Loading game from save file");
|
log.info("Loading game from save file");
|
||||||
FileInputStream fileIn = new FileInputStream("world.ser");
|
Object object = kryo.readClassAndObject(input);
|
||||||
|
return (Game) object;
|
||||||
ObjectInputStream in = new ObjectInputStream(fileIn);
|
} catch (IOException e) {
|
||||||
|
log.error("Failed to load game", e);
|
||||||
// Read the object from the file
|
|
||||||
Object object = in.readObject();
|
|
||||||
|
|
||||||
Game game = (Game) object;
|
|
||||||
|
|
||||||
in.close();
|
|
||||||
fileIn.close();
|
|
||||||
|
|
||||||
return game;
|
|
||||||
} catch (IOException | ClassNotFoundException e) {
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package cz.jzitnik.game;
|
package cz.jzitnik.game;
|
||||||
|
|
||||||
import cz.jzitnik.game.sprites.*;
|
import cz.jzitnik.game.sprites.*;
|
||||||
import cz.jzitnik.game.sprites.ui.Number;
|
|
||||||
import cz.jzitnik.tui.Sprite;
|
import cz.jzitnik.tui.Sprite;
|
||||||
import cz.jzitnik.tui.SpriteList;
|
import cz.jzitnik.tui.SpriteList;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -77,12 +76,12 @@ public class SpriteLoader {
|
|||||||
PIG,
|
PIG,
|
||||||
SHEEP,
|
SHEEP,
|
||||||
COW,
|
COW,
|
||||||
|
ZOMBIE,
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
BREAKING,
|
BREAKING,
|
||||||
HEART,
|
HEART,
|
||||||
HUNGER,
|
HUNGER,
|
||||||
NUMBER,
|
|
||||||
|
|
||||||
// Seeds
|
// Seeds
|
||||||
WHEAT,
|
WHEAT,
|
||||||
@ -269,12 +268,12 @@ public class SpriteLoader {
|
|||||||
SPRITES_MAP.put(SPRITES.PIG, new Pig());
|
SPRITES_MAP.put(SPRITES.PIG, new Pig());
|
||||||
SPRITES_MAP.put(SPRITES.SHEEP, new Sheep());
|
SPRITES_MAP.put(SPRITES.SHEEP, new Sheep());
|
||||||
SPRITES_MAP.put(SPRITES.COW, new Cow());
|
SPRITES_MAP.put(SPRITES.COW, new Cow());
|
||||||
|
SPRITES_MAP.put(SPRITES.ZOMBIE, new Zombie());
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
SPRITES_MAP.put(SPRITES.BREAKING, new Breaking());
|
SPRITES_MAP.put(SPRITES.BREAKING, new Breaking());
|
||||||
SPRITES_MAP.put(SPRITES.HEART, new Heart());
|
SPRITES_MAP.put(SPRITES.HEART, new Heart());
|
||||||
SPRITES_MAP.put(SPRITES.HUNGER, new Hunger());
|
SPRITES_MAP.put(SPRITES.HUNGER, new Hunger());
|
||||||
SPRITES_MAP.put(SPRITES.NUMBER, new Number());
|
|
||||||
|
|
||||||
// SEEDS
|
// SEEDS
|
||||||
SPRITES_MAP.put(SPRITES.WHEAT, new Farmable("wheat_stage1.ans", "wheat_stage2.ans", "wheat_stage3.ans"));
|
SPRITES_MAP.put(SPRITES.WHEAT, new Farmable("wheat_stage1.ans", "wheat_stage2.ans", "wheat_stage3.ans"));
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package cz.jzitnik.game.annotations;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import cz.jzitnik.game.core.autotransient.AutoTransientInitializer;
|
|
||||||
import cz.jzitnik.game.core.autotransient.DefaultInitializer;
|
|
||||||
|
|
||||||
|
|
||||||
@Target(ElementType.FIELD)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface AutoTransient {
|
|
||||||
Class<? extends AutoTransientInitializer<?>> initializer() default DefaultInitializer.class;
|
|
||||||
}
|
|
@ -32,7 +32,7 @@ public class Chest implements RightClickHandler, Serializable {
|
|||||||
|
|
||||||
int moveLeft = Math.max(0, (terminal.getWidth() / 2) - (widthPixels / 2));
|
int moveLeft = Math.max(0, (terminal.getWidth() / 2) - (widthPixels / 2));
|
||||||
|
|
||||||
List<String> sprites = game.getInventory().getSprites(items, spriteList, inventory.getSelectedItemInv() - 50);
|
List<String> sprites = game.getInventory().getSprites(items, spriteList, inventory.getSelectedItemInv() - 50, game);
|
||||||
|
|
||||||
for (int i = 0; i < ROW_AMOUNT; i++) {
|
for (int i = 0; i < ROW_AMOUNT; i++) {
|
||||||
for (int j = 0; j < CELL_HEIGHT; j++) {
|
for (int j = 0; j < CELL_HEIGHT; j++) {
|
||||||
@ -61,7 +61,7 @@ public class Chest implements RightClickHandler, Serializable {
|
|||||||
|
|
||||||
size = buffer.toString().split("\n").length;
|
size = buffer.toString().split("\n").length;
|
||||||
|
|
||||||
game.getInventory().renderFull(buffer, terminal, spriteList, false, Optional.of(size));
|
game.getInventory().renderFull(buffer, terminal, spriteList, false, Optional.of(size), game);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void click(Game game, MouseEvent mouseEvent, Terminal terminal, ScreenRenderer screenRenderer) {
|
public void click(Game game, MouseEvent mouseEvent, Terminal terminal, ScreenRenderer screenRenderer) {
|
||||||
|
@ -42,7 +42,7 @@ public class Furnace implements RightClickHandler, Serializable {
|
|||||||
var inventory = game.getInventory();
|
var inventory = game.getInventory();
|
||||||
int moveLeft = Math.max(0, (terminal.getWidth() / 2) - (widthPixels / 2));
|
int moveLeft = Math.max(0, (terminal.getWidth() / 2) - (widthPixels / 2));
|
||||||
|
|
||||||
List<String> sprites = game.getInventory().getSprites(items, spriteList, inventory.getSelectedItemInv() - 50);
|
List<String> sprites = game.getInventory().getSprites(items, spriteList, inventory.getSelectedItemInv() - 50, game);
|
||||||
|
|
||||||
String[] outputSprite = outputItem == null ? null
|
String[] outputSprite = outputItem == null ? null
|
||||||
: SpriteCombiner.combineTwoSprites(
|
: SpriteCombiner.combineTwoSprites(
|
||||||
@ -50,7 +50,7 @@ public class Furnace implements RightClickHandler, Serializable {
|
|||||||
? spriteList.getSprite(outputItem.getItem().getFirst().getSprite())
|
? spriteList.getSprite(outputItem.getItem().getFirst().getSprite())
|
||||||
.getSprite(outputItem.getItem().getFirst().getSpriteState().get())
|
.getSprite(outputItem.getItem().getFirst().getSpriteState().get())
|
||||||
: spriteList.getSprite(outputItem.getItem().getFirst().getSprite()).getSprite(),
|
: spriteList.getSprite(outputItem.getItem().getFirst().getSprite()).getSprite(),
|
||||||
Numbers.getNumberSprite(outputItem.getAmount(), spriteList)).split("\n");
|
Numbers.getNumberSprite(outputItem.getAmount(), game)).split("\n");
|
||||||
|
|
||||||
for (int j = 0; j < CELL_HEIGHT; j++) {
|
for (int j = 0; j < CELL_HEIGHT; j++) {
|
||||||
buffer.append("\033[0m").append(" ".repeat(moveLeft));
|
buffer.append("\033[0m").append(" ".repeat(moveLeft));
|
||||||
@ -115,7 +115,7 @@ public class Furnace implements RightClickHandler, Serializable {
|
|||||||
|
|
||||||
size = buffer.toString().split("\n").length;
|
size = buffer.toString().split("\n").length;
|
||||||
|
|
||||||
game.getInventory().renderFull(buffer, terminal, spriteList, false, Optional.of(size));
|
game.getInventory().renderFull(buffer, terminal, spriteList, false, Optional.of(size), game);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void click(Game game, MouseEvent mouseEvent, Terminal terminal, ScreenRenderer screenRenderer) {
|
public void click(Game game, MouseEvent mouseEvent, Terminal terminal, ScreenRenderer screenRenderer) {
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
package cz.jzitnik.game.config;
|
package cz.jzitnik.game.config;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class Configuration implements Serializable {
|
public class Configuration {
|
||||||
private int soundVolume = 100; // 0-100
|
private int soundVolume = 100; // 0-100
|
||||||
}
|
}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
package cz.jzitnik.game.core.autotransient;
|
|
||||||
|
|
||||||
public interface AutoTransientInitializer<T> {
|
|
||||||
T initialize(Object parent);
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
package cz.jzitnik.game.core.autotransient;
|
|
||||||
|
|
||||||
import cz.jzitnik.game.annotations.AutoTransient;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.ObjectInputStream;
|
|
||||||
import java.io.Serial;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.lang.reflect.Constructor;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
public abstract class AutoTransientSupport implements Serializable {
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
|
||||||
in.defaultReadObject();
|
|
||||||
reinitializeAutoTransients();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void reinitializeAutoTransients() {
|
|
||||||
for (Field field : this.getClass().getDeclaredFields()) {
|
|
||||||
if (field.isAnnotationPresent(AutoTransient.class)) {
|
|
||||||
field.setAccessible(true);
|
|
||||||
AutoTransient annotation = field.getAnnotation(AutoTransient.class);
|
|
||||||
try {
|
|
||||||
Object value;
|
|
||||||
|
|
||||||
// Use initializer if provided
|
|
||||||
Class<? extends AutoTransientInitializer<?>> initializerClass = annotation.initializer();
|
|
||||||
if (!initializerClass.equals(DefaultInitializer.class)) {
|
|
||||||
AutoTransientInitializer<?> initializer = initializerClass.getDeclaredConstructor().newInstance();
|
|
||||||
value = initializer.initialize(this);
|
|
||||||
} else {
|
|
||||||
// Fallback to default instantiation
|
|
||||||
value = instantiateField(field.getType());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value != null) {
|
|
||||||
field.set(this, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException("Failed to reinitialize @AutoTransient field: " + field.getName(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Object instantiateField(Class<?> clazz) {
|
|
||||||
try {
|
|
||||||
// Try constructor with (this) reference first
|
|
||||||
Constructor<?> constructor = clazz.getDeclaredConstructor(this.getClass());
|
|
||||||
return constructor.newInstance(this);
|
|
||||||
} catch (NoSuchMethodException e) {
|
|
||||||
// Fallback to default constructor
|
|
||||||
try {
|
|
||||||
return clazz.getDeclaredConstructor().newInstance();
|
|
||||||
} catch (Exception ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
package cz.jzitnik.game.core.autotransient;
|
|
||||||
|
|
||||||
public class DefaultInitializer implements AutoTransientInitializer<Object> {
|
|
||||||
@Override
|
|
||||||
public Object initialize(Object parent) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
package cz.jzitnik.game.core.autotransient.initilizers;
|
|
||||||
|
|
||||||
import cz.jzitnik.game.core.autotransient.AutoTransientInitializer;
|
|
||||||
|
|
||||||
public class GameMiningInitializer implements AutoTransientInitializer<Boolean> {
|
|
||||||
@Override
|
|
||||||
public Boolean initialize(Object parent) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
package cz.jzitnik.game.core.autotransient.initilizers;
|
|
||||||
|
|
||||||
import cz.jzitnik.game.core.autotransient.AutoTransientInitializer;
|
|
||||||
import cz.jzitnik.game.ui.Window;
|
|
||||||
|
|
||||||
public class GameWindowInitializer implements AutoTransientInitializer<Window> {
|
|
||||||
@Override
|
|
||||||
public Window initialize(Object parent) {
|
|
||||||
return Window.WORLD;
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,12 +3,29 @@ package cz.jzitnik.game.core.sound;
|
|||||||
public enum SoundKey {
|
public enum SoundKey {
|
||||||
GRASS,
|
GRASS,
|
||||||
GRASS_WALKING,
|
GRASS_WALKING,
|
||||||
|
GRASS_MINING,
|
||||||
|
|
||||||
GRAVEL,
|
GRAVEL,
|
||||||
GRAVEL_WALKING,
|
GRAVEL_WALKING,
|
||||||
|
|
||||||
WOOD,
|
WOOD_DIG,
|
||||||
|
WOOD_WALKING,
|
||||||
|
WOOD_MINING,
|
||||||
|
|
||||||
HURT,
|
HURT,
|
||||||
HIT,
|
HIT,
|
||||||
|
|
||||||
|
SAND_DIG,
|
||||||
|
SAND_MINING,
|
||||||
|
SAND_WALKING,
|
||||||
|
|
||||||
|
STONE_DIG,
|
||||||
|
STONE_WALKING,
|
||||||
|
STONE_MINING,
|
||||||
|
|
||||||
|
WOOL_DIG,
|
||||||
|
|
||||||
|
METAL_DIG,
|
||||||
|
METAL_WALKING,
|
||||||
|
METAL_MINING,
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,5 @@ import cz.jzitnik.game.core.sound.SoundKey;
|
|||||||
"grass/grass3.ogg",
|
"grass/grass3.ogg",
|
||||||
"grass/grass4.ogg"
|
"grass/grass4.ogg"
|
||||||
})
|
})
|
||||||
public class GrassSound {
|
public class GrassDigSound {
|
||||||
}
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.GRASS_MINING, resourceLocation = {
|
||||||
|
"grass/mining1.ogg",
|
||||||
|
"grass/mining2.ogg",
|
||||||
|
"grass/mining3.ogg",
|
||||||
|
"grass/mining4.ogg",
|
||||||
|
"grass/mining5.ogg",
|
||||||
|
"grass/mining6.ogg"
|
||||||
|
})
|
||||||
|
public class GrassMiningSound {
|
||||||
|
}
|
@ -9,5 +9,5 @@ import cz.jzitnik.game.core.sound.SoundKey;
|
|||||||
"gravel/gravel3.ogg",
|
"gravel/gravel3.ogg",
|
||||||
"gravel/gravel4.ogg"
|
"gravel/gravel4.ogg"
|
||||||
})
|
})
|
||||||
public class GravelSound {
|
public class GravelDigSound {
|
||||||
}
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.METAL_DIG, resourceLocation = {
|
||||||
|
"metal/dig1.ogg",
|
||||||
|
"metal/dig2.ogg",
|
||||||
|
"metal/dig3.ogg",
|
||||||
|
"metal/dig4.ogg"
|
||||||
|
})
|
||||||
|
public class MetalDigSound {
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.METAL_MINING, resourceLocation = {
|
||||||
|
"metal/mining1.ogg",
|
||||||
|
"metal/mining2.ogg",
|
||||||
|
"metal/mining3.ogg",
|
||||||
|
"metal/mining4.ogg",
|
||||||
|
"metal/mining5.ogg",
|
||||||
|
"metal/mining6.ogg"
|
||||||
|
|
||||||
|
})
|
||||||
|
public class MetalMiningSound {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.METAL_WALKING, resourceLocation = {
|
||||||
|
"metal/step1.ogg",
|
||||||
|
"metal/step2.ogg",
|
||||||
|
"metal/step3.ogg",
|
||||||
|
"metal/step4.ogg",
|
||||||
|
"metal/step5.ogg",
|
||||||
|
"metal/step6.ogg"
|
||||||
|
})
|
||||||
|
public class MetalWalkingSound {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.SAND_DIG, resourceLocation = {
|
||||||
|
"sand/dig1.ogg",
|
||||||
|
"sand/dig2.ogg",
|
||||||
|
"sand/dig3.ogg",
|
||||||
|
"sand/dig4.ogg"
|
||||||
|
})
|
||||||
|
public class SandDigSound {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.SAND_MINING, resourceLocation = {
|
||||||
|
"sand/mining1.ogg",
|
||||||
|
"sand/mining2.ogg",
|
||||||
|
"sand/mining3.ogg",
|
||||||
|
"sand/mining4.ogg",
|
||||||
|
"sand/mining5.ogg",
|
||||||
|
|
||||||
|
})
|
||||||
|
public class SandMiningSound {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.SAND_WALKING, resourceLocation = {
|
||||||
|
"sand/step1.ogg",
|
||||||
|
"sand/step2.ogg",
|
||||||
|
"sand/step3.ogg",
|
||||||
|
"sand/step4.ogg",
|
||||||
|
"sand/step5.ogg",
|
||||||
|
"sand/step6.ogg"
|
||||||
|
})
|
||||||
|
public class SandWalkingSound {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.STONE_DIG, resourceLocation = {
|
||||||
|
"stone/dig1.ogg",
|
||||||
|
"stone/dig2.ogg",
|
||||||
|
"stone/dig3.ogg",
|
||||||
|
"stone/dig4.ogg"
|
||||||
|
})
|
||||||
|
public class StoneDigSound {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.STONE_MINING, resourceLocation = {
|
||||||
|
"stone/mine1.ogg",
|
||||||
|
"stone/mine2.ogg",
|
||||||
|
"stone/mine3.ogg",
|
||||||
|
"stone/mine4.ogg",
|
||||||
|
"stone/mine5.ogg",
|
||||||
|
"stone/mine6.ogg"
|
||||||
|
})
|
||||||
|
public class StoneMiningSound {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.STONE_WALKING, resourceLocation = {
|
||||||
|
"stone/step1.ogg",
|
||||||
|
"stone/step2.ogg",
|
||||||
|
"stone/step3.ogg",
|
||||||
|
"stone/step4.ogg",
|
||||||
|
"stone/step5.ogg",
|
||||||
|
"stone/step6.ogg"
|
||||||
|
})
|
||||||
|
public class StoneWalkingSound {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.WOOD_DIG, resourceLocation = {
|
||||||
|
"wood/dig1.ogg",
|
||||||
|
"wood/dig2.ogg",
|
||||||
|
"wood/dig3.ogg",
|
||||||
|
"wood/dig4.ogg",
|
||||||
|
})
|
||||||
|
public class WoodDigSound {
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.WOOD_MINING, resourceLocation = {
|
||||||
|
"wood/mining1.ogg",
|
||||||
|
"wood/mining2.ogg",
|
||||||
|
"wood/mining3.ogg",
|
||||||
|
"wood/mining4.ogg",
|
||||||
|
"wood/mining5.ogg",
|
||||||
|
"wood/mining6.ogg"
|
||||||
|
|
||||||
|
})
|
||||||
|
public class WoodMiningSound {
|
||||||
|
}
|
@ -1,10 +0,0 @@
|
|||||||
package cz.jzitnik.game.core.sound.registry;
|
|
||||||
|
|
||||||
import cz.jzitnik.game.annotations.SoundRegistry;
|
|
||||||
import cz.jzitnik.game.core.sound.SoundKey;
|
|
||||||
|
|
||||||
@SoundRegistry(key = SoundKey.WOOD, resourceLocation = {
|
|
||||||
"wood/wood1.ogg",
|
|
||||||
})
|
|
||||||
public class WoodSound {
|
|
||||||
}
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.WOOD_WALKING, resourceLocation = {
|
||||||
|
"wood/step1.ogg",
|
||||||
|
"wood/step2.ogg",
|
||||||
|
"wood/step3.ogg",
|
||||||
|
"wood/step4.ogg",
|
||||||
|
"wood/step5.ogg",
|
||||||
|
"wood/step6.ogg"
|
||||||
|
})
|
||||||
|
public class WoodWalkingSound {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.WOOL_DIG, resourceLocation = {
|
||||||
|
"wool/dig1.ogg",
|
||||||
|
"wool/dig2.ogg",
|
||||||
|
"wool/dig3.ogg",
|
||||||
|
"wool/dig4.ogg"
|
||||||
|
})
|
||||||
|
public class WoolDigSound {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.WOOL_DIG, resourceLocation = {
|
||||||
|
"wool/dig1.ogg",
|
||||||
|
"wool/dig2.ogg",
|
||||||
|
"wool/dig3.ogg",
|
||||||
|
"wool/dig4.ogg"
|
||||||
|
})
|
||||||
|
public class WoolMiningSound {
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package cz.jzitnik.game.core.sound.registry;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.annotations.SoundRegistry;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
|
||||||
|
@SoundRegistry(key = SoundKey.WOOL_DIG, resourceLocation = {
|
||||||
|
"wool/dig1.ogg",
|
||||||
|
"wool/dig2.ogg",
|
||||||
|
"wool/dig3.ogg",
|
||||||
|
"wool/dig4.ogg"
|
||||||
|
})
|
||||||
|
public class WoolWalkingSound {
|
||||||
|
}
|
@ -6,15 +6,16 @@ import cz.jzitnik.game.entities.items.ItemType;
|
|||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
import cz.jzitnik.game.ui.Inventory;
|
import cz.jzitnik.game.ui.Inventory;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class Block implements Serializable {
|
@NoArgsConstructor
|
||||||
|
public class Block {
|
||||||
private String blockId;
|
private String blockId;
|
||||||
private SpriteLoader.SPRITES sprite;
|
private SpriteLoader.SPRITES sprite;
|
||||||
private MyOptional<Enum> spriteState = MyOptional.empty();
|
private MyOptional<Enum> spriteState = MyOptional.empty();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cz.jzitnik.game.entities;
|
package cz.jzitnik.game.entities;
|
||||||
|
|
||||||
|
import cz.jzitnik.game.Game;
|
||||||
import cz.jzitnik.game.GameSaver;
|
import cz.jzitnik.game.GameSaver;
|
||||||
import cz.jzitnik.game.core.sound.Sound;
|
import cz.jzitnik.game.core.sound.Sound;
|
||||||
import cz.jzitnik.game.handlers.events.EventHandlerProvider;
|
import cz.jzitnik.game.handlers.events.EventHandlerProvider;
|
||||||
@ -9,6 +10,10 @@ import cz.jzitnik.game.handlers.tooluse.ToolUseProvider;
|
|||||||
import cz.jzitnik.game.mobs.EntityHurtAnimation;
|
import cz.jzitnik.game.mobs.EntityHurtAnimation;
|
||||||
import cz.jzitnik.game.mobs.EntityKill;
|
import cz.jzitnik.game.mobs.EntityKill;
|
||||||
import cz.jzitnik.game.smelting.Smelting;
|
import cz.jzitnik.game.smelting.Smelting;
|
||||||
|
import cz.jzitnik.game.sprites.ui.Font;
|
||||||
|
import cz.jzitnik.game.ui.DeathScreen;
|
||||||
|
import cz.jzitnik.game.ui.Escape;
|
||||||
|
import cz.jzitnik.game.ui.Options;
|
||||||
|
|
||||||
public class Dependencies {
|
public class Dependencies {
|
||||||
public PlaceHandler placeHandler = new PlaceHandler();
|
public PlaceHandler placeHandler = new PlaceHandler();
|
||||||
@ -20,4 +25,13 @@ public class Dependencies {
|
|||||||
public Smelting smelting = new Smelting();
|
public Smelting smelting = new Smelting();
|
||||||
public ToolUseProvider toolUseProvider = new ToolUseProvider();
|
public ToolUseProvider toolUseProvider = new ToolUseProvider();
|
||||||
public Sound sound = new Sound();
|
public Sound sound = new Sound();
|
||||||
|
public Font font = new Font();
|
||||||
|
public Escape escape;
|
||||||
|
public Options options;
|
||||||
|
public DeathScreen deathScreen = new DeathScreen();
|
||||||
|
|
||||||
|
public Dependencies(Game game) {
|
||||||
|
escape = new Escape(game);
|
||||||
|
options = new Options(game);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,6 @@ public class GameStates {
|
|||||||
|
|
||||||
public GameStates(Game game) {
|
public GameStates(Game game) {
|
||||||
craftingTable = new CraftingTable(game);
|
craftingTable = new CraftingTable(game);
|
||||||
dependencies = new Dependencies();
|
dependencies = new Dependencies(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package cz.jzitnik.game.entities;
|
package cz.jzitnik.game.entities;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
public class MyOptional<T> implements Serializable {
|
public class MyOptional<T> {
|
||||||
private T value;
|
private T value;
|
||||||
private boolean isPresent;
|
private boolean isPresent;
|
||||||
|
|
||||||
@ -64,22 +63,6 @@ public class MyOptional<T> implements Serializable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serial
|
|
||||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
|
||||||
out.writeBoolean(isPresent);
|
|
||||||
if (isPresent) {
|
|
||||||
out.writeObject(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Serial
|
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
|
||||||
isPresent = in.readBoolean();
|
|
||||||
if (isPresent) {
|
|
||||||
value = (T) in.readObject();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return isPresent ? "SerializableOptional[" + value + "]" : "SerializableOptional.empty";
|
return isPresent ? "SerializableOptional[" + value + "]" : "SerializableOptional.empty";
|
||||||
@ -100,4 +83,4 @@ public class MyOptional<T> implements Serializable {
|
|||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return !isPresent;
|
return !isPresent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ package cz.jzitnik.game.entities;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -11,11 +10,12 @@ import cz.jzitnik.game.Game;
|
|||||||
import cz.jzitnik.game.annotations.ReduceFallDamage;
|
import cz.jzitnik.game.annotations.ReduceFallDamage;
|
||||||
import cz.jzitnik.game.core.reducefalldamage.Reducer;
|
import cz.jzitnik.game.core.reducefalldamage.Reducer;
|
||||||
import cz.jzitnik.game.core.sound.SoundKey;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
|
import cz.jzitnik.game.ui.Window;
|
||||||
import cz.jzitnik.tui.ScreenRenderer;
|
import cz.jzitnik.tui.ScreenRenderer;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class Player implements Serializable {
|
public class Player {
|
||||||
private int health = 10;
|
private int health = 10;
|
||||||
private int hunger = 10;
|
private int hunger = 10;
|
||||||
private int fallDistance = 0;
|
private int fallDistance = 0;
|
||||||
@ -42,18 +42,19 @@ public class Player implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void fell(List<Block> fallblock, Game game, ScreenRenderer screenRenderer) {
|
public void fell(List<Block> fallblock, Game game, ScreenRenderer screenRenderer) {
|
||||||
var block = fallblock.stream().filter(b -> b.getClass().isAnnotationPresent(ReduceFallDamage.class)).findFirst();
|
var block = fallblock.stream().filter(b -> b.getClass().isAnnotationPresent(ReduceFallDamage.class))
|
||||||
|
.findFirst();
|
||||||
int damage = Math.max(fallDistance - 3, 0);
|
int damage = Math.max(fallDistance - 3, 0);
|
||||||
if (block.isPresent()) {
|
if (block.isPresent()) {
|
||||||
var reducerClass = block.get().getClass().getAnnotation(ReduceFallDamage.class).value();
|
var reducerClass = block.get().getClass().getAnnotation(ReduceFallDamage.class).value();
|
||||||
try {
|
try {
|
||||||
Reducer reducer = reducerClass.getDeclaredConstructor().newInstance();
|
Reducer reducer = reducerClass.getDeclaredConstructor().newInstance();
|
||||||
damage = reducer.reduce(damage);
|
damage = reducer.reduce(damage);
|
||||||
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException
|
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException
|
||||||
| InvocationTargetException | NoSuchMethodException | SecurityException e) {
|
| InvocationTargetException | NoSuchMethodException | SecurityException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dealDamage(damage, game, screenRenderer);
|
dealDamage(damage, game, screenRenderer);
|
||||||
fallDistance = 0;
|
fallDistance = 0;
|
||||||
@ -66,8 +67,9 @@ public class Player implements Serializable {
|
|||||||
game.getGameStates().dependencies.sound.playSound(game.getConfiguration(), SoundKey.HURT, null);
|
game.getGameStates().dependencies.sound.playSound(game.getConfiguration(), SoundKey.HURT, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (health == 0) {
|
if (health <= 0) {
|
||||||
// TODO: Implement dead
|
game.setWindow(Window.DEATH_SCREEN);
|
||||||
|
screenRenderer.render(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package cz.jzitnik.game.entities;
|
package cz.jzitnik.game.entities;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@ -9,6 +7,6 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Getter
|
@Getter
|
||||||
public class SteveData implements Serializable {
|
public class SteveData {
|
||||||
private boolean top = false;
|
private boolean top = false;
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,12 @@ package cz.jzitnik.game.entities.items;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class InventoryItem implements Serializable {
|
public class InventoryItem {
|
||||||
private int amount;
|
private int amount;
|
||||||
private final List<Item> item;
|
private final List<Item> item;
|
||||||
|
|
||||||
|
@ -7,12 +7,10 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class Item implements Serializable {
|
public class Item {
|
||||||
private String id;
|
private String id;
|
||||||
private String name;
|
private String name;
|
||||||
private ItemType type;
|
private ItemType type;
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry("cobblestone")
|
@BlockRegistry("cobblestone")
|
||||||
public class CobblestoneBlock extends Block {
|
public class CobblestoneBlock extends Block {
|
||||||
public CobblestoneBlock() {
|
public CobblestoneBlock() {
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.ResetDataOnMine;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.logic.services.farmland.FarmlandData;
|
import cz.jzitnik.game.logic.services.farmland.FarmlandData;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.GRAVEL)
|
||||||
|
@MineSound(SoundKey.GRAVEL)
|
||||||
|
@WalkSound(SoundKey.GRAVEL_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRAVEL_WALKING)
|
||||||
@ResetDataOnMine
|
@ResetDataOnMine
|
||||||
@BlockRegistry(value = "farmland", drops = "dirt")
|
@BlockRegistry(value = "farmland", drops = "dirt")
|
||||||
public class FarmlandBlock extends Block {
|
public class FarmlandBlock extends Block {
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
|
||||||
import cz.jzitnik.game.annotations.ReduceFallDamage;
|
|
||||||
import cz.jzitnik.game.core.reducefalldamage.HaybaleFallDamageReducer;
|
import cz.jzitnik.game.core.reducefalldamage.HaybaleFallDamageReducer;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@Flamable
|
@Flamable
|
||||||
@BlockRegistry("haybale")
|
@BlockRegistry("haybale")
|
||||||
@ReduceFallDamage(HaybaleFallDamageReducer.class)
|
@ReduceFallDamage(HaybaleFallDamageReducer.class)
|
||||||
|
@ -7,6 +7,7 @@ import cz.jzitnik.game.entities.Block;
|
|||||||
import cz.jzitnik.game.logic.services.flowing.FlowingData;
|
import cz.jzitnik.game.logic.services.flowing.FlowingData;
|
||||||
import cz.jzitnik.game.sprites.Water;
|
import cz.jzitnik.game.sprites.Water;
|
||||||
|
|
||||||
|
|
||||||
@Burning
|
@Burning
|
||||||
@BlockRegistry(value = "lava", drops = "lava_bucket")
|
@BlockRegistry(value = "lava", drops = "lava_bucket")
|
||||||
public class LavaBlock extends Block {
|
public class LavaBlock extends Block {
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolidNoHandler;
|
|
||||||
import cz.jzitnik.game.blocks.OakDoorData;
|
import cz.jzitnik.game.blocks.OakDoorData;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.WOOD_DIG)
|
||||||
|
@PlaceSound(SoundKey.WOOD_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOD_MINING)
|
||||||
|
@WalkSound(SoundKey.WOOD_WALKING)
|
||||||
@Flamable
|
@Flamable
|
||||||
@PlaceOnSolidNoHandler
|
@PlaceOnSolidNoHandler
|
||||||
@BlockRegistry("oak_door")
|
@BlockRegistry("oak_door")
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@Flamable
|
@Flamable
|
||||||
@BlockRegistry("oak_leaves")
|
@BlockRegistry("oak_leaves")
|
||||||
public class OakLeavesBlock extends Block {
|
public class OakLeavesBlock extends Block {
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
|
||||||
import cz.jzitnik.game.annotations.MineSound;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceSound;
|
|
||||||
import cz.jzitnik.game.core.sound.SoundKey;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@MineSound(SoundKey.WOOD)
|
@MineSound(SoundKey.WOOD_DIG)
|
||||||
@PlaceSound(SoundKey.WOOD)
|
@PlaceSound(SoundKey.WOOD_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOD_MINING)
|
||||||
|
@WalkSound(SoundKey.WOOD_WALKING)
|
||||||
@Flamable
|
@Flamable
|
||||||
@BlockRegistry("oak_log")
|
@BlockRegistry("oak_log")
|
||||||
public class OakLogBlock extends Block {
|
public class OakLogBlock extends Block {
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.WOOD_DIG)
|
||||||
|
@PlaceSound(SoundKey.WOOD_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOD_MINING)
|
||||||
|
@WalkSound(SoundKey.WOOD_WALKING)
|
||||||
@Flamable
|
@Flamable
|
||||||
@BlockRegistry("oak_planks")
|
@BlockRegistry("oak_planks")
|
||||||
public class OakPlanksBlock extends Block {
|
public class OakPlanksBlock extends Block {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry("obsidian")
|
@BlockRegistry("obsidian")
|
||||||
public class ObsidianBlock extends Block {
|
public class ObsidianBlock extends Block {
|
||||||
public ObsidianBlock() {
|
public ObsidianBlock() {
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.FallingBlock;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.SAND_DIG)
|
||||||
|
@PlaceSound(SoundKey.SAND_DIG)
|
||||||
|
@MiningSound(SoundKey.SAND_MINING)
|
||||||
|
@WalkSound(SoundKey.SAND_WALKING)
|
||||||
@FallingBlock
|
@FallingBlock
|
||||||
@BlockRegistry("sand")
|
@BlockRegistry("sand")
|
||||||
public class SandBlock extends Block {
|
public class SandBlock extends Block {
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
package cz.jzitnik.game.entities.items.registry.blocks.blocks;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry(value = "stone", drops = "cobblestone")
|
@BlockRegistry(value = "stone", drops = "cobblestone")
|
||||||
public class StoneBlock extends Block {
|
public class StoneBlock extends Block {
|
||||||
public StoneBlock() {
|
public StoneBlock() {
|
||||||
|
@ -1,20 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockDropPercentage;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
|
||||||
import cz.jzitnik.game.annotations.BreaksByPlace;
|
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.CustomDrop;
|
|
||||||
import cz.jzitnik.game.annotations.MineSound;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceSound;
|
|
||||||
import cz.jzitnik.game.core.sound.SoundKey;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
@MineSound(SoundKey.GRASS)
|
@MineSound(SoundKey.GRASS)
|
||||||
@PlaceSound(SoundKey.GRASS)
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.ResetDataOnMine;
|
|
||||||
import cz.jzitnik.game.annotations.Sapling;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.logic.services.saplings.SaplingData;
|
import cz.jzitnik.game.logic.services.saplings.SaplingData;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@Sapling
|
@Sapling
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@ResetDataOnMine
|
@ResetDataOnMine
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Farmable;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolidNoHandler;
|
|
||||||
import cz.jzitnik.game.annotations.ResetDataOnMine;
|
|
||||||
import cz.jzitnik.game.annotations.ResetSpriteStateOnMine;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.logic.services.farmable.FarmableData;
|
import cz.jzitnik.game.logic.services.farmable.FarmableData;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@Farmable("wheat")
|
@Farmable("wheat")
|
||||||
@PlaceOnSolidNoHandler
|
@PlaceOnSolidNoHandler
|
||||||
@ResetDataOnMine
|
@ResetDataOnMine
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.annotations.TwoblockBlock;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.annotations.TwoblockBlock;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.annotations.TwoblockBlock;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.annotations.TwoblockBlock;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.BreakableByWater;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.annotations.BreaksFalling;
|
|
||||||
import cz.jzitnik.game.annotations.PlaceOnSolid;
|
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.GRASS)
|
||||||
|
@PlaceSound(SoundKey.GRASS)
|
||||||
|
@WalkSound(SoundKey.GRASS_WALKING)
|
||||||
|
@MiningSound(SoundKey.GRASS_MINING)
|
||||||
@PlaceOnSolid
|
@PlaceOnSolid
|
||||||
@BreakableByWater
|
@BreakableByWater
|
||||||
@BreaksFalling
|
@BreaksFalling
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.coal;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.coal;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@Flamable
|
@Flamable
|
||||||
@BlockRegistry("coal_block")
|
@BlockRegistry("coal_block")
|
||||||
public class CoalBlock extends Block {
|
public class CoalBlock extends Block {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.coal;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.coal;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry("coal_ore")
|
@BlockRegistry("coal_ore")
|
||||||
public class CoalOreBlock extends Block {
|
public class CoalOreBlock extends Block {
|
||||||
public CoalOreBlock() {
|
public CoalOreBlock() {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.diamond;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.diamond;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@WalkSound(SoundKey.METAL_WALKING)
|
||||||
|
@MiningSound(SoundKey.METAL_MINING)
|
||||||
|
@PlaceSound(SoundKey.METAL_DIG)
|
||||||
|
@MineSound(SoundKey.METAL_DIG)
|
||||||
@BlockRegistry("diamond_block")
|
@BlockRegistry("diamond_block")
|
||||||
public class DiamondBlock extends Block {
|
public class DiamondBlock extends Block {
|
||||||
public DiamondBlock() {
|
public DiamondBlock() {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.diamond;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.diamond;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry("diamond_ore")
|
@BlockRegistry("diamond_ore")
|
||||||
public class DiamondOreBlock extends Block {
|
public class DiamondOreBlock extends Block {
|
||||||
public DiamondOreBlock() {
|
public DiamondOreBlock() {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.gold;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.gold;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@WalkSound(SoundKey.METAL_WALKING)
|
||||||
|
@MiningSound(SoundKey.METAL_MINING)
|
||||||
|
@PlaceSound(SoundKey.METAL_DIG)
|
||||||
|
@MineSound(SoundKey.METAL_DIG)
|
||||||
@BlockRegistry("gold_block")
|
@BlockRegistry("gold_block")
|
||||||
public class GoldBlock extends Block {
|
public class GoldBlock extends Block {
|
||||||
public GoldBlock() {
|
public GoldBlock() {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.gold;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.gold;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry("gold_ore")
|
@BlockRegistry("gold_ore")
|
||||||
public class GoldOreBlock extends Block {
|
public class GoldOreBlock extends Block {
|
||||||
public GoldOreBlock() {
|
public GoldOreBlock() {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.iron;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.iron;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@WalkSound(SoundKey.METAL_WALKING)
|
||||||
|
@MiningSound(SoundKey.METAL_MINING)
|
||||||
|
@PlaceSound(SoundKey.METAL_DIG)
|
||||||
|
@MineSound(SoundKey.METAL_DIG)
|
||||||
@BlockRegistry("iron_block")
|
@BlockRegistry("iron_block")
|
||||||
public class IronBlock extends Block {
|
public class IronBlock extends Block {
|
||||||
public IronBlock() {
|
public IronBlock() {
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.ores.iron;
|
package cz.jzitnik.game.entities.items.registry.blocks.ores.iron;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
import cz.jzitnik.game.entities.items.ToolVariant;
|
import cz.jzitnik.game.entities.items.ToolVariant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.STONE_DIG)
|
||||||
|
@MineSound(SoundKey.STONE_DIG)
|
||||||
|
@WalkSound(SoundKey.STONE_WALKING)
|
||||||
|
@MiningSound(SoundKey.STONE_MINING)
|
||||||
@BlockRegistry("iron_ore")
|
@BlockRegistry("iron_ore")
|
||||||
public class IronOreBlock extends Block {
|
public class IronOreBlock extends Block {
|
||||||
public IronOreBlock() {
|
public IronOreBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("black_wool")
|
@BlockRegistry("black_wool")
|
||||||
public class BlackWoolBlock extends Block {
|
public class BlackWoolBlock extends Block {
|
||||||
public BlackWoolBlock() {
|
public BlackWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("blue_wool")
|
@BlockRegistry("blue_wool")
|
||||||
public class BlueWoolBlock extends Block {
|
public class BlueWoolBlock extends Block {
|
||||||
public BlueWoolBlock() {
|
public BlueWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("brown_wool")
|
@BlockRegistry("brown_wool")
|
||||||
public class BrownWoolBlock extends Block {
|
public class BrownWoolBlock extends Block {
|
||||||
public BrownWoolBlock() {
|
public BrownWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("cyan_wool")
|
@BlockRegistry("cyan_wool")
|
||||||
public class CyanWoolBlock extends Block {
|
public class CyanWoolBlock extends Block {
|
||||||
public CyanWoolBlock() {
|
public CyanWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("gray_wool")
|
@BlockRegistry("gray_wool")
|
||||||
public class GrayWoolBlock extends Block {
|
public class GrayWoolBlock extends Block {
|
||||||
public GrayWoolBlock() {
|
public GrayWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("green_wool")
|
@BlockRegistry("green_wool")
|
||||||
public class GreenWoolBlock extends Block {
|
public class GreenWoolBlock extends Block {
|
||||||
public GreenWoolBlock() {
|
public GreenWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("light_blue_wool")
|
@BlockRegistry("light_blue_wool")
|
||||||
public class LightBlueWoolBlock extends Block {
|
public class LightBlueWoolBlock extends Block {
|
||||||
public LightBlueWoolBlock() {
|
public LightBlueWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("light_gray_wool")
|
@BlockRegistry("light_gray_wool")
|
||||||
public class LightGrayWoolBlock extends Block {
|
public class LightGrayWoolBlock extends Block {
|
||||||
public LightGrayWoolBlock() {
|
public LightGrayWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("lime_wool")
|
@BlockRegistry("lime_wool")
|
||||||
public class LimeWoolBlock extends Block {
|
public class LimeWoolBlock extends Block {
|
||||||
public LimeWoolBlock() {
|
public LimeWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("magenta_wool")
|
@BlockRegistry("magenta_wool")
|
||||||
public class MagentaWoolBlock extends Block {
|
public class MagentaWoolBlock extends Block {
|
||||||
public MagentaWoolBlock() {
|
public MagentaWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("orange_wool")
|
@BlockRegistry("orange_wool")
|
||||||
public class OrangeWoolBlock extends Block {
|
public class OrangeWoolBlock extends Block {
|
||||||
public OrangeWoolBlock() {
|
public OrangeWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("pink_wool")
|
@BlockRegistry("pink_wool")
|
||||||
public class PinkWoolBlock extends Block {
|
public class PinkWoolBlock extends Block {
|
||||||
public PinkWoolBlock() {
|
public PinkWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("purple_wool")
|
@BlockRegistry("purple_wool")
|
||||||
public class PurpleWoolBlock extends Block {
|
public class PurpleWoolBlock extends Block {
|
||||||
public PurpleWoolBlock() {
|
public PurpleWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("red_wool")
|
@BlockRegistry("red_wool")
|
||||||
public class RedWoolBlock extends Block {
|
public class RedWoolBlock extends Block {
|
||||||
public RedWoolBlock() {
|
public RedWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("white_wool")
|
@BlockRegistry("white_wool")
|
||||||
public class WhiteWoolBlock extends Block {
|
public class WhiteWoolBlock extends Block {
|
||||||
public WhiteWoolBlock() {
|
public WhiteWoolBlock() {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
package cz.jzitnik.game.entities.items.registry.blocks.wools;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Wool;
|
import cz.jzitnik.game.sprites.Wool;
|
||||||
|
|
||||||
|
@PlaceSound(SoundKey.WOOL_DIG)
|
||||||
|
@MineSound(SoundKey.WOOL_DIG)
|
||||||
|
@WalkSound(SoundKey.WOOL_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOL_DIG)
|
||||||
@BlockRegistry("yellow_wool")
|
@BlockRegistry("yellow_wool")
|
||||||
public class YellowWoolBlock extends Block {
|
public class YellowWoolBlock extends Block {
|
||||||
public YellowWoolBlock() {
|
public YellowWoolBlock() {
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.work;
|
package cz.jzitnik.game.entities.items.registry.blocks.work;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.ReduceFallDamage;
|
|
||||||
import cz.jzitnik.game.core.reducefalldamage.BedFallDamageReducer;
|
import cz.jzitnik.game.core.reducefalldamage.BedFallDamageReducer;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.sprites.Bed;
|
import cz.jzitnik.game.sprites.Bed;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.WOOD_DIG)
|
||||||
|
@PlaceSound(SoundKey.WOOD_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOD_MINING)
|
||||||
|
@WalkSound(SoundKey.WOOD_WALKING)
|
||||||
@ReduceFallDamage(BedFallDamageReducer.class)
|
@ReduceFallDamage(BedFallDamageReducer.class)
|
||||||
@BlockRegistry("bed")
|
@BlockRegistry("bed")
|
||||||
public class BedBlock extends Block {
|
public class BedBlock extends Block {
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.work;
|
package cz.jzitnik.game.entities.items.registry.blocks.work;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
|
||||||
import cz.jzitnik.game.blocks.Chest;
|
import cz.jzitnik.game.blocks.Chest;
|
||||||
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.WOOD_DIG)
|
||||||
|
@PlaceSound(SoundKey.WOOD_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOD_MINING)
|
||||||
|
@WalkSound(SoundKey.WOOD_WALKING)
|
||||||
@Flamable(false)
|
@Flamable(false)
|
||||||
@BlockRegistry("chest")
|
@BlockRegistry("chest")
|
||||||
public class ChestBlock extends Block {
|
public class ChestBlock extends Block {
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
package cz.jzitnik.game.entities.items.registry.blocks.work;
|
package cz.jzitnik.game.entities.items.registry.blocks.work;
|
||||||
|
|
||||||
import cz.jzitnik.game.SpriteLoader;
|
import cz.jzitnik.game.SpriteLoader;
|
||||||
import cz.jzitnik.game.annotations.BlockRegistry;
|
import cz.jzitnik.game.annotations.*;
|
||||||
import cz.jzitnik.game.annotations.Flamable;
|
import cz.jzitnik.game.core.sound.SoundKey;
|
||||||
import cz.jzitnik.game.entities.Block;
|
import cz.jzitnik.game.entities.Block;
|
||||||
import cz.jzitnik.game.entities.items.ItemType;
|
import cz.jzitnik.game.entities.items.ItemType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@MineSound(SoundKey.WOOD_DIG)
|
||||||
|
@PlaceSound(SoundKey.WOOD_DIG)
|
||||||
|
@MiningSound(SoundKey.WOOD_MINING)
|
||||||
|
@WalkSound(SoundKey.WOOD_WALKING)
|
||||||
@Flamable(false)
|
@Flamable(false)
|
||||||
@BlockRegistry("crafting_table")
|
@BlockRegistry("crafting_table")
|
||||||
public class CraftingTableBlock extends Block {
|
public class CraftingTableBlock extends Block {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user