Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Handle proxy online mode properly #372

Draft
wants to merge 21 commits into
base: staging/1.16.5
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f13ac1d
add config for sand duping (#352)
Titaniumtown Jan 24, 2021
25183f4
Merge branch 'ver/1.16.5' into dev/ver/1.16.5
duplexsystem Jan 24, 2021
413c82b
Merge branch 'ver/1.16.5' of github.com:YatopiaMC/Yatopia into dev/ve…
Titaniumtown Jan 24, 2021
d5a3833
Merge branch 'dev/ver/1.16.5' of github.com:YatopiaMC/Yatopia into de…
Titaniumtown Jan 24, 2021
9f58704
Lithium: cache chunk gen sea level (#349)
Titaniumtown Jan 25, 2021
b4c3b25
PaperPR: Inline shift fields in EnumDirection (#350)
Titaniumtown Jan 25, 2021
2669a91
Merge branch 'ver/1.16.5' of github.com:YatopiaMC/Yatopia into stagin…
Titaniumtown Jan 25, 2021
2243765
Introducing: Yatoclip (#360)
ishland Jan 25, 2021
7073c23
New async nbt cache (#347)
HookWoods Jan 25, 2021
839461f
update pom
Titaniumtown Jan 25, 2021
010458e
whoops
Titaniumtown Jan 25, 2021
6205363
Merge branch 'ver/1.16.5' of github.com:YatopiaMC/Yatopia into stagin…
Titaniumtown Jan 25, 2021
da7f94b
Try to address path issue and improve Jenkins build speed
ishland Jan 26, 2021
6b6b528
Merge branch 'ver/1.16.5' of github.com:YatopiaMC/Yatopia into stagin…
Titaniumtown Jan 26, 2021
b3bf916
Merge branch 'staging/1.16.5' of github.com:YatopiaMC/Yatopia into st…
Titaniumtown Jan 26, 2021
265b26d
Detailed lag and crash reports (#369)
ishland Jan 27, 2021
a5a8257
Merge branch 'ver/1.16.5' of github.com:YatopiaMC/Yatopia into stagin…
Titaniumtown Jan 27, 2021
42720aa
Drop sand duping
ishland Jan 28, 2021
62887dc
Add branch specific versions
ishland Jan 28, 2021
cd82d7d
Remove copyright
ishland Jan 28, 2021
f9c1bf6
Handle proxy online mode properly
ishland Jan 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ jobs:

- name: Build Yatopia
run: |
./gradlew paperclip
./gradlew yatoclip

- name: Upload Artifact
if: github.ref != 'refs/heads/ver/1.16.4'
uses: actions/upload-artifact@v2
with:
name: Yatopia-${{ matrix.java }}
path: yatopia-1.16.5-paperclip.jar
path: yatopia-1.16.5-yatoclip.jar

165 changes: 74 additions & 91 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,91 +1,74 @@
pipeline {
agent { label 'slave' }
options { timestamps() }
stages {
stage('Cleanup') {
steps {
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
sh 'rm -rf ./target'
sh 'rm -rf ./Paper/Paper-API ./Paper/Paper-Server ./Paper/work/Spigot/Spigot-API ./Paper/work/Spigot/Spigot-Server'
sh 'rm -rf ./Yatopia-API ./Yatopia-Server'
sh 'chmod +x ./gradlew'
}
}
stage('Init project & submodules') {
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT',
) {
sh './gradlew initGitSubmodules'
}
}
}
stage('Decompile & apply patches') {
tools {
jdk "OpenJDK 8"
}
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT',
) {
sh '''
./gradlew setupUpstream
./gradlew applyPatches
'''
}
}
}
stage('Build') {
tools {
jdk "OpenJDK 8"
}
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT'
) {
withCredentials([usernamePassword(credentialsId: 'jenkins-deploy', usernameVariable: 'ORG_GRADLE_PROJECT_mavenUsername', passwordVariable: 'ORG_GRADLE_PROJECT_mavenPassword')]) {
sh '''
./gradlew build
./gradlew publish
'''
}
}
}
}
stage('Build Launcher') {
tools {
jdk "OpenJDK 8"
}
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT'
) {
sh '''
mkdir -p "./target"
./gradlew paperclip
basedir=$(pwd)
paperworkdir="$basedir/Paper/work"
mcver=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
cp "yatopia-$mcver-paperclip.jar" "./target/yatopia-$mcver-paperclip-b$BUILD_NUMBER.jar"
'''
}
}
post {
success {
archiveArtifacts "target/*.jar"
}
failure {
cleanWs()
}
}
}
}
}
pipeline {
agent { label 'slave' }
options { timestamps() }
stages {
stage('Cleanup') {
steps {
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
sh 'rm -rf ./target'
sh 'rm -rf ./Paper/Paper-API ./Paper/Paper-Server ./Paper/work/Spigot/Spigot-API ./Paper/work/Spigot/Spigot-Server'
sh 'rm -rf ./Yatopia-API ./Yatopia-Server'
sh 'chmod +x ./gradlew'
}
}
stage('Init project & submodules') {
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT',
) {
sh './gradlew initGitSubmodules'
}
}
}
stage('Decompile & apply patches') {
tools {
jdk "OpenJDK 8"
}
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT',
) {
sh '''
./gradlew setupUpstream
./gradlew applyPatches
'''
}
}
}
stage('Build') {
tools {
jdk "OpenJDK 8"
}
steps {
withMaven(
maven: '3',
mavenLocalRepo: '.repository',
publisherStrategy: 'EXPLICIT'
) {
withCredentials([usernamePassword(credentialsId: 'jenkins-deploy', usernameVariable: 'ORG_GRADLE_PROJECT_mavenUsername', passwordVariable: 'ORG_GRADLE_PROJECT_mavenPassword')]) {
sh '''
./gradlew clean yatoclip publish
mkdir -p "./target"
basedir=$(pwd)
paperworkdir="$basedir/Paper/work"
mcver=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
cp "yatopia-$mcver-yatoclip.jar" "./target/yatopia-$mcver-yatoclip-b$BUILD_NUMBER.jar"
'''
}
}
}
post {
success {
archiveArtifacts "target/*.jar"
}
failure {
cleanWs()
}
}
}
}
}
6 changes: 6 additions & 0 deletions PATCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This is an overview over all patches that are currently used.

