Skip to content

Commit

Permalink
Updated to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhzzzsss committed Mar 12, 2022
1 parent fee98c0 commit 53eff45
Show file tree
Hide file tree
Showing 61 changed files with 344 additions and 196 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gradle
.idea
gradle
run
build
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SongPlayer
A Fabric mod for Minecraft that plays noteblocks. The current version is for Minecraft 1.17.
A Fabric mod for Minecraft that plays noteblocks. The current version is for Minecraft 1.18.x.

# How to use
The mod is in build/lib/song-player-1.1.0.jar. There will also be a releases section where you can grab my mod from.
You can grab the jar from releases.

This mod requires fabric api.

Expand Down Expand Up @@ -49,13 +49,8 @@ By default, the client uses /gms to go into survival mode. However, /gms does no
Toggles whether a fake player will show up to represent your true position while playing a song. When playing a song, since it automatically enables freecam, your true position will be different from your apparent position. The fake player will show where you actually are. By default, this is disabled.

# Mechanism
SongPlayer places noteblocks with nbt and instrument data already in them, so the noteblocks do not need to be individually tuned. Ayunami2000 had previously done a proof-of-concept of this method.
SongPlayer places noteblocks with nbt and instrument data already in them, so the noteblocks do not need to be individually tuned. Ayunami2000 has previously done a proof-of-concept of this method.

My client will automatically detect what noteblocks are needed and place them automatically before each song is played, which makes playing songs quite easy. The only drawback is that you need to be able to switch between creative and survival mode, which my client will attempt to do automatically.

When playing a song, freecam is enabled. You will be able to move around freely, but in reality you are only moving your camera while your player stays at the center of the noteblocks. This is because noteblocks can only be played if you're within reach distance of them, so you have to stand at the center of the noteblocks to play them, but it's still nice to be able to move around while your song is playing.

# 1.17 Support
I was pretty late to update my client to 1.17, so Ayunami2000 decided to do it for me, which is pretty neat. You can see their repo here: https://github.com/ayunami2000/SongPlayer-1.17. At the moment of writing this however, they don't seem to have updated the noteblock base id, which would make the client get the notes wrong, so I don't recommend using it.

I've updated SongPlayer to 1.17 myself now so you can get it from here.
40 changes: 5 additions & 35 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish'
id 'fabric-loom' version '0.11-SNAPSHOT'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand Down Expand Up @@ -40,14 +39,8 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"

// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

java {
Expand All @@ -62,26 +55,3 @@ jar {
rename { "${it}_${project.archivesBaseName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
36 changes: 0 additions & 36 deletions build/classes/java/main/song-player-refmap.json

This file was deleted.

Binary file removed build/libs/song-player-1.0.0-dev.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.0.0-sources-dev.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.0.0-sources.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.0.0.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.0-dev.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.0-sources-dev.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.0-sources.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.0.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.1-dev.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.1-sources-dev.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.1-sources.jar
Binary file not shown.
Binary file removed build/libs/song-player-1.1.1.jar
Binary file not shown.
2 changes: 0 additions & 2 deletions build/loom-cache/mixin-map-1.16.1-1.16.1+build.1-v2.tiny

This file was deleted.

2 changes: 0 additions & 2 deletions build/loom-cache/mixin-map-1.17-1.17+build.1-v2.0.tiny

This file was deleted.

1 change: 0 additions & 1 deletion build/loom-cache/mixin-map-1.17-1.17+build.13-v2.0.tiny

This file was deleted.

Binary file removed build/resources/main/assets/songplayer/icon.png
Binary file not shown.
37 changes: 0 additions & 37 deletions build/resources/main/fabric.mod.json

This file was deleted.

15 changes: 0 additions & 15 deletions build/resources/main/songplayer.mixins.json

This file was deleted.

45 changes: 0 additions & 45 deletions build/tmp/compileJava/source-classes-mapping.txt

This file was deleted.

2 changes: 0 additions & 2 deletions build/tmp/jar/MANIFEST.MF

This file was deleted.

2 changes: 0 additions & 2 deletions build/tmp/remapJar/MANIFEST.MF

This file was deleted.

2 changes: 0 additions & 2 deletions build/tmp/sourcesJar/MANIFEST.MF

This file was deleted.

10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.17
yarn_mappings=1.17+build.1
loader_version=0.11.6
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3

# Mod Properties
mod_version = 1.1.1
mod_version = 1.2.0
maven_group = com.github.hhhzzzsss
archives_base_name = song-player

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.34.9+1.17
fabric_version=0.47.10+1.18.2
Loading

0 comments on commit 53eff45

Please sign in to comment.