diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameItems.java b/core/src/ru/deadsoftware/cavedroid/game/GameItems.java
index 4024c3614c111a17c64c689ad8fc80b5a500a05e..370f1b0081367e6d601100cf7b630576f1091fcd 100644 (file)
return getBlock(id) instanceof Block.Slab;
}
- public static boolean fluidCanFlowThere(int thisId, int thatId) {
- return thatId == 0 || (!getBlock(thatId).hasCollision() && !isFluid(thatId)) ||
- (isWater(thisId) && isWater(thatId) && thisId < thatId) ||
- (isLava(thisId) && isLava(thatId) && thisId < thatId);
- }
-
public static Block getBlock(int id) {
return blocks.getValueAt(id);
}
int id = Assets.getIntFromJson(block, "id", count);
int dropCount = Assets.getIntFromJson(block, "drop_count", 1);
String fullBlock = Assets.getStringFromJson(block, "full_block", null);
+ int state = Assets.getIntFromJson(block, "state", 0);
blocksIds.put(key, id);
if (count >= id) {
);
Block newBlock = switch (meta) {
- case "water" -> new Block.Water(params);
- case "lava" -> new Block.Lava(params);
+ case "water" -> new Block.Water(params, state);
+ case "lava" -> new Block.Lava(params, state);
case "slab" -> new Block.Slab(params, fullBlock);
default -> new Block.Normal(params);
};