Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamail committed Dec 24, 2022
2 parents 0993866 + 6485200 commit 07196b0
Show file tree
Hide file tree
Showing 466 changed files with 13,968 additions and 5,425 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,50 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 16
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 16
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: submodules-init
uses: snickerbockers/submodules-init@v4
- name: Build with Maven
run: mvn -B package -T 2C
- name: Build with Gradle
run: ./gradlew build

- name: Archive artifacts (Geyser Fabric)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Fabric
path: bootstrap/fabric/build/libs/Geyser-Fabric.jar
- name: Archive artifacts (Geyser Standalone)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Standalone
path: bootstrap/standalone/target/Geyser.jar
path: bootstrap/standalone/build/libs/Geyser-Standalone.jar
- name: Archive artifacts (Geyser Spigot)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Spigot
path: bootstrap/spigot/target/Geyser-Spigot.jar
path: bootstrap/spigot/build/libs/Geyser-Spigot.jar
- name: Archive artifacts (Geyser BungeeCord)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser BungeeCord
path: bootstrap/bungeecord/target/Geyser-BungeeCord.jar
path: bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
- name: Archive artifacts (Geyser Sponge)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Sponge
path: bootstrap/sponge/target/Geyser-Sponge.jar
path: bootstrap/sponge/build/libs/Geyser-Sponge.jar
- name: Archive artifacts (Geyser Velocity)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Velocity
path: bootstrap/velocity/target/Geyser-Velocity.jar
path: bootstrap/velocity/build/libs/Geyser-Velocity.jar
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,12 @@ nbdist/

# End of https://www.gitignore.io/api/git,java,maven,eclipse,netbeans,jetbrains+all,visualstudiocode

### Gradle ###
.gradle

### Geyser ###
run/
extensions/
config.yml
logs/
key.pem
Expand All @@ -245,6 +249,11 @@ locales/
/packs/
/dump.json
/saved-refresh-tokens.json
<<<<<<< HEAD
/languages/

