From 55f66961fef1e5420df8fd9d73a8fe5c6d00ea6a Mon Sep 17 00:00:00 2001 From: jull Date: Wed, 26 Mar 2025 17:44:35 +0100 Subject: [PATCH] chore: tall flowers --- .../java/cz/jzitnik/game/SpriteLoader.java | 12 +++++++++ .../recipes/dyes/MagentaDye2Recipe.java | 14 +++++++++++ .../crafting/recipes/dyes/PinkDye2Recipe.java | 14 +++++++++++ .../crafting/recipes/dyes/RedDye3Recipe.java | 14 +++++++++++ .../recipes/dyes/YellowDye2Recipe.java | 14 +++++++++++ .../blocks/grassy/flowers/PeonyBlock.java | 21 ++++++++++++++++ .../blocks/grassy/flowers/RoseBushBlock.java | 21 ++++++++++++++++ .../blocks/grassy/flowers/SunflowerBlock.java | 21 ++++++++++++++++ .../items/grassy/flowers/PeonyItem.java | 13 ++++++++++ .../items/grassy/flowers/RoseBushItem.java | 13 ++++++++++ .../items/grassy/flowers/SunflowerItem.java | 13 ++++++++++ src/main/resources/textures/items/peony.ans | 25 +++++++++++++++++++ .../resources/textures/items/rose_bush.ans | 25 +++++++++++++++++++ .../resources/textures/items/sunflower.ans | 25 +++++++++++++++++++ src/main/resources/textures/peony_bottom.ans | 25 +++++++++++++++++++ src/main/resources/textures/peony_top.ans | 25 +++++++++++++++++++ .../resources/textures/rose_bush_bottom.ans | 25 +++++++++++++++++++ src/main/resources/textures/rose_bush_top.ans | 25 +++++++++++++++++++ .../resources/textures/sunflower_bottom.ans | 25 +++++++++++++++++++ src/main/resources/textures/sunflower_top.ans | 25 +++++++++++++++++++ 20 files changed, 395 insertions(+) create mode 100644 src/main/java/cz/jzitnik/game/crafting/recipes/dyes/MagentaDye2Recipe.java create mode 100644 src/main/java/cz/jzitnik/game/crafting/recipes/dyes/PinkDye2Recipe.java create mode 100644 src/main/java/cz/jzitnik/game/crafting/recipes/dyes/RedDye3Recipe.java create mode 100644 src/main/java/cz/jzitnik/game/crafting/recipes/dyes/YellowDye2Recipe.java create mode 100644 src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/PeonyBlock.java create mode 100644 src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/RoseBushBlock.java create mode 100644 src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/SunflowerBlock.java create mode 100644 src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/PeonyItem.java create mode 100644 src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/RoseBushItem.java create mode 100644 src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/SunflowerItem.java create mode 100644 src/main/resources/textures/items/peony.ans create mode 100644 src/main/resources/textures/items/rose_bush.ans create mode 100644 src/main/resources/textures/items/sunflower.ans create mode 100644 src/main/resources/textures/peony_bottom.ans create mode 100644 src/main/resources/textures/peony_top.ans create mode 100644 src/main/resources/textures/rose_bush_bottom.ans create mode 100644 src/main/resources/textures/rose_bush_top.ans create mode 100644 src/main/resources/textures/sunflower_bottom.ans create mode 100644 src/main/resources/textures/sunflower_top.ans diff --git a/src/main/java/cz/jzitnik/game/SpriteLoader.java b/src/main/java/cz/jzitnik/game/SpriteLoader.java index 24c4ef7..cbc30d0 100644 --- a/src/main/java/cz/jzitnik/game/SpriteLoader.java +++ b/src/main/java/cz/jzitnik/game/SpriteLoader.java @@ -48,6 +48,9 @@ public class SpriteLoader { AZURE_BLUET, LILY_OF_THE_VALLEY, LILAC, + PEONY, + ROSE_BUSH, + SUNFLOWER, // Ores COAL_ORE, @@ -109,6 +112,9 @@ public class SpriteLoader { // Tall Flowers ITEM_LILAC, + ITEM_PEONY, + ITEM_ROSE_BUSH, + ITEM_SUNFLOWER, // Ore Items ITEM_COAL_ORE, @@ -247,6 +253,9 @@ public class SpriteLoader { SPRITES_MAP.put(SPRITES.OXEYE_DAISY, new SimpleSprite("oxeye_daisy.ans")); SPRITES_MAP.put(SPRITES.AZURE_BLUET, new SimpleSprite("azure_bluet.ans")); SPRITES_MAP.put(SPRITES.LILAC, new TwoBlockSprite("lilac_top.ans", "lilac_bottom.ans")); + SPRITES_MAP.put(SPRITES.PEONY, new TwoBlockSprite("peony_top.ans", "peony_bottom.ans")); + SPRITES_MAP.put(SPRITES.ROSE_BUSH, new TwoBlockSprite("rose_bush_top.ans", "rose_bush_bottom.ans")); + SPRITES_MAP.put(SPRITES.SUNFLOWER, new TwoBlockSprite("sunflower_top.ans", "sunflower_bottom.ans")); // Grass SPRITES_MAP.put(SPRITES.GRASS_BUSH, new SimpleSprite("grass_bush.ans")); @@ -295,6 +304,9 @@ public class SpriteLoader { // Tall flowers SPRITES_MAP.put(SPRITES.ITEM_LILAC, new SimpleSprite("items/lilac.ans")); + SPRITES_MAP.put(SPRITES.ITEM_PEONY, new SimpleSprite("items/peony.ans")); + SPRITES_MAP.put(SPRITES.ITEM_ROSE_BUSH, new SimpleSprite("items/rose_bush.ans")); + SPRITES_MAP.put(SPRITES.ITEM_SUNFLOWER, new SimpleSprite("items/sunflower.ans")); // Ore Items SPRITES_MAP.put(SPRITES.ITEM_COAL_ORE, new SimpleSprite("items/coal_ore.ans")); diff --git a/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/MagentaDye2Recipe.java b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/MagentaDye2Recipe.java new file mode 100644 index 0000000..d7542f6 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/MagentaDye2Recipe.java @@ -0,0 +1,14 @@ +package cz.jzitnik.game.crafting.recipes.dyes; + +import cz.jzitnik.game.annotations.CraftingRecipeRegistry; + +@CraftingRecipeRegistry( + recipe = { + "lilac", "_", "_", + "_", "_", "_", + "_", "_", "_" + }, + result = "magenta_dye", + amount = 2 +) +public class MagentaDye2Recipe {} diff --git a/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/PinkDye2Recipe.java b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/PinkDye2Recipe.java new file mode 100644 index 0000000..96d4379 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/PinkDye2Recipe.java @@ -0,0 +1,14 @@ +package cz.jzitnik.game.crafting.recipes.dyes; + +import cz.jzitnik.game.annotations.CraftingRecipeRegistry; + +@CraftingRecipeRegistry( + recipe = { + "peony", "_", "_", + "_", "_", "_", + "_", "_", "_" + }, + result = "pink_dye", + amount = 2 +) +public class PinkDye2Recipe {} diff --git a/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/RedDye3Recipe.java b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/RedDye3Recipe.java new file mode 100644 index 0000000..77fa553 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/RedDye3Recipe.java @@ -0,0 +1,14 @@ +package cz.jzitnik.game.crafting.recipes.dyes; + +import cz.jzitnik.game.annotations.CraftingRecipeRegistry; + +@CraftingRecipeRegistry( + recipe = { + "rose_bush", "_", "_", + "_", "_", "_", + "_", "_", "_" + }, + result = "red_dye", + amount = 2 +) +public class RedDye3Recipe {} diff --git a/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/YellowDye2Recipe.java b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/YellowDye2Recipe.java new file mode 100644 index 0000000..0968d40 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/crafting/recipes/dyes/YellowDye2Recipe.java @@ -0,0 +1,14 @@ +package cz.jzitnik.game.crafting.recipes.dyes; + +import cz.jzitnik.game.annotations.CraftingRecipeRegistry; + +@CraftingRecipeRegistry( + recipe = { + "sunflower", "_", "_", + "_", "_", "_", + "_", "_", "_" + }, + result = "yellow_dye", + amount = 2 +) +public class YellowDye2Recipe {} diff --git a/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/PeonyBlock.java b/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/PeonyBlock.java new file mode 100644 index 0000000..dcc1ce7 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/PeonyBlock.java @@ -0,0 +1,21 @@ +package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers; + +import cz.jzitnik.game.SpriteLoader; +import cz.jzitnik.game.annotations.BlockRegistry; +import cz.jzitnik.game.annotations.BreakableByWater; +import cz.jzitnik.game.annotations.BreaksFalling; +import cz.jzitnik.game.annotations.PlaceOnSolid; +import cz.jzitnik.game.annotations.TwoblockBlock; +import cz.jzitnik.game.entities.Block; + +@PlaceOnSolid +@BreakableByWater +@BreaksFalling +@TwoblockBlock +@BlockRegistry(value = "peony") +public class PeonyBlock extends Block { + public PeonyBlock() { + super("peony", SpriteLoader.SPRITES.PEONY, 0); + setGhost(true); + } +} diff --git a/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/RoseBushBlock.java b/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/RoseBushBlock.java new file mode 100644 index 0000000..52b5cb5 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/RoseBushBlock.java @@ -0,0 +1,21 @@ +package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers; + +import cz.jzitnik.game.SpriteLoader; +import cz.jzitnik.game.annotations.BlockRegistry; +import cz.jzitnik.game.annotations.BreakableByWater; +import cz.jzitnik.game.annotations.BreaksFalling; +import cz.jzitnik.game.annotations.PlaceOnSolid; +import cz.jzitnik.game.annotations.TwoblockBlock; +import cz.jzitnik.game.entities.Block; + +@PlaceOnSolid +@BreakableByWater +@BreaksFalling +@TwoblockBlock +@BlockRegistry(value = "rose_bush") +public class RoseBushBlock extends Block { + public RoseBushBlock() { + super("rose_bush", SpriteLoader.SPRITES.ROSE_BUSH, 0); + setGhost(true); + } +} diff --git a/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/SunflowerBlock.java b/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/SunflowerBlock.java new file mode 100644 index 0000000..66f9cc4 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/entities/items/registry/blocks/grassy/flowers/SunflowerBlock.java @@ -0,0 +1,21 @@ +package cz.jzitnik.game.entities.items.registry.blocks.grassy.flowers; + +import cz.jzitnik.game.SpriteLoader; +import cz.jzitnik.game.annotations.BlockRegistry; +import cz.jzitnik.game.annotations.BreakableByWater; +import cz.jzitnik.game.annotations.BreaksFalling; +import cz.jzitnik.game.annotations.PlaceOnSolid; +import cz.jzitnik.game.annotations.TwoblockBlock; +import cz.jzitnik.game.entities.Block; + +@PlaceOnSolid +@BreakableByWater +@BreaksFalling +@TwoblockBlock +@BlockRegistry(value = "sunflower") +public class SunflowerBlock extends Block { + public SunflowerBlock() { + super("sunflower", SpriteLoader.SPRITES.SUNFLOWER, 0); + setGhost(true); + } +} diff --git a/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/PeonyItem.java b/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/PeonyItem.java new file mode 100644 index 0000000..5a69d2a --- /dev/null +++ b/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/PeonyItem.java @@ -0,0 +1,13 @@ +package cz.jzitnik.game.entities.items.registry.items.grassy.flowers; + +import cz.jzitnik.game.SpriteLoader; +import cz.jzitnik.game.annotations.ItemRegistry; +import cz.jzitnik.game.entities.items.Item; +import cz.jzitnik.game.entities.items.ItemType; + +@ItemRegistry("peony") +public class PeonyItem extends Item { + public PeonyItem() { + super("peony", "Peony", ItemType.BLOCK, SpriteLoader.SPRITES.ITEM_PEONY); + } +} diff --git a/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/RoseBushItem.java b/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/RoseBushItem.java new file mode 100644 index 0000000..3ecc9b6 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/RoseBushItem.java @@ -0,0 +1,13 @@ +package cz.jzitnik.game.entities.items.registry.items.grassy.flowers; + +import cz.jzitnik.game.SpriteLoader; +import cz.jzitnik.game.annotations.ItemRegistry; +import cz.jzitnik.game.entities.items.Item; +import cz.jzitnik.game.entities.items.ItemType; + +@ItemRegistry("rose_bush") +public class RoseBushItem extends Item { + public RoseBushItem() { + super("rose_bush", "Rose bush", ItemType.BLOCK, SpriteLoader.SPRITES.ITEM_ROSE_BUSH); + } +} diff --git a/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/SunflowerItem.java b/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/SunflowerItem.java new file mode 100644 index 0000000..6e91eb7 --- /dev/null +++ b/src/main/java/cz/jzitnik/game/entities/items/registry/items/grassy/flowers/SunflowerItem.java @@ -0,0 +1,13 @@ +package cz.jzitnik.game.entities.items.registry.items.grassy.flowers; + +import cz.jzitnik.game.SpriteLoader; +import cz.jzitnik.game.annotations.ItemRegistry; +import cz.jzitnik.game.entities.items.Item; +import cz.jzitnik.game.entities.items.ItemType; + +@ItemRegistry("sunflower") +public class SunflowerItem extends Item { + public SunflowerItem() { + super("sunflower", "Sunflower", ItemType.BLOCK, SpriteLoader.SPRITES.ITEM_SUNFLOWER); + } +} diff --git a/src/main/resources/textures/items/peony.ans b/src/main/resources/textures/items/peony.ans new file mode 100644 index 0000000..d654722 --- /dev/null +++ b/src/main/resources/textures/items/peony.ans @@ -0,0 +1,25 @@ +                                                   +                                                   +                                                   +                                                   +                                                   +                                                   +                                                  +                                                  +                                     +                         +                         +                        +                          +                          +                              +                              +                               +                          +                          +                       +                            +                            +                           +                                   +                                   diff --git a/src/main/resources/textures/items/rose_bush.ans b/src/main/resources/textures/items/rose_bush.ans new file mode 100644 index 0000000..1308b4d --- /dev/null +++ b/src/main/resources/textures/items/rose_bush.ans @@ -0,0 +1,25 @@ +                                                   +                                                   +                                              +                                         +                                         +                                         +                                 +                                 +                                +                                +                                +                                     +                                      +                                      +                                     +                                     +                                       +                                        +                                        +                                        +                                     +                                     +                                 +                                    +                                    diff --git a/src/main/resources/textures/items/sunflower.ans b/src/main/resources/textures/items/sunflower.ans new file mode 100644 index 0000000..86db0c7 --- /dev/null +++ b/src/main/resources/textures/items/sunflower.ans @@ -0,0 +1,25 @@ +                                                   +                                                   +                                                   +                                                   +                                                   +                                                   +                                        +                                        +                                      +                                +                                +                               +                                 +                                 +                                +                                +                                     +                                        +                                        +                                                   +                                                   +                                                   +                                                   +                                                   +                                                   diff --git a/src/main/resources/textures/peony_bottom.ans b/src/main/resources/textures/peony_bottom.ans new file mode 100644 index 0000000..359e556 --- /dev/null +++ b/src/main/resources/textures/peony_bottom.ans @@ -0,0 +1,25 @@ +                                +                                +                              +                                +                                +                            +                             +                             +                      +                          +                          +                            +                              +                              +                          +                          +                        +                                +                                +                                       +                                      +                                      +                                         +                                          +                                          diff --git a/src/main/resources/textures/peony_top.ans b/src/main/resources/textures/peony_top.ans new file mode 100644 index 0000000..d654722 --- /dev/null +++ b/src/main/resources/textures/peony_top.ans @@ -0,0 +1,25 @@ +                                                   +                                                   +                                                   +                                                   +                                                   +                                                   +                                                  +                                                  +                                     +                         +                         +                        +                          +                          +                              +                              +                               +                          +                          +                       +                            +                            +                           +                                   +                                   diff --git a/src/main/resources/textures/rose_bush_bottom.ans b/src/main/resources/textures/rose_bush_bottom.ans new file mode 100644 index 0000000..f430516 --- /dev/null +++ b/src/main/resources/textures/rose_bush_bottom.ans @@ -0,0 +1,25 @@ +                                       +                                       +                                  +                               +                               +                        +                            +                            +                               +                 +                 +               +                 +                 +                   +                   +                          +                               +                               +                                +                           +                           +                                +                        +                        diff --git a/src/main/resources/textures/rose_bush_top.ans b/src/main/resources/textures/rose_bush_top.ans new file mode 100644 index 0000000..1308b4d --- /dev/null +++ b/src/main/resources/textures/rose_bush_top.ans @@ -0,0 +1,25 @@ +                                                   +                                                   +                                              +                                         +                                         +                                         +                                 +                                 +                                +                                +                                +                                     +                                      +                                      +                                     +                                     +                                       +                                        +                                        +                                        +                                     +                                     +                                 +                                    +                                    diff --git a/src/main/resources/textures/sunflower_bottom.ans b/src/main/resources/textures/sunflower_bottom.ans new file mode 100644 index 0000000..dbe5ee9 --- /dev/null +++ b/src/main/resources/textures/sunflower_bottom.ans @@ -0,0 +1,25 @@ +                                            +                                            +                                           +                                               +                                               +                                          +                                       +                                       +                                       +                                            +                                            +                                            +                                           +                                           +                                          +                                          +                                       +                                      +                                      +                                       +                                          +                                          +                                               +                                              +                                              diff --git a/src/main/resources/textures/sunflower_top.ans b/src/main/resources/textures/sunflower_top.ans new file mode 100644 index 0000000..dd340af --- /dev/null +++ b/src/main/resources/textures/sunflower_top.ans @@ -0,0 +1,25 @@ +                                                   +                                        +                                        +                                      +                                +                                +                               +                                 +                                 +                                +                                +                                     +                                        +                                        +                                               +                                               +                                           +                                      +                                      +                                       +                                          +                                          +                                            +                                               +