Skip to content

Commit

Permalink
📝 More small snippets of docs edits
Browse files Browse the repository at this point in the history
  • Loading branch information
asoji committed Feb 26, 2024
1 parent 068fb06 commit eb4d161
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 34 deletions.
3 changes: 0 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ dependencies {
modImplementation(libs.fabric.api)

include(modImplementation("gay.asoji:fmw:1.0.0+build.8")!!)


dokkaHtmlPlugin(libs.dokka.`as`.java)
}

tasks.withType<DokkaTask>().configureEach {
Expand Down
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ fabric-loader = "0.15.3"
fabric-api = "0.95.4+1.20.4"
fabric_language_kotlin = "1.10.17+kotlin.1.9.22"

dokka_as_java = "1.9.10"
dokka = "1.9.10"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric-loader" }
fabric-api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric-api" }
fabric_language_kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric_language_kotlin" }

dokka_as_java = { module = "org.jetbrains.dokka:kotlin-as-java-plugin", version.ref = "dokka_as_java" }
dokka_as_java = { module = "org.jetbrains.dokka:kotlin-as-java-plugin", version.ref = "dokka" }
dokka_versioning = { module = "org.jetbrains.dokka:versioning-plugin", version.ref = "dokka" }

[plugins]
grgit = { id = "org.ajoberstar.grgit", version = "5.2.1"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import net.minecraft.world.item.Item
import net.minecraft.world.level.block.*
import net.minecraft.world.level.material.MapColor


/**
* Block Extensions code for registering Blocks
*/

// a lot of this was written by storm so if there's shit that could be reused/abstracted, yell at her, not me - asoji

Expand Down Expand Up @@ -51,7 +53,7 @@ fun Block.registerBlockItem(modID: String, name: String): BlockItem = Registry.r
* Registers a block & item to the Minecraft registry with the resource location set to the Mod ID
* @property modID The namespace for your mod to be used with, like `SofterPastels.MOD_ID`
* @property name the ID of the block
* @return [Block]
* @return [Block] and [BlockItem]
*/
fun Block.registerBlockWithItem(modID: String, name: String): Block {
this.registerBlockItem(modID, name)
Expand Down Expand Up @@ -242,6 +244,9 @@ fun DyeColor.registerLightBlock(modID: String, name: String): Block = Block(Past
*/
fun MapColor.registerLightBlock(modID: String, name: String): Block = Block(PastelLight().mapColor(this)).registerBlockWithItem(modID, name)

/**
* @suppress
*/
object crab1 { val crab2 = CrabInTheCode.crabDeezNuts("hey, it felt comfortable here between the light and the carpet") }

/**
Expand Down
5 changes: 5 additions & 0 deletions src/main/kotlin/gay/asoji/innerpastels/blocks/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import net.minecraft.client.resources.model.Material
import net.minecraft.world.level.block.*
import net.minecraft.world.level.block.state.BlockBehaviour

//TODO: Replace all of the Functions with Values

/**
* A list of Block Properties, mostly copyOf's, to be used with making new blocks.
*/
Expand Down Expand Up @@ -129,6 +131,9 @@ object Properties {
return Block(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS))
}

/**
* @suppress
*/
object crab3 { val crab3 = CrabInTheCode.crabDeezNuts("according to all unknown laws of aviation, crabs can float and snip your hair off") }

/**
Expand Down
36 changes: 18 additions & 18 deletions src/main/kotlin/gay/asoji/innerpastels/datagen/RecipeGenerators.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property smeltableList A [List<ItemLike>] of what can be used as an input item to be smelted down into a resulting [outputPastelGlassItem]
* @property exporter The RecipeOutput used by your Recipe Provider
* @property smeltableList A List of what can be used as an input item to be smelted down into a resulting [outputPastelGlassItem]
* @property outputPastelGlassItem The resulting Glass Item from your input [smeltableList]
* @property group A string that defines what group your recipe belongs to
*
Expand Down Expand Up @@ -73,7 +73,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property smeltableList A [List<ItemLike>] of what can be used as an input item to be smelted down into a resulting [outputPastelHardCandyItem]
* @property outputPastelGlassItem The resulting Pastel Hard Candy Item from your input [smeltableList]
* @property group A string that defines what group your recipe belongs to
Expand Down Expand Up @@ -109,7 +109,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputPastelPowderBlock The Pastel Powder Block outputted
*
Expand Down Expand Up @@ -150,7 +150,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelBlock The Powder Block Item used for input
* @property outputPastelSlabBlock The Pastel Slab Block outputted
*
Expand Down Expand Up @@ -181,7 +181,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelBlock The Powder Block Item used for input
* @property outputPastelStairBlock The Pastel Stair Block outputted
*
Expand Down Expand Up @@ -214,7 +214,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputPastelWoolBlock The Pastel Wool Block outputted
*
Expand Down Expand Up @@ -250,7 +250,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputPastelWoolBlock The Pastel Wool Block outputted
*
Expand Down Expand Up @@ -283,7 +283,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelWoolBlock The Pastel Wool Block Item used for input
* @property outputPastelCarpetBlock The Pastel Carpet Block outputted
*
Expand Down Expand Up @@ -314,7 +314,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelBlock The Pastel Block Item used for input
* @property outputPastelFenceBlock The Pastel Fence Block outputted
*
Expand Down Expand Up @@ -348,7 +348,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelBlock The Pastel Block Item used for input
* @property outputPastelFenceGateBlock The Pastel Fence Gate Block outputted
*
Expand Down Expand Up @@ -382,7 +382,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelBlock The Pastel Block Item used for input
* @property outputPastelWallBlock The Pastel Wall Block outputted
*
Expand Down Expand Up @@ -414,7 +414,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputPastelGlassBlock The Pastel Glass Block Item outputted
*
Expand Down Expand Up @@ -450,7 +450,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputPastelGlassPaneBlock The Pastel Glass Pane Block Item outputted
*
Expand Down Expand Up @@ -485,7 +485,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelGlassBlockItem The Glass Block used for input
* @property outputPastelGlassPaneBlock The Pastel Glass Pane Block Item outputted
*
Expand Down Expand Up @@ -521,7 +521,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputPastelLightBlock The Pastel Light Block outputted
*
Expand Down Expand Up @@ -553,7 +553,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputPastelPowderItem The Powder Item used for input
* @property outputTaffyItem The Pastel Taffy Item outputted
*
Expand Down Expand Up @@ -585,7 +585,7 @@ object RecipeGenerators {
* }
* ```
*
* @property exporter The [RecipeOutput] used by your Recipe Provider
* @property exporter The RecipeOutput used by your Recipe Provider
* @property inputTaffyItem The Taffy used for input
* @property outputCottonCandyItem The Cotton Candy Item outputted
*
Expand Down
16 changes: 8 additions & 8 deletions src/main/kotlin/gay/asoji/innerpastels/foods/RegisterFood.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ object RegisterFood {
* @property modID The namespace for your mod to be used with, like `SofterPastels.MOD_ID`
* @property name Candy's Item ID [like `white_taffy`]
* @property candyTranslationString Type of candy for hunger translation string
* @property nutrition Candy's nutrition value in [Int]
* @property saturation Candy's saturation value in [Int]
* @property nutrition Candy's nutrition value
* @property saturation Candy's saturation value
* @property effect [MobEffect] tied to eating the candy
* @property amplifier Potency of said [MobEffect] after eating it
* @property seconds Amount of time the effect lasts in [Int] seconds
* @property seconds Amount of time the effect lasts
*/
fun registerCandy(
modID: String,
Expand Down Expand Up @@ -57,8 +57,8 @@ object RegisterFood {
* @property modID The namespace for your mod to be used with, like `SofterPastels.MOD_ID`
* @property name Candy's Item ID [like `white_taffy`]
* @property candyTranslationString Type of candy for hunger translation string
* @property nutrition Candy's nutrition value in [Int]
* @property saturation Candy's saturation value in [Int]
* @property nutrition Candy's nutrition value
* @property saturation Candy's saturation value
*
* @return [CandyTooltipItem]
*/
Expand All @@ -84,7 +84,7 @@ object RegisterFood {
* @property modID The namespace for your mod to be used with, like `SofterPastels.MOD_ID`
* @property name Candy's Item ID [like `white_taffy`]
* @property effect The corresponding [MobEffect] obtained when the candy is eaten
* @property seconds Amount of seconds in [Int] applied to the tied [effect]
* @property seconds Amount of seconds applied to the tied [effect]
*
* @return Taffy [registerCandy] with a defined Mod ID, Item ID, Mob Effect when eaten for a certain amount of seconds
*/
Expand All @@ -110,7 +110,7 @@ object RegisterFood {
* @property modID The namespace for your mod to be used with, like `SofterPastels.MOD_ID`
* @property name Candy's Item ID [like `white_cotton_candy`]
* @property effect The corresponding [MobEffect] obtained when the candy is eaten
* @property seconds Amount of seconds in [Int] applied to the tied [effect]
* @property seconds Amount of seconds applied to the tied [effect]
*
* @return Cotton Candy [registerCandy] with a defined Mod ID, Item ID, Mob Effect when eaten for a certain amount of seconds
*/
Expand All @@ -136,7 +136,7 @@ object RegisterFood {
* @property modID The namespace for your mod to be used with, like `SofterPastels.MOD_ID`
* @property name Candy's Item ID [like `white_hard_candy`]
* @property effect The corresponding [MobEffect] obtained when the candy is eaten
* @property seconds Amount of seconds in [Int] applied to the tied [effect]
* @property seconds Amount of seconds applied to the tied [effect]
*
* @return Hard Candy [registerCandy] with a defined Mod ID, Item ID, Mob Effect when eaten for a certain amount of seconds
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import java.util.*
* @property CandyTranslationString
*/
class CandyTooltipItem(properties: Properties, val candyTranslationString: CandyTranslationString) : Item(properties) {
// Overrides Item's `appendHoverText` to add more things in it, notably Hunger translation string, tied Mob Effect [if there is one], and Always Eat string
/**
* Overrides Item's `appendHoverText` to add more things in it, notably Hunger translation string, tied Mob Effect [if there is one], and Always Eat string
*/
override fun appendHoverText(itemStack: ItemStack, level: Level?, list: MutableList<Component>, tooltipFlag: TooltipFlag) {
list.add(Component.translatable(candyTranslationString.candyHungerString))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ package gay.asoji.innerpastels.misc
* [actual strings in library's /src/main/resources/assets/innerpastels/lang/en_us.json]
*/
enum class CandyTranslationString(val candyHungerString: String) {
/**
* Translation string for Taffy's description
*/
TAFFY("item.innerpastels.candies.hunger.description.taffy"),

/**
* Translation string for Cotton Candy's description
*/
COTTON("item.innerpastels.candies.hunger.description.cotton"),

/**
* Translation string for Hard Candy's description
*/
HARD("item.innerpastels.candies.hunger.description.hard")
}

0 comments on commit eb4d161

Please sign in to comment.