diff --git a/MC1.20.6/build.gradle.kts b/MC1.20.6/build.gradle.kts index 914c06e..7d6ef3c 100644 --- a/MC1.20.6/build.gradle.kts +++ b/MC1.20.6/build.gradle.kts @@ -38,7 +38,6 @@ dependencies { mappings("net.fabricmc:yarn:${project.property("yarn_mappings")}:v2") modImplementation("net.fabricmc:fabric-loader:${project.property("loader_version")}") modImplementation("net.fabricmc:fabric-language-kotlin:${project.property("kotlin_loader_version")}") - modImplementation("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_version")}") } diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesBlocks.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesBlocks.kt new file mode 100644 index 0000000..1960bbb --- /dev/null +++ b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesBlocks.kt @@ -0,0 +1,50 @@ +@file:Suppress( + "ktlint:standard:class-naming", + "ktlint:standard:filename", + "ktlint:standard:no-wildcard-imports", + "ktlint:standard:package-name", +) + +package observer.nelle.roses_mod + +import net.minecraft.block.AbstractBlock +import net.minecraft.block.Block +import net.minecraft.block.Blocks +import net.minecraft.block.FlowerBlock +import net.minecraft.entity.effect.StatusEffects +import net.minecraft.item.BlockItem +import net.minecraft.item.Item +import net.minecraft.registry.Registries +import net.minecraft.registry.Registry +import net.minecraft.util.Identifier + +class RosesBlocks { + val roseFlower: Block? = + register( + FlowerBlock( + StatusEffects.INSTANT_DAMAGE, + 6F, + AbstractBlock.Settings.copy(Blocks.POPPY), + ), + "rose_flower", + true, + ) + + fun register( + block: Block?, + name: String?, + shouldRegisterItem: Boolean, + ): Block? { + // Register the block and its item. + val id: Identifier? = Identifier.of(MOD_ID, name) + + // Sometimes, you may not want to register an item for the block. + // Eg: if it's a technical block like `minecraft:air` or `minecraft:end_gateway` + if (shouldRegisterItem) { + val blockItem = BlockItem(block, Item.Settings()) + Registry.register(Registries.ITEM, id, blockItem) + } + + return Registry.register(Registries.BLOCK, id, block) + } +} diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt new file mode 100644 index 0000000..97d2584 --- /dev/null +++ b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/RosesMod.kt @@ -0,0 +1,30 @@ +@file:Suppress( + "ktlint:standard:class-naming", + "ktlint:standard:filename", + "ktlint:standard:no-wildcard-imports", + "ktlint:standard:package-name", +) + +package observer.nelle.roses_mod + +import net.fabricmc.api.ModInitializer +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +val LOGGER: Logger = LoggerFactory.getLogger("roses") +const val MOD_ID = "roses_mod" + +class roses_mod : ModInitializer { + override fun onInitialize() { + LOGGER.info("just like old times?") + + /* TODO: + * - blocks/items + * - register worldgen + * - biome modification + * - creative tabs + * */ + + RosesBlocks() + } +} diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/client/RosesModClient.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/client/RosesModClient.kt new file mode 100644 index 0000000..b1f5a13 --- /dev/null +++ b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/client/RosesModClient.kt @@ -0,0 +1,14 @@ +@file:Suppress("ktlint:standard:filename", "ktlint:standard:package-name", "ktlint:standard:class-naming") + +package observer.nelle.roses_mod.client + +import net.fabricmc.api.ClientModInitializer +import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap +import net.minecraft.client.render.RenderLayer +import observer.nelle.roses_mod.RosesBlocks + +class RosesModClient : ClientModInitializer { + override fun onInitializeClient() { + BlockRenderLayerMap.INSTANCE.putBlock(RosesBlocks().roseFlower, RenderLayer.getCutout()) + } +} diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/client/roses_modClient.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/client/roses_modClient.kt deleted file mode 100644 index b7e1283..0000000 --- a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/client/roses_modClient.kt +++ /dev/null @@ -1,10 +0,0 @@ -@file:Suppress("ktlint:standard:filename", "ktlint:standard:package-name", "ktlint:standard:class-naming") - -package observer.nelle.roses_mod.client - -import net.fabricmc.api.ClientModInitializer - -class roses_modClient : ClientModInitializer { - override fun onInitializeClient() { - } -} diff --git a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/roses_mod.kt b/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/roses_mod.kt deleted file mode 100644 index d08d260..0000000 --- a/MC1.20.6/src/main/kotlin/observer/nelle/roses_mod/roses_mod.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("ktlint:standard:filename", "ktlint:standard:package-name", "ktlint:standard:class-naming") - -package observer.nelle.roses_mod - -import net.fabricmc.api.ModInitializer -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -val LOGGER: Logger = LoggerFactory.getLogger("roses") -val MOD_ID = "roses_mod" - -class roses_mod : ModInitializer { - override fun onInitialize() { - LOGGER.info("just like old times?") - } -} diff --git a/MC1.20.6/src/main/resources/roses_mod/blockstates/cyan_rose.json b/MC1.20.6/src/main/resources/assets/roses_mod/blockstates/cyan_rose.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/blockstates/cyan_rose.json rename to MC1.20.6/src/main/resources/assets/roses_mod/blockstates/cyan_rose.json diff --git a/MC1.20.6/src/main/resources/roses_mod/blockstates/cyan_rose_bush.json b/MC1.20.6/src/main/resources/assets/roses_mod/blockstates/cyan_rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/blockstates/cyan_rose_bush.json rename to MC1.20.6/src/main/resources/assets/roses_mod/blockstates/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/roses_mod/blockstates/potted_cyan.json b/MC1.20.6/src/main/resources/assets/roses_mod/blockstates/potted_cyan.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/blockstates/potted_cyan.json rename to MC1.20.6/src/main/resources/assets/roses_mod/blockstates/potted_cyan.json diff --git a/MC1.20.6/src/main/resources/roses_mod/blockstates/potted_rose.json b/MC1.20.6/src/main/resources/assets/roses_mod/blockstates/potted_rose.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/blockstates/potted_rose.json rename to MC1.20.6/src/main/resources/assets/roses_mod/blockstates/potted_rose.json diff --git a/MC1.20.6/src/main/resources/roses_mod/blockstates/rose_flower.json b/MC1.20.6/src/main/resources/assets/roses_mod/blockstates/rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/blockstates/rose_flower.json rename to MC1.20.6/src/main/resources/assets/roses_mod/blockstates/rose_flower.json diff --git a/MC1.20.6/src/main/resources/roses_mod/icon.png b/MC1.20.6/src/main/resources/assets/roses_mod/icon.png similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/icon.png rename to MC1.20.6/src/main/resources/assets/roses_mod/icon.png diff --git a/MC1.20.6/src/main/resources/roses_mod/lang/en_us.json b/MC1.20.6/src/main/resources/assets/roses_mod/lang/en_us.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/lang/en_us.json rename to MC1.20.6/src/main/resources/assets/roses_mod/lang/en_us.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/block/cyan_rose.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/block/cyan_rose.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/block/cyan_rose.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/block/cyan_rose.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/block/cyan_rose_bush_bottom.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/block/cyan_rose_bush_bottom.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/block/cyan_rose_bush_bottom.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/block/cyan_rose_bush_bottom.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/block/cyan_rose_bush_top.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/block/cyan_rose_bush_top.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/block/cyan_rose_bush_top.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/block/cyan_rose_bush_top.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/block/potted_cyan.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/block/potted_cyan.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/block/potted_cyan.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/block/potted_cyan.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/block/potted_rose.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/block/potted_rose.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/block/potted_rose.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/block/potted_rose.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/block/rose_flower.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/block/rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/block/rose_flower.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/block/rose_flower.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/item/cyan_rose.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/item/cyan_rose.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/item/cyan_rose.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/item/cyan_rose.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/item/cyan_rose_bush.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/item/cyan_rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/item/cyan_rose_bush.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/item/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/roses_mod/models/item/rose_flower.json b/MC1.20.6/src/main/resources/assets/roses_mod/models/item/rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/models/item/rose_flower.json rename to MC1.20.6/src/main/resources/assets/roses_mod/models/item/rose_flower.json diff --git a/MC1.20.6/src/main/resources/roses_mod/textures/block/cyan_rose.png b/MC1.20.6/src/main/resources/assets/roses_mod/textures/block/cyan_rose.png similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/textures/block/cyan_rose.png rename to MC1.20.6/src/main/resources/assets/roses_mod/textures/block/cyan_rose.png diff --git a/MC1.20.6/src/main/resources/roses_mod/textures/block/cyan_rose_bush_bottom.png b/MC1.20.6/src/main/resources/assets/roses_mod/textures/block/cyan_rose_bush_bottom.png similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/textures/block/cyan_rose_bush_bottom.png rename to MC1.20.6/src/main/resources/assets/roses_mod/textures/block/cyan_rose_bush_bottom.png diff --git a/MC1.20.6/src/main/resources/roses_mod/textures/block/cyan_rose_bush_top.png b/MC1.20.6/src/main/resources/assets/roses_mod/textures/block/cyan_rose_bush_top.png similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/textures/block/cyan_rose_bush_top.png rename to MC1.20.6/src/main/resources/assets/roses_mod/textures/block/cyan_rose_bush_top.png diff --git a/MC1.20.6/src/main/resources/roses_mod/textures/block/rose_flower.png b/MC1.20.6/src/main/resources/assets/roses_mod/textures/block/rose_flower.png similarity index 100% rename from MC1.20.6/src/main/resources/roses_mod/textures/block/rose_flower.png rename to MC1.20.6/src/main/resources/assets/roses_mod/textures/block/rose_flower.png diff --git a/MC1.20.6/src/main/resources/fabric.mod.json b/MC1.20.6/src/main/resources/fabric.mod.json index b2d3e8f..4fb9c11 100644 --- a/MC1.20.6/src/main/resources/fabric.mod.json +++ b/MC1.20.6/src/main/resources/fabric.mod.json @@ -15,11 +15,13 @@ }, "license": "LGPL-3.0", - "icon": "roses_mod/icon.png", + "icon": "assets/roses_mod/icon.png", "environment": "*", "entrypoints": { - "client": ["observer.nelle.roses_mod.client.roses_modClient"], + "client": [ + "observer.nelle.roses_mod.client.RosesModClient" + ], "main": ["observer.nelle.roses_mod.roses_mod"] }, @@ -31,10 +33,5 @@ "fabric-language-kotlin": ">=${kotlin_loader_version}", "fabric": "*", "minecraft": "${minecraft_version}" - }, - - "modmenu:api": true, - "modmenu": { - "update_checker": true } } diff --git a/MC1.20.6/src/main/resources/data/minecraft/tags/blocks/flower_pots.json b/MC1.20.6/src/main/resources/ignore/data/minecraft/tags/blocks/flower_pots.json similarity index 100% rename from MC1.20.6/src/main/resources/data/minecraft/tags/blocks/flower_pots.json rename to MC1.20.6/src/main/resources/ignore/data/minecraft/tags/blocks/flower_pots.json diff --git a/MC1.20.6/src/main/resources/data/minecraft/tags/blocks/small_flowers.json b/MC1.20.6/src/main/resources/ignore/data/minecraft/tags/blocks/small_flowers.json similarity index 100% rename from MC1.20.6/src/main/resources/data/minecraft/tags/blocks/small_flowers.json rename to MC1.20.6/src/main/resources/ignore/data/minecraft/tags/blocks/small_flowers.json diff --git a/MC1.20.6/src/main/resources/data/minecraft/tags/blocks/tall_flowers.json b/MC1.20.6/src/main/resources/ignore/data/minecraft/tags/blocks/tall_flowers.json similarity index 100% rename from MC1.20.6/src/main/resources/data/minecraft/tags/blocks/tall_flowers.json rename to MC1.20.6/src/main/resources/ignore/data/minecraft/tags/blocks/tall_flowers.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/loot_tables/blocks/cyan_rose.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/loot_tables/blocks/cyan_rose.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose_bush.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/loot_tables/blocks/cyan_rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose_bush.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/loot_tables/blocks/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/loot_tables/blocks/rose_flower.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/loot_tables/blocks/rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/loot_tables/blocks/rose_flower.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/loot_tables/blocks/rose_flower.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/recipes/cyan_dye.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/cyan_dye.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/recipes/cyan_dye.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/cyan_dye.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/recipes/cyan_rose_bush.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/cyan_rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/recipes/cyan_rose_bush.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/recipes/red_dye.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/red_dye.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/recipes/red_dye.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/red_dye.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/recipes/rose_bush.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/recipes/rose_bush.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/recipes/rose_bush.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/configured_feature/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/configured_feature/cyan_rose_flower.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/worldgen/configured_feature/rose_flower.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/configured_feature/rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/worldgen/configured_feature/rose_flower.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/configured_feature/rose_flower.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/worldgen/placed_feature/cyan_rose_bush.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/placed_feature/cyan_rose_bush.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/worldgen/placed_feature/cyan_rose_bush.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/placed_feature/cyan_rose_bush.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/worldgen/placed_feature/cyan_rose_flower.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/placed_feature/cyan_rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/worldgen/placed_feature/cyan_rose_flower.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/placed_feature/cyan_rose_flower.json diff --git a/MC1.20.6/src/main/resources/data/roses_mod/worldgen/placed_feature/rose_flower.json b/MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/placed_feature/rose_flower.json similarity index 100% rename from MC1.20.6/src/main/resources/data/roses_mod/worldgen/placed_feature/rose_flower.json rename to MC1.20.6/src/main/resources/ignore/data/roses_mod/worldgen/placed_feature/rose_flower.json diff --git a/legacy/src/main/java/observer/nelle/roses_mod/RosesModClient.java b/legacy/src/main/java/observer/nelle/roses_mod/RosesModClient.java index 85231cb..0714f52 100644 --- a/legacy/src/main/java/observer/nelle/roses_mod/RosesModClient.java +++ b/legacy/src/main/java/observer/nelle/roses_mod/RosesModClient.java @@ -4,9 +4,8 @@ package observer.nelle.roses_mod; import net.fabricmc.api.ClientModInitializer; public class RosesModClient implements ClientModInitializer { - public void onInitializeClient() { - /* TODO: Uncomment and update - //ROSE FLOWER + public void onInitializeClient() {//ROSE FLOWER + /* BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.POTTED_ROSE); BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.ROSE_FLOWER); @@ -16,6 +15,7 @@ public class RosesModClient implements ClientModInitializer { //CYAN ROSE BUSH BlockRenderLayerMap.put(RenderLayer.getCutout(), RosesMod.CYAN_ROSE_BUSH); - */ - } + + */} + }