WE HAVE ROSES \(≧▽≦)/
|
@ -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")}")
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
|
@ -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()
|
||||
}
|
||||
}
|
|
@ -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())
|
||||
}
|
||||
}
|
|
@ -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() {
|
||||
}
|
||||
}
|
|
@ -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?")
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 248 B |
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
*/
|
||||
}
|
||||
|
||||
*/}
|
||||
|
||||
}
|
||||
|
|