.DS_Store
.DS_Store
=======
/custom_mappings/
/languages/
>>>>>>> 6485200c1ffd47a69bd041290cb75668f4269394
40 changes: 23 additions & 17 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pipeline {
agent any
tools {
maven 'Maven 3'
jdk 'Java 16'
gradle 'Gradle 7'
jdk 'Java 17'
}
options {
buildDiscarder(logRotator(artifactNumToKeepStr: '20'))
Expand All @@ -11,11 +11,16 @@ pipeline {
stage ('Build') {
steps {
sh 'git submodule update --init --recursive'
sh 'mvn clean package'
rtGradleRun(
usesPlugin: true,
tool: 'Gradle 7',
buildFile: 'build.gradle.kts',
tasks: 'clean build',
)
}
post {
success {
archiveArtifacts artifacts: 'bootstrap/**/target/*.jar', excludes: 'bootstrap/**/target/original-*.jar', fingerprint: true
archiveArtifacts artifacts: 'bootstrap/**/build/libs/Geyser-*.jar', fingerprint: true
}
}
}
Expand All @@ -28,23 +33,25 @@ pipeline {
}

steps {
rtMavenDeployer(
id: "maven-deployer",
rtGradleDeployer(
id: "GRADLE_DEPLOYER",
serverId: "opencollab-artifactory",
releaseRepo: "maven-releases",
snapshotRepo: "maven-snapshots"
)
rtMavenResolver(
id: "maven-resolver",
serverId: "opencollab-artifactory",
releaseRepo: "maven-deploy-release",
snapshotRepo: "maven-deploy-snapshot"
rtGradleResolver(
id: "GRADLE_RESOLVER",
serverId: "opencollab-artifactory"
)
rtMavenRun(
pom: 'pom.xml',
goals: 'javadoc:jar source:jar install -pl :core -am -DskipTests',
deployerId: "maven-deployer",
resolverId: "maven-resolver"
rtGradleRun(
usesPlugin: true,
tool: 'Gradle 7',
rootDir: "",
useWrapper: true,
buildFile: 'build.gradle.kts',
tasks: 'artifactoryPublish',
deployerId: "GRADLE_DEPLOYER",
resolverId: "GRADLE_RESOLVER"
)
rtPublishBuildInfo(
serverId: "opencollab-artifactory"
Expand Down Expand Up @@ -94,7 +101,6 @@ pipeline {
success {
script {
if (env.BRANCH_NAME == 'master') {
build propagate: false, wait: false, job: 'GeyserMC/Geyser-Fabric/master', parameters: [booleanParam(name: 'SKIP_DISCORD', value: true)]
build propagate: false, wait: false, job: 'GeyserMC/GeyserConnect/master', parameters: [booleanParam(name: 'SKIP_DISCORD', value: true)]
}
}
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The ultimate goal of this project is to allow Minecraft: Bedrock Edition users t

Special thanks to the DragonProxy project for being a trailblazer in protocol translation and for all the team members who have joined us here!

### Currently supporting Minecraft Bedrock 1.19.0 - 1.19.10/1.19.11 and Minecraft Java 1.19.0.
### Currently supporting Minecraft Bedrock 1.19.20 - 1.19.51 and Minecraft Java 1.19.3.

## Setting Up
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
Expand All @@ -34,7 +34,6 @@ Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Ge

## What's Left to be Added/Fixed
- Near-perfect movement (to the point where anticheat on large servers is unlikely to ban you)
- Resource pack conversion/CustomModelData
- Some Entity Flags
- Structure block UI

Expand All @@ -43,9 +42,8 @@ There are a few things Geyser is unable to support due to various differences be

## Compiling
1. Clone the repo to your computer
2. [Install Maven](https://maven.apache.org/install.html)
3. Navigate to the Geyser root directory and run `git submodule update --init --recursive`. This command downloads all the needed submodules for Geyser and is a crucial step in this process.
4. Run `mvn clean install` and locate to the `target` folder.
2. Navigate to the Geyser root directory and run `git submodule update --init --recursive`. This command downloads all the needed submodules for Geyser and is a crucial step in this process.
3. Run `gradlew build` and locate to `bootstrap/build` folder.

## Contributing
Any contributions are appreciated. Please feel free to reach out to us on [Discord](http://discord.geysermc.org/) if
Expand Down
Empty file added ap/build.gradle.kts
Empty file.
14 changes: 0 additions & 14 deletions ap/pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.processor;
package org.geysermc.geyser.processor;

import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.processor;
package org.geysermc.geyser.processor;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment;
Expand All @@ -39,6 +39,7 @@
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collection;
Expand Down Expand Up @@ -163,10 +164,15 @@ private BufferedReader createReader() throws IOException {
this.processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Reading existing " + this.annotationClassName + " list from " + this.outputPath);
return Files.newBufferedReader(this.outputPath);
}

FileObject obj = this.processingEnv.getFiler().getResource(StandardLocation.CLASS_OUTPUT, "", this.annotationClassName);
if (obj != null) {
this.processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Reading existing " + this.annotationClassName + " list from " + obj.toUri());
return new BufferedReader(obj.openReader(false));
try {
return new BufferedReader(obj.openReader(false));
} catch (NoSuchFileException ignored) {
return null;
}
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.processor;
package org.geysermc.geyser.processor;

import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.processor;
package org.geysermc.geyser.processor;

import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.processor;
package org.geysermc.geyser.processor;

import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.processor;
package org.geysermc.geyser.processor;

import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
org.geysermc.geyser.processor.BlockEntityProcessor
org.geysermc.geyser.processor.CollisionRemapperProcessor
org.geysermc.geyser.processor.ItemRemapperProcessor
org.geysermc.geyser.processor.PacketTranslatorProcessor
org.geysermc.geyser.processor.SoundHandlerProcessor
7 changes: 7 additions & 0 deletions api/base/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dependencies {
api(libs.cumulus)
api(libs.events) {
exclude(group = "com.google.guava", module = "guava")
exclude(group = "org.lanternpowered", module = "lmbda")
}
}
27 changes: 0 additions & 27 deletions api/base/pom.xml

This file was deleted.

5 changes: 3 additions & 2 deletions api/base/src/main/java/org/geysermc/api/Geyser.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class Geyser {
*
* @return the base api
*/
@NonNull
public static GeyserApiBase api() {
if (api == null) {
throw new RuntimeException("Api has not been registered yet!");
Expand Down Expand Up @@ -69,7 +70,7 @@ public static <T extends GeyserApiBase> T api(@NonNull Class<T> apiClass) {

/**
* Registers the given api type. The api cannot be
* registered if {@link #registered()} is true as
* registered if {@link #isRegistered()} is true as
* an api has already been specified.
*
* @param api the api
Expand All @@ -88,7 +89,7 @@ public static void set(@NonNull GeyserApiBase api) {
*
* @return if the api has been registered
*/
public static boolean registered() {
public static boolean isRegistered() {
return api != null;
}
}
Loading

0 comments on commit 07196b0

Please sign in to comment.