mirror of
https://github.com/ViaVersion/ViaRewind.git
synced 2026-11-05 01:10:06 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8924485ac | ||
|
|
b02a257383 | ||
|
|
a4b666724f | ||
|
|
e92b15c19f | ||
|
|
3fd2da9bf8 | ||
|
|
ff4fbe2029 | ||
|
|
c3d32874a7 | ||
|
|
7b9888c758 | ||
|
|
e0c05df633 |
No files matched your search
+15
-24
@@ -52,41 +52,32 @@ idea {
|
||||
// -----------------------------------------------------
|
||||
// Publishing
|
||||
|
||||
def latestCommitHash() {
|
||||
def byteOut = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
standardOutput = byteOut
|
||||
}
|
||||
return byteOut.toString('UTF-8').trim()
|
||||
Provider<String> latestCommitHash() {
|
||||
return providers.exec {
|
||||
commandLine = ["git", "rev-parse", "--short", "HEAD"]
|
||||
}.standardOutput.getAsText().map(String::trim)
|
||||
}
|
||||
|
||||
def latestCommitMessage() {
|
||||
def byteOut = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'log', '-1', '--pretty=%B'
|
||||
standardOutput = byteOut
|
||||
}
|
||||
return byteOut.toString('UTF-8').trim()
|
||||
Provider<String> latestCommitMessage() {
|
||||
return providers.exec {
|
||||
commandLine = ["git", "log", "-1", "--pretty=%B"]
|
||||
}.standardOutput.getAsText().map(String::trim)
|
||||
}
|
||||
|
||||
def branchName() {
|
||||
def byteOut = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD'
|
||||
standardOutput = byteOut
|
||||
}
|
||||
return byteOut.toString('UTF-8').trim()
|
||||
Provider<String> branchName() {
|
||||
return providers.exec {
|
||||
commandLine = ["git", "rev-parse", "--abbrev-ref", "HEAD"]
|
||||
}.standardOutput.getAsText().map(String::trim)
|
||||
}
|
||||
|
||||
def branch = branchName()
|
||||
def branch = branchName().get()
|
||||
def baseVersion = project.maven_version
|
||||
def isRelease = !baseVersion.contains('-')
|
||||
def isMainBranch = branch == "master"
|
||||
if (!isRelease || isMainBranch) { // Only publish releases from the main branch
|
||||
def suffixedVersion = isRelease ? baseVersion : baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER")
|
||||
def commitHash = latestCommitHash()
|
||||
def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaRewind/commit/${commitHash}) ${latestCommitMessage()}"
|
||||
def commitHash = latestCommitHash().get()
|
||||
def changelogContent = "[${commitHash}](https://github.com/ViaVersion/ViaRewind/commit/${commitHash}) ${latestCommitMessage().get()}"
|
||||
modrinth {
|
||||
def mcVersions = project.mcVersions
|
||||
.split(',')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: ViaRewind
|
||||
main: com.viaversion.viarewind.BukkitPlugin
|
||||
authors: [FlorianMichael/EnZaXD, Gerrygames, creeper123321123]
|
||||
authors: [FlorianMichael/EnZaXD, Gerrygames, creeper123123321]
|
||||
version: ${version}
|
||||
description: ${description}
|
||||
website: https://viaversion.com/rewind
|
||||
|
||||
+31
-1
@@ -13,7 +13,37 @@ sourceSets {
|
||||
main {
|
||||
classTokenReplacer {
|
||||
property("\${version}", rootProject.maven_version)
|
||||
property("\${impl_version}", "git-ViaRewind-${rootProject.maven_version}:${rootProject.latestCommitHash()}")
|
||||
property("\${impl_version}", "git-ViaRewind-${rootProject.maven_version}:${rootProject.latestCommitHash().get()}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Task to quickly test/debug code changes using https://github.com/ViaVersion/ViaProxy
|
||||
// For further instructions see the ViaProxy repository README
|
||||
tasks.register("runViaProxy", JavaExec) {
|
||||
dependsOn tasks.jar
|
||||
|
||||
def viaProxyConfiguration = configurations.create("viaProxy")
|
||||
viaProxyConfiguration.dependencies.add(dependencies.create("net.raphimc:ViaProxy:3.3.5-SNAPSHOT") {
|
||||
transitive = false
|
||||
})
|
||||
|
||||
mainClass = "net.raphimc.viaproxy.ViaProxy"
|
||||
classpath = viaProxyConfiguration
|
||||
workingDir = file("run")
|
||||
jvmArgs = ["-DskipUpdateCheck"]
|
||||
if (System.getProperty("viaproxy.gui.autoStart") != null) {
|
||||
jvmArgs("-Dviaproxy.gui.autoStart")
|
||||
}
|
||||
|
||||
doFirst {
|
||||
def jarsDir = file("$workingDir/jars")
|
||||
jarsDir.mkdirs()
|
||||
file("$jarsDir/${project.name}.jar").bytes = tasks.jar.archiveFile.get().asFile.bytes
|
||||
}
|
||||
|
||||
doLast {
|
||||
file("$workingDir/jars/${project.name}.jar").delete()
|
||||
file("$workingDir/logs").deleteDir()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -134,7 +134,7 @@ public class BlockItemPacketRewriter1_8 extends VRBlockItemRewriter<ClientboundP
|
||||
Item[] old = items;
|
||||
items = new Item[old.length - 1];
|
||||
items[0] = old[0];
|
||||
System.arraycopy(old, 2, items, 1, old.length - 3);
|
||||
System.arraycopy(old, 2, items, 1, old.length - 2);
|
||||
}
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
items[i] = handleItemToClient(wrapper.user(), items[i]);
|
||||
|
||||
+2
-6
@@ -409,11 +409,7 @@ public class EntityPacketRewriter1_9 extends VREntityRewriter<ClientboundPackets
|
||||
final int vehicle = wrapper.read(Types.VAR_INT);
|
||||
final IntList oldPassengers = tracker.getPassengers(vehicle);
|
||||
|
||||
final int count = wrapper.read(Types.VAR_INT);
|
||||
final IntList passengers = new IntArrayList();
|
||||
for (int i = 0; i < count; i++) {
|
||||
passengers.add(wrapper.read(Types.VAR_INT));
|
||||
}
|
||||
final IntList passengers = new IntArrayList(wrapper.read(Types.VAR_INT_ARRAY_PRIMITIVE));
|
||||
tracker.setPassengers(vehicle, passengers);
|
||||
|
||||
if (!oldPassengers.isEmpty()) {
|
||||
@@ -425,7 +421,7 @@ public class EntityPacketRewriter1_9 extends VREntityRewriter<ClientboundPackets
|
||||
detach.scheduleSend(Protocol1_9To1_8.class);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < count; i++) {
|
||||
for (int i = 0; i < passengers.size(); i++) {
|
||||
final int attachedEntityId = passengers.getInt(i);
|
||||
final int holdingEntityId = i == 0 ? vehicle : passengers.getInt(i - 1);
|
||||
|
||||
|
||||
+3
-3
@@ -4,10 +4,10 @@ org.gradle.parallel=true
|
||||
|
||||
# project
|
||||
maven_group=com.viaversion
|
||||
maven_version=4.0.3
|
||||
maven_version=4.0.4
|
||||
maven_description=ViaBackwards addon to allow 1.8.x and 1.7.x clients on newer server versions.
|
||||
|
||||
# Smile emoji
|
||||
mcVersions=1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9, 1.8.8
|
||||
mcVersionRange=1.8-1.21.1
|
||||
mcVersions=1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9, 1.8.8
|
||||
mcVersionRange=1.8-1.21.4
|
||||
velocityVersion=3.3
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionSha256Sum=f397b287023acdba1e9f6fc5ea72d22dd63669d59ed4a289a29b1a76eee151c6
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in new issue
Block a user