Skip to content

Commit

Permalink
Updated the library with the new name.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOnlyTails committed Aug 31, 2021
1 parent 692d014 commit 2587c50
Show file tree
Hide file tree
Showing 18 changed files with 331 additions and 144 deletions.
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ body:
- type: dropdown
id: loottables-version
attributes:
label: LootTables Version
description: What version of LootTables are you running?
label: LootGoblin Version
description: What version of LootGoblin are you running?
options:
- v0.2.14 (Latest)
- v0.2.13
- v0.2.12
- v0.2.15 (Latest)
- v0.2.14
- v0.2.13
- v0.2.12
- v0.2.11
- v0.2.10
- v0.2.9
Expand Down
28 changes: 18 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Contribution Guidelines

Welcome, and thank you for contributing to LootTables! Here's how you do it:
Welcome, and thank you for contributing to LootGoblin! Here's how you do it:

## Step #1 - What do I add?

If you don't know what to add, it's recommended to play around and find things you want to improve by experimenting.
Still clueless? Pick an issue from the [issue tracker](https://github.com/theonlytails/loottables/issues).
Still clueless? Pick an issue from the [issue tracker](https://github.com/theonlytails/LootGoblin/issues).


## Step #2 - Forking and Cloning
Expand All @@ -17,21 +17,29 @@ Now that you have your own copy, make a new branch with a descriptive name (no,

## Step #3 - Write the Code

Just - do it. There's not much to detail here. Regarding code styling, stick to the [official guidelines](https://kotlinlang.org/docs/coding-conventions.html) supplied by the Kotlin team. (Note: every function, property and class must have [KDocs](https://kotlinlang.org/docs/kotlin-doc.html) attached)

Just - do it. There's not much to detail here. Regarding code styling, stick to
the [official guidelines](https://kotlinlang.org/docs/coding-conventions.html) supplied by the Kotlin team. (Note: every
function, property and class must have [KDocs](https://kotlinlang.org/docs/kotlin-doc.html) attached)

## Step #4 - Make a Pull Request

Once you're done coding your new feature/bugfix, come back to your fork, and make a new Pull Request from your branch to the [main branch](https://github.com/theonlytails/loottables/tree/main).
Once you're done coding your new feature/bugfix, come back to your fork, and make a new Pull Request from your branch to
the [main branch](https://github.com/theonlytails/LootGoblin/tree/main).

Before creating your PR, make sure to:
- Request a review from [@TheOnlyTails](https://github.com/theonlytails]

- Request a review from [@TheOnlyTails](https://github.com/theonlytails).
- Add a relevant label.
- If your PR is supposed to close an issue, add ["Closes #<issue number>"](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) (e.g. "Closes #3" for issue number 3) at the end of your PR message.
- If your PR is supposed to close an issue,
add ["Closes #<issue number>"](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) (
e.g. "Closes #3" for issue number 3) at the end of your PR message.

Now that you've created your PR, the reviewers will discuss the changes with you, and automated checks will run on your code.
**IMPORTANT:** Make sure to [enable *auto-squash and merge*](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request#enabling-auto-merge). Once it's enabled, your PR will be automatically merged once all checks pass and reviewers approve.
Now that you've created your PR, the reviewers will discuss the changes with you, and automated checks will run on your
code.
**IMPORTANT:** Make sure to [enable *auto-squash and
merge*](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request#enabling-auto-merge)
. Once it's enabled, your PR will be automatically merged once all checks pass and reviewers approve.

## Step #5 - Celebrate

Hurray! You've made your first contribution to LootTables! 🎉
Hurray! You've made your first contribution to LootGoblin! 🎉
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?color=blue&label=maven%20central&logo=gradle&metadataUrl=https%3A%2F%2Fs01.oss.sonatype.org%2Fservice%2Flocal%2Frepositories%2Freleases%2Fcontent%2Fcom%2Ftheonlytails%2Floottables%2Fmaven-metadata.xml&style=for-the-badge)](https://search.maven.org/artifact/com.theonlytails/loottables)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/TheOnlyTails/loottables/Java%20CI%20with%20Gradle?label=gradle%20build&logo=github&style=for-the-badge)
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?color=blue&label=maven%20central&logo=gradle&metadataUrl=https%3A%2F%2Fs01.oss.sonatype.org%2Fservice%2Flocal%2Frepositories%2Freleases%2Fcontent%2Fcom%2Ftheonlytails%2lootgoblin%2Fmaven-metadata.xml&style=for-the-badge)](https://search.maven.org/artifact/com.theonlytails/lootgoblin)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/TheOnlyTails/LootGoblin/Java%20CI%20with%20Gradle?label=gradle%20build&logo=github&style=for-the-badge)
![Kotlin](https://img.shields.io/badge/kotlin-%236C3FD1.svg?style=for-the-badge&logo=kotlin&logoColor=white)
![Gradle](https://img.shields.io/badge/gradle-%2302303A.svg?style=for-the-badge&logo=gradle&logoColor=white)
![GitHub License](https://img.shields.io/github/license/theonlytails/loottables?style=for-the-badge&logo=key)
![GitHub License](https://img.shields.io/github/license/theonlytails/LootGoblin?style=for-the-badge&logo=key)

---

*Announcement: LootTables will be ported to 1.17*

# LootTables
![LootGoblin](lootgoblin-logo.svg)

# LootGoblin

A Kotlin DSL for creating loot tables in Minecraft Forge mods.

For documentation and usage instructions, please take a look at the [wiki](https://github.com/TheOnlyTails/LootTables/wiki).
For documentation and usage instructions, please take a look at
the [wiki](https://github.com/TheOnlyTails/LootGoblin/wiki).

Here's the [`maven-metadata.xml`](https://s01.oss.sonatype.org/service/local/repositories/releases/content/com/theonlytails/loottables/maven-metadata.xml) of this library.
Here's
the [`maven-metadata.xml`](https://s01.oss.sonatype.org/service/local/repositories/releases/content/com/theonlytails/lootgoblin/maven-metadata.xml)
of this library.

## Installation

_Don't forget to replace the VERSION key with the version in the top with the Maven Central badge at the top!_

#### Gradle/Groovy

```groovy
```gradle
repositories {
mavenCentral()
}
dependencies {
def lootTables = fg.deobf(project.dependencies.create(group: "com.theonlytails", name: "loottables", version: VERSION) {
def lootGoblin = fg.deobf(project.dependencies.create(group: "com.theonlytails", name: "lootgoblin", version: VERSION) {
transitive = false
})
implementation fg.deobf(lootTables)
implementation fg.deobf(lootGoblin)
}
```

Expand All @@ -41,15 +48,16 @@ repositories {
}

dependencies {
val lootTables = project.dependencies.create(group = "com.theonlytails", name = "loottables", version = VERSION)
val lootGoblin = project.dependencies.create(group = "com.theonlytails", name = "lootgoblin", version = VERSION)
.apply { isTransitive = false }

implementation(project.the<DependencyManagementExtension>().deobf(lootTables))
implementation(project.the<DependencyManagementExtension>().deobf(lootGoblin))
}
```

The `isTransitive` property is added to make sure the library is imported correctly.

---

Want to generate block models with a DSL like this? Check out [BlockModels](https://github.com/theonlytails/blockmodels)!
Want to generate block models with a DSL like this? Check
out [ModelGoblin](https://github.com/theonlytails/ModelGoblin)!
17 changes: 12 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import com.vanniktech.maven.publish.MavenPublishPluginExtension
import com.vanniktech.maven.publish.SonatypeHost
import net.minecraftforge.gradle.userdev.UserDevExtension
Expand All @@ -10,7 +9,7 @@ import java.time.format.DateTimeFormatter.ISO_INSTANT
plugins {
idea
`java-library`
kotlin("jvm") version "latest.release"
kotlin("jvm") version "1.5.30"
id("net.minecraftforge.gradle")
id("com.vanniktech.maven.publish")
}
Expand All @@ -24,7 +23,7 @@ val modId = findProperty("POM_ARTIFACT_ID") as String
val projectName = findProperty("POM_NAME") as String
val projectAuthor = findProperty("POM_DEVELOPER_NAME") as String

val testModId = "loottables_test"
val testModId = "lootgoblin_test"

// JVM Info
println(
Expand All @@ -37,7 +36,6 @@ println(

dependencies {
"minecraft"(group = "net.minecraftforge", name = "forge", version = "$minecraftVersion-$forgeVersion")
implementation(group = "thedarkcolour", name = "kotlinforforge", version = "latest.release")
testImplementation(
group = "org.jetbrains.kotlin",
name = "kotlin-test-junit5",
Expand Down Expand Up @@ -89,6 +87,7 @@ repositories {
name = "kotlinforforge"
url = uri("https://thedarkcolour.github.io/KotlinForForge/")
}
mavenCentral()
}

// Setup
Expand Down Expand Up @@ -131,4 +130,12 @@ tasks.named<Jar>("jar") {
extensions.getByType<MavenPublishPluginExtension>().sonatypeHost = SonatypeHost.S01

// Testing
tasks.withType<Test> { useJUnitPlatform() }
tasks.withType<Test> { useJUnitPlatform() }
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# Versions
minecraftVersion=1.17.1
forgeVersion=37.0.5
forgeVersion=37.0.48
forgeGradleVersion=5.+
# Maven publishing
GROUP=com.theonlytails
POM_ARTIFACT_ID=loottables
VERSION_NAME=0.2.14
POM_NAME=LootTables
POM_ARTIFACT_ID=lootgoblin
VERSION_NAME=0.2.15
POM_NAME=LootGoblin
POM_DESCRIPTION=A Kotlin DSL for creating loot tables in Minecraft Forge mods.
POM_INCEPTION_YEAR=2021
POM_URL=https://github.com/theonlytails/loottables
POM_URL=https://github.com/theonlytails/lootgoblin
POM_LICENCE_NAME=MIT License
POM_LICENCE_URL=https://www.opensource.org/licenses/mit-license.php
POM_LICENCE_DIST=repo
POM_SCM_URL=https://github.com/theonlytails/loottables/
POM_SCM_CONNECTION=scm:git:git://github.com/theonlytails/loottables.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/theonlytails/loottables.git
POM_SCM_URL=https://github.com/theonlytails/lootgoblin/
POM_SCM_CONNECTION=scm:git:git://github.com/theonlytails/lootgoblin.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/theonlytails/lootgoblin.git
POM_DEVELOPER_ID=theonlytails
POM_DEVELOPER_NAME=TheOnlyTails
POM_DEVELOPER_URL=https://github.com/theonlytails/
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2587c50

Please sign in to comment.