Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin work on updating to 1.19.3 #1142

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
146 changes: 73 additions & 73 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Dev Build
on:
push:
branches: [dev, '1.12']
paths:
paths:
- .github/workflows/**
- etc/checkstyle.xml
- src/**
Expand All @@ -20,83 +20,83 @@ jobs:
name: Dev Build (Java ${{ matrix.java }})

steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}

- name: Cache gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/native
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/libs.versions.toml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/native
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/libs.versions.toml') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Gradle Build and Deploy
run: BUILD_EXTRAS=true ./gradlew assemble publish --no-daemon --stacktrace
env:
ORG_GRADLE_PROJECT_glowstoneUsername: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_glowstonePassword: ${{ secrets.MAVEN_PASSWORD }}
- name: Gradle Build and Deploy
run: BUILD_EXTRAS=true ./gradlew assemble publish --no-daemon --stacktrace
env:
ORG_GRADLE_PROJECT_glowstoneUsername: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_glowstonePassword: ${{ secrets.MAVEN_PASSWORD }}

- name: Get Minecraft version
id: version
run: |
minecraft_version=$(./gradlew -q printMinecraftVersion)
echo "::set-output name=minecraft_version::$minecraft_version"
- name: Get Minecraft version
id: version
run: |
minecraft_version=$(./gradlew -q printMinecraftVersion)
echo "::set-output name=minecraft_version::$minecraft_version"

- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties

- name: Push Javadocs to Pages
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
with:
source_file: 'build/docs/javadoc/.'
destination_repo: 'GlowstoneMC/glowstonemc.github.io'
destination_folder: content/jd/glowstone/${{ steps.version.outputs.minecraft_version }}/
user_email: '[email protected]'
user_name: 'mastercoms'
commit_message: Update Javadocs for Glowstone commit ${{ github.sha }}
- name: Push Javadocs to Pages
uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
with:
source_file: 'build/docs/javadoc/.'
destination_repo: 'GlowstoneMC/glowstonemc.github.io'
destination_folder: content/jd/glowstone/${{ steps.version.outputs.minecraft_version }}/
user_email: '[email protected]'
user_name: 'mastercoms'
commit_message: Update Javadocs for Glowstone commit ${{ github.sha }}

- name: GitHub Artifact
uses: actions/upload-artifact@v3
with:
name: glowstone
path: build/libs/glowstone.jar
- name: GitHub Artifact
uses: actions/upload-artifact@v3
with:
name: glowstone
path: build/libs/glowstone.jar

- name: Setup SSH
if: ${{ github.ref == 'refs/heads/1.12' }}
run: |
mkdir -p ~/.ssh
cat << EOF > ~/.ssh/config
Host *
ControlMaster auto
ControlPath ~/.ssh/-%r@%h:%p
ControlPersist 120
EOF
echo $SSH_KNOWN_HOSTS >> ~/.ssh/known_hosts
sudo apt-get install sshpass
env:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Setup SSH
if: ${{ github.ref == 'refs/heads/1.12' }}
run: |
mkdir -p ~/.ssh
cat << EOF > ~/.ssh/config
Host *
ControlMaster auto
ControlPath ~/.ssh/-%r@%h:%p
ControlPersist 120
EOF
echo $SSH_KNOWN_HOSTS >> ~/.ssh/known_hosts
sudo apt-get install sshpass
env:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}

- name: Deploy to Test Server
if: ${{ github.ref == 'refs/heads/1.12' }}
run: |
sshpass -e scp target/glowstone.jar glowstone@$SSH_ADDRESS:
sshpass -e ssh glowstone@$SSH_ADDRESS sudo systemctl restart glowstone
env:
SSH_ADDRESS: ${{ secrets.SSH_ADDRESS }}
SSHPASS: ${{ secrets.SSH_PASSWORD }}
- name: Deploy to Test Server
if: ${{ github.ref == 'refs/heads/1.12' }}
run: |
sshpass -e scp target/glowstone.jar glowstone@$SSH_ADDRESS:
sshpass -e ssh glowstone@$SSH_ADDRESS sudo systemctl restart glowstone
env:
SSH_ADDRESS: ${{ secrets.SSH_ADDRESS }}
SSHPASS: ${{ secrets.SSH_PASSWORD }}
13 changes: 11 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
checkstyle
jacoco
kotlin("jvm") version "1.7.0"
application

id("io.freefair.lombok") version "6.5.0-rc1"
id("com.github.johnrengelman.shadow") version "7.1.2"
Expand Down Expand Up @@ -53,6 +54,13 @@ dependencies {
compileOnly(libs.jetbrains.annotations)
}


application {
mainClass.set("net.glowstone.GlowServer")
}



group = "net.glowstone"
version = "2022.6.1-SNAPSHOT"
description = "A fast, customizable and compatible open source Minecraft server."
Expand Down Expand Up @@ -127,6 +135,7 @@ kotlin {
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release.set(javaVersion)
options.isWarnings = false;
}

tasks.withType<Javadoc> {
Expand Down Expand Up @@ -208,8 +217,8 @@ tasks.jar {
tasks.shadowJar {
val prefix = "org.bukkit.craftbukkit.libs"
listOf(
"jline",
"it.unimi",
"jline",
"it.unimi",
).forEach { pattern ->
relocate(pattern, "$prefix.$pattern")
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
group = net.glowstone
mcVersion = 1.19
mcVersion = 1.19.3
org.gradle.warning.mode=none

org.gradle.caching=true
org.gradle.parallel=true
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
api = "1.19-R0.1-SNAPSHOT"
api = "1.19.3-R0.1-SNAPSHOT"
redstone-transformer = "1.1.0-SNAPSHOT"
linkstone = "1.0.0-SNAPSHOT"

checkstyle = "8.44"
jansi = "1.18"
jline = "2.14.6"
fastutil = "1.0"
flow = "1.2.10-SNAPSHOT"
flow = "1.2.11-SNAPSHOT"
fastuuid = "0.1"
brigadier = "1.0.17"
gluegen = "2.3.2"
Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
*/

rootProject.name = "glowstone"
enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
2 changes: 1 addition & 1 deletion src/main/java/net/glowstone/EventFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public PlayerJoinEvent onPlayerJoin(Player player) {
}

public PlayerKickEvent onPlayerKick(Player player, String reason) {
return callEvent(new PlayerKickEvent(player, reason, null));
return callEvent(new PlayerKickEvent(player, reason, ""));
}

public PlayerQuitEvent onPlayerQuit(Player player) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/glowstone/GlowOfflinePlayer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.glowstone;

import com.destroystokyo.paper.profile.PlayerProfile;
import lombok.Getter;
import net.glowstone.entity.meta.profile.GlowPlayerProfile;
import net.glowstone.entity.meta.profile.ProfileCache;
Expand All @@ -15,7 +16,6 @@
import org.bukkit.configuration.serialization.SerializableAs;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.profile.PlayerProfile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down
42 changes: 39 additions & 3 deletions src/main/java/net/glowstone/GlowServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
import net.glowstone.linkstone.runtime.FieldSet;
import net.glowstone.linkstone.runtime.LinkstoneRuntimeData;
import net.glowstone.linkstone.runtime.inithook.ClassInitHook;
import net.glowstone.linkstone.runtime.FieldSet;
import net.glowstone.linkstone.runtime.LinkstoneRuntimeData;
import net.glowstone.map.GlowMapView;
import net.glowstone.net.GameServer;
import net.glowstone.net.GlowSession;
Expand Down Expand Up @@ -140,6 +142,8 @@
import net.glowstone.util.linkstone.LinkstoneClassInitObserver;
import net.glowstone.util.linkstone.LinkstonePluginLoader;
import net.glowstone.util.linkstone.LinkstonePluginScanner;
import net.glowstone.util.linkstone.LinkstoneClassInitObserver;
import net.glowstone.util.linkstone.LinkstonePluginScanner;
import net.glowstone.util.loot.LootingManager;
import net.glowstone.util.mojangson.Mojangson;
import net.glowstone.util.mojangson.ex.MojangsonParseException;
Expand All @@ -161,6 +165,7 @@
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.OfflinePlayer;
import org.bukkit.Registry;
import org.bukkit.Server;
import org.bukkit.StructureType;
import org.bukkit.Tag;
Expand Down Expand Up @@ -216,6 +221,7 @@
import org.bukkit.plugin.messaging.StandardMessenger;
import org.bukkit.potion.PotionBrewer;
import org.bukkit.profile.PlayerProfile;
import org.bukkit.scoreboard.Criteria;
import org.bukkit.structure.StructureManager;
import org.bukkit.util.CachedServerIcon;
import org.bukkit.util.permissions.DefaultPermissions;
Expand Down Expand Up @@ -282,11 +288,11 @@ public class GlowServer implements Server {
/**
* The game version supported by the server.
*/
public static final String GAME_VERSION = NoInline.of("1.19");
public static final String GAME_VERSION = NoInline.of("1.19.3");
/**
* The protocol version supported by the server.
*/
public static final int PROTOCOL_VERSION = NoInline.of(759);
public static final int PROTOCOL_VERSION = NoInline.of(761);
/**
* The data version supported by the server.
*/
Expand Down Expand Up @@ -868,7 +874,7 @@ public void start() {
String seedString = config.getString(Key.LEVEL_SEED);
WorldType type = WorldType.getByName(getWorldType());
if (type == null) {
type = WorldType.NORMAL;
type = WorldType.FLAT;
}

long seed = new Random().nextLong();
Expand Down Expand Up @@ -1611,6 +1617,11 @@ public LootTable getLootTable(@NotNull NamespacedKey tableKey) {
return null;
}

@Override
public @org.jetbrains.annotations.Nullable <T extends Keyed> Registry<T> getRegistry(@NotNull Class<T> tClass) {
return null;
}

/**
* Registers an advancement to the advancement registry.
*
Expand Down Expand Up @@ -1972,6 +1983,11 @@ public GlowScoreboardManager getScoreboardManager() {
return scoreboardManager;
}

@Override
public @NotNull Criteria getScoreboardCriteria(@NotNull String name) {
return null;
}

@Override
@Deprecated
public UnsafeValues getUnsafe() {
Expand Down Expand Up @@ -2517,6 +2533,11 @@ public List<World> getWorlds() {
return (List) worlds.getWorlds();
}

@Override
public boolean isTickingWorlds() {
return false;
}

/**
* Gets the default ChunkGenerator for the given environment and type.
*
Expand Down Expand Up @@ -2685,6 +2706,11 @@ public Merchant createMerchant(String title) {
return null;
}

@Override
public int getMaxChainedNeighborUpdates() {
return 0;
}

@Override
public GlowServerIcon getServerIcon() {
return defaultIcon;
Expand Down Expand Up @@ -2748,6 +2774,16 @@ public void setSpawnRadius(int value) {
spawnRadius = value;
}

@Override
public boolean shouldSendChatPreviews() {
return false;
}

@Override
public boolean isEnforcingSecureProfiles() {
return false;
}

@Override
public boolean getHideOnlinePlayers() {
return false;
Expand Down
Loading