| Side | Patch | Author | CoAuthors |
| ----- | ------------- |:-------------:| -----:|
| server | (PaperPR) Inline shift direction fields | Andrew Steinborn | |
| server | AFK API | William Blake Galbreath | |
| api | AFK API | William Blake Galbreath | |
| server | Ability to re-add farmland mechanics from Alpha | Yive | |
Expand Down Expand Up @@ -131,6 +132,8 @@ This is an overview over all patches that are currently used.
| server | Delay chunk unloads | Spottedleaf | |
| server | Despawn rate config options per projectile type | jmp | |
| server | Detail more information in watchdog dumps | Spottedleaf | |
| server | Detailed lag and crash reports | ishland | |
| api | Detailed lag and crash reports | ishland | |
| server | Disable loot drops on death by cramming | William Blake Galbreath | |
| server | Disable outdated build check | William Blake Galbreath | |
| api | Disable reload command | Ivan Pekov | |
Expand Down Expand Up @@ -185,6 +188,7 @@ This is an overview over all patches that are currently used.
| api | Full netherite armor grants fire resistance | BillyGalbreath | |
| server | Giants AI settings | William Blake Galbreath | |
| server | Global Eula file | tr7zw | |
| server | Handle proxy online mode properly | ishland | |
| server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn |
| server | Heavily optimize recipe lookups in CraftingManager | Mykyta Komarn | Ivan Pekov, ishland |
| server | Highly optimise single and multi-AABB VoxelShapes and | Spottedleaf | |
Expand Down Expand Up @@ -240,6 +244,7 @@ This is an overview over all patches that are currently used.
| server | Multi-Threaded Server Ticking Vanilla | Spottedleaf | |
| server | Multi-Threaded ticking CraftBukkit | Spottedleaf | |
| server | Name craft scheduler threads according to the plugin using | Spottedleaf | |
| server | New nbt cache | Hugo Planque | |
| server | Nuke streams off BlockPosition | Ivan Pekov | |
| server | Nuke streams off SectionPosition | Ivan Pekov | |
| server | Optimise EntityInsentient#checkDespawn | Spottedleaf | |
Expand Down Expand Up @@ -374,3 +379,4 @@ This is an overview over all patches that are currently used.
| server | lithium VoronoiBiomeAccessTypeMixin | JellySquid | |
| server | lithium enum_values | JellySquid | |
| server | lithium reduce allocations | JellySquid | Mykyta Komarnytskyy |
| server | lithium: cache chunk gen sea level | SuperCoder7979 | |
11 changes: 11 additions & 0 deletions Yatoclip/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repositories {
mavenCentral()
maven("https://jitpack.io/")
}

dependencies {
implementation("com.github.ishlandbukkit:jbsdiff:deff66b794")
implementation("com.google.code.gson:gson:2.8.6")
implementation("commons-io:commons-io:2.8.0")
}

51 changes: 51 additions & 0 deletions Yatoclip/src/main/java/org/yatopia/yatoclip/PatchesMetadata.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package org.yatopia.yatoclip;

import java.io.Serializable;
import java.util.Collections;
import java.util.Objects;
import java.util.Set;

public class PatchesMetadata {

public final Set<PatchMetadata> patches;
public final Set<Relocation> relocations;
public final Set<String> copyExcludes;

public PatchesMetadata(Set<PatchMetadata> patches, Set<Relocation> relocations, Set<String> copyExcludes) {
Objects.requireNonNull(copyExcludes);
this.copyExcludes = Collections.unmodifiableSet(copyExcludes);
Objects.requireNonNull(relocations);
this.relocations = Collections.unmodifiableSet(relocations);
Objects.requireNonNull(patches);
this.patches = Collections.unmodifiableSet(patches);
}

public static class PatchMetadata {
public final String name;
public final String originalHash;
public final String targetHash;
public final String patchHash;

public PatchMetadata(String name, String originalHash, String targetHash, String patchHash) {
this.name = name;
this.originalHash = originalHash;
this.targetHash = targetHash;
this.patchHash = patchHash;
}
}

public static class Relocation implements Serializable {

public final String from;
public final String to;
public final boolean includeSubPackages;

public Relocation(String from, String to, boolean includeSubPackages) {
Objects.requireNonNull(from);
Objects.requireNonNull(to);
this.from = from.replaceAll("\\.", "/");
this.to = to.replaceAll("\\.", "/");
this.includeSubPackages = includeSubPackages;
}
}
}
Loading