diff --git a/src/main/java/xyz/limepot/roses_mod/RosesMod.java b/src/main/java/xyz/limepot/roses_mod/RosesMod.java index 41cb6d7..1bab14a 100644 --- a/src/main/java/xyz/limepot/roses_mod/RosesMod.java +++ b/src/main/java/xyz/limepot/roses_mod/RosesMod.java @@ -1,7 +1,7 @@ package xyz.limepot.roses_mod; -import net.minecraft.block.Block; -import net.minecraft.block.Material; +import net.minecraft.block.*; +import net.minecraft.entity.effect.StatusEffects; import net.minecraft.item.BlockItem; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -17,13 +17,21 @@ public class RosesMod implements ModInitializer { public static final String MOD_ID = "roses_mod"; public static final Logger LOGGER = LoggerFactory.getLogger("Roses Mod"); - public static final Block ROSE_FLOWER = new Block(QuiltBlockSettings.of(Material.ORGANIC_PRODUCT).strength(0.3f)); - + public static final Block ROSE_FLOWER = new FlowerBlock(StatusEffects.HASTE, 8, QuiltBlockSettings.copy(Blocks.POPPY)); + public static final Block POTTED_ROSE = new FlowerPotBlock(ROSE_FLOWER, QuiltBlockSettings.copy(Blocks.POTTED_POPPY)); @Override public void onInitialize(ModContainer mod) { + + //REGISTER BLOCKS AND BLOCK ITEMS + //TODO: ADD ITEMS TO CREATIVE TABS + + //ROSE FLOWER Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "rose_flower"), ROSE_FLOWER); Registry.register(Registries.ITEM, new Identifier(MOD_ID, "rose_flower"), new BlockItem(ROSE_FLOWER, new QuiltItemSettings())); + //POTTED ROSE FLOWER + Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "potted_rose"), POTTED_ROSE); + LOGGER.info("Hello Quilt world from {}!", mod.metadata().name()); } diff --git a/src/main/java/xyz/limepot/roses_mod/RosesModClient.java b/src/main/java/xyz/limepot/roses_mod/RosesModClient.java new file mode 100644 index 0000000..7a60b65 --- /dev/null +++ b/src/main/java/xyz/limepot/roses_mod/RosesModClient.java @@ -0,0 +1,14 @@ +package xyz.limepot.roses_mod; + +import net.fabricmc.api.ClientModInitializer; +import net.minecraft.client.render.RenderLayer; +import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import xyz.limepot.roses_mod.RosesMod; + +public abstract class RosesModClient implements ClientModInitializer { + @Override + public void onInitializeClient() { + BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.POTTED_ROSE); + BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER); + } +} diff --git a/src/main/resources/assets/roses_mod/blockstates/potted_rose.json b/src/main/resources/assets/roses_mod/blockstates/potted_rose.json new file mode 100644 index 0000000..4f5619d --- /dev/null +++ b/src/main/resources/assets/roses_mod/blockstates/potted_rose.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "roses_mod:block/potted_rose"} + } +} diff --git a/src/main/resources/assets/roses_mod/blockstates/rose_flower.json b/src/main/resources/assets/roses_mod/blockstates/rose_flower.json new file mode 100644 index 0000000..66aeb91 --- /dev/null +++ b/src/main/resources/assets/roses_mod/blockstates/rose_flower.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "roses_mod:block/rose_flower"} + } +} diff --git a/src/main/resources/assets/roses_mod/lang/en_us.json b/src/main/resources/assets/roses_mod/lang/en_us.json new file mode 100644 index 0000000..d83ec07 --- /dev/null +++ b/src/main/resources/assets/roses_mod/lang/en_us.json @@ -0,0 +1,4 @@ +{ + "block.roses_mod.rose_flower": "Rose", + "block.roses_mod.potted_rose": "Potted Rose" +} diff --git a/src/main/resources/assets/roses_mod/models/block/potted_rose.json b/src/main/resources/assets/roses_mod/models/block/potted_rose.json new file mode 100644 index 0000000..01d5d8d --- /dev/null +++ b/src/main/resources/assets/roses_mod/models/block/potted_rose.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/flower_pot_cross", + "textures": { + "cross": "roses_mod:block/rose_flower" + } +} diff --git a/src/main/resources/assets/roses_mod/models/block/rose_flower.json b/src/main/resources/assets/roses_mod/models/block/rose_flower.json new file mode 100644 index 0000000..ba4e661 --- /dev/null +++ b/src/main/resources/assets/roses_mod/models/block/rose_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "roses_mod:block/rose_flower" + } +} diff --git a/src/main/resources/assets/roses_mod/models/item/rose_flower.json b/src/main/resources/assets/roses_mod/models/item/rose_flower.json new file mode 100644 index 0000000..11dc496 --- /dev/null +++ b/src/main/resources/assets/roses_mod/models/item/rose_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "roses_mod:block/rose_flower" + } +} diff --git a/src/main/resources/assets/roses_mod/textures/block/rose.png b/src/main/resources/assets/roses_mod/textures/block/rose.png new file mode 100644 index 0000000..51d9847 Binary files /dev/null and b/src/main/resources/assets/roses_mod/textures/block/rose.png differ diff --git a/src/main/resources/assets/roses_mod/textures/block/rose_flower.png b/src/main/resources/assets/roses_mod/textures/block/rose_flower.png new file mode 100644 index 0000000..e751cc3 Binary files /dev/null and b/src/main/resources/assets/roses_mod/textures/block/rose_flower.png differ diff --git a/src/main/resources/assets/roses_mod/textures/blocks/flower_rose.png b/src/main/resources/assets/roses_mod/textures/blocks/flower_rose.png deleted file mode 100644 index 895d78f..0000000 Binary files a/src/main/resources/assets/roses_mod/textures/blocks/flower_rose.png and /dev/null differ diff --git a/src/main/resources/quilt.mod.json b/src/main/resources/quilt.mod.json index d32f984..7ad8d88 100644 --- a/src/main/resources/quilt.mod.json +++ b/src/main/resources/quilt.mod.json @@ -19,7 +19,8 @@ }, "intermediate_mappings": "net.fabricmc:intermediary", "entrypoints": { - "init": "xyz.limepot.roses_mod.RosesMod" + "init": "xyz.limepot.roses_mod.RosesMod", + "clientmod": "xyz.limepot.roses_mod.RosesModClient" }, "depends": [ {