Skip to content

Commit

Permalink
update media
Browse files Browse the repository at this point in the history
  • Loading branch information
btwonion committed Jun 14, 2024
1 parent 61c459c commit f554bbd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 82 deletions.
94 changes: 19 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,36 @@
# telekinesis

This mod/plugin adds the telekinesis enchantment, allowing you to instantly move drops into your inventory:

## Supported drops
- block drops
- mob drops
- exp drops
- shearing drops (fabric only)
- vehicle drops (fabric only)
- fishing drops (fabric only)

## Compatibility
The paper module of telekinesis is as of Minecraft version 1.20.2 discontinued cause of the lack of ability to
register the enchantment (I will figure a way out when I have time to, but it seems like this step is linked with way more reflection than before.)
This mod/plugin adds the telekinesis enchantment, allowing you to instantly move drops into your inventory.

## Configuration

The configuration file can be found in the client/server directory.
The file differs cause of the supported drops between fabric and paper environments.

-> mod configuration file: `/config/telekinesis.toml`
<br>
-> plugin configuration file: `/plugins/telekinesis.toml`
-> configuration file: `/config/telekinesis.json`

<details>
<summary>telekinesis.toml</summary>

<details>
<summary>paper config</summary>

```toml
# Uncomment the following values if you want to change them:
#
# Decides whether telekinesis can be used without the enchantment.
onByDefault = false
# Uncomment this to block functionality for those who don't have the required permission.
# onByDefaultPermissionRequirement = 'permission'
#
# Decides whether players should be required to sneak to use telekinesis.
onlyOnSneak = false
# Decides whether telekinesis can be used for block drops.
blockDrops = true
# blockDropsPermissionRequirement = 'permission'
#
# Decides whether telekinesis can be used for exp drops.
expDrops = true
# expDropsPermissionRequirement = 'permission'
#
# Decides whether telekinesis can be used for entity drops.
entityDrops = true
# entityDropsPermissionRequirement = 'permission'
#
# Decides whether to add the enchantment to the game.
enchantment = true
```
</details>

<details>
<summary>fabric config</summary>

```toml
# Uncomment the following values if you want to change them:
#
# Decides whether telekinesis can be used without the enchantment.
onByDefault = false
# Decides whether players should be required to sneak to use telekinesis.
onlyOnSneak = false
# Decides whether to add the enchantment to the game.
enchantment = true
# Decides whether telekinesis can be used for block drops.
blockDrops = true
# Decides whether telekinesis can be used for exp drops.
expDrops = true
# Decides whether telekinesis can be used for mob drops.
mobDrops = true
# Decides whether telekinesis can be used for vehicle drops.
vehicleDrops = true
# Decides whether telekinesis can be used for shearing drops.
shearingDrops = true
# Decides whether telekinesis can be used for fishing drops.
fishingDrops = true
```json
{
"version": 1, // Only for migration purposes, just ignore this.
"config": {
"needEnchantment": true, // Defines, whether telekinesis should without or with the enchantment on the tool.
"needSneak": false, // Defines. whether the player should have to sneak in order to use telekinesis.
"expAllowed": true, // Enables the use of telekinesis for exp drops.
"itemsAllowed": true // Enables the use of telekinesis for item drops.
}
}
```
</details>

</details>

### Other
⚠️ The development version is always the latest stable release of Minecraft.
Therefore, new features will only be available for the current and following Minecraft versions.

Currently supported versions are: 1.20.1, 1.20.4, 1.20.6 and 1.21. This can change in the future!

If you need help with any of my mods, just join my [discord server](https://nyon.dev/discord)

#### Paper Compatibility

The paper module of telekinesis is as of Minecraft version 1.20.2 discontinued cause of the lack of ability to
register the enchantment (When Paper's registry modification api is merged I will continue.)
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
- support 1.20.1, 1.20.4, 1.20.6
- completely rework project
- config is now in json and **NO** migration is applied!
- now consists of fewer sections - see readme
- telekinesis only applies to tools now
11 changes: 6 additions & 5 deletions telekinesis-fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ plugins {
signing
}

val featureVersion = "3.0.0"
val beta: Int = 1 // Pattern is '1.0.0-beta1-1.20.6-pre.2'
val featureVersion = "1.0.0${if (beta != null) "-beta$beta" else ""}"
val mcVersion = property("mcVersion")!!.toString()
val mcVersionRange = property("mcVersionRange")!!.toString()
version = "$featureVersion-$mcVersion"
Expand Down Expand Up @@ -139,7 +140,7 @@ publishMods {
displayName = "v${project.version}"
file = tasks.remapJar.get().archiveFile
changelog = changelogText
type = STABLE
type = if (beta != null) BETA else STABLE
modLoaders.addAll("fabric", "quilt")

modrinth {
Expand Down Expand Up @@ -185,9 +186,9 @@ java {
withSourcesJar()

javaVersion.toInt().let { JavaVersion.values()[it - 1] }.let {
sourceCompatibility = it
targetCompatibility = it
}
sourceCompatibility = it
targetCompatibility = it
}
}

/*
Expand Down
15 changes: 14 additions & 1 deletion telekinesis-fabric/stonecutter.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,20 @@ tasks.register("postUpdate") {
group = "mod"

val version = project(stonecutter.versions.first().project).version.toString()
val featureVersion = version.split('-').first()
val hyphenCount = version.count { it == '-' }
val featureVersion = when (hyphenCount) {
1 -> version.split("-").first()
2 -> {
val split = version.split("-")
if (split.last().contains("rc") || split.last().contains("pre")) split.first()
else "${split.first()}-${split[1]}"
}
3 -> {
val split = version.split("-")
"${split.first()}-${split[1]}"
}
else -> return@register
}

val url = providers.environmentVariable("DISCORD_WEBHOOK").orNull ?: return@register
val changelogText = rootProject.file("changelog.md").readText()
Expand Down

0 comments on commit f554bbd

Please sign in to comment.