Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-19 22:40:18 +01:00
Merge remote-tracking branch 'upstream/master' into feature/blocky
Dieser Commit ist enthalten in:
Commit
7327e275ef
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@ -106,12 +106,18 @@ jobs:
|
|||||||
# Save the private key to a file
|
# Save the private key to a file
|
||||||
echo "$DOWNLOADS_PRIVATE_KEY" > id_ecdsa
|
echo "$DOWNLOADS_PRIVATE_KEY" > id_ecdsa
|
||||||
chmod 600 id_ecdsa
|
chmod 600 id_ecdsa
|
||||||
|
# Set the project
|
||||||
|
project=geyser
|
||||||
# Get the version from gradle.properties
|
# Get the version from gradle.properties
|
||||||
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
||||||
|
# Create the build folder
|
||||||
|
ssh -o StrictHostKeyChecking=no -i id_ecdsa $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP mkdir -p "~/uploads/$project/$GITHUB_RUN_NUMBER/"
|
||||||
# Copy over artifacts
|
# Copy over artifacts
|
||||||
scp -B -o StrictHostKeyChecking=no -i id_ecdsa bootstrap/**/build/libs/Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/files/
|
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" bootstrap/**/build/libs/Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$project/$GITHUB_RUN_NUMBER/
|
||||||
# Run the build script
|
# Run the build script
|
||||||
ssh -o StrictHostKeyChecking=no -i id_ecdsa $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP ./handleBuild.sh geyser $version $GITHUB_RUN_NUMBER $GITHUB_SHA
|
# Push the metadata
|
||||||
|
echo "{\"project\": \"$project\", \"version\": \"$version\", \"id\": $GITHUB_RUN_NUMBER, \"commit\": \"$GITHUB_SHA\"}" > metadata.json
|
||||||
|
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$project/$GITHUB_RUN_NUMBER/
|
||||||
|
|
||||||
- name: Notify Discord
|
- name: Notify Discord
|
||||||
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
||||||
|
31
.github/workflows/publish.yml
vendored
Normale Datei
31
.github/workflows/publish.yml
vendored
Normale Datei
@ -0,0 +1,31 @@
|
|||||||
|
name: Publish
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '.github/ISSUE_TEMPLATE/*.yml'
|
||||||
|
- '.github/actions/pullrequest.yml'
|
||||||
|
- '.idea/copyright/*.xml'
|
||||||
|
- '.gitignore'
|
||||||
|
- 'CONTRIBUTING.md'
|
||||||
|
- 'LICENSE'
|
||||||
|
- 'Jenkinsfile '
|
||||||
|
- 'README.md'
|
||||||
|
- 'licenseheader.txt'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- uses: gradle/wrapper-validation-action@v1
|
||||||
|
- uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: 17
|
||||||
|
- name: Publish to Modrinth
|
||||||
|
env:
|
||||||
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
run: ./gradlew fabric:modrinth
|
@ -1,9 +1,6 @@
|
|||||||
<img src="https://geysermc.org/img/geyser-1760-860.png" alt="Geyser" width="600"/>
|
<img src="https://geysermc.org/img/geyser-1760-860.png" alt="Geyser" width="600"/>
|
||||||
|
|
||||||
[![forthebadge made-with-java](https://forthebadge.com/images/badges/made-with-java.svg)](https://java.com/)
|
|
||||||
|
|
||||||
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
|
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
|
||||||
[![Build Status](https://ci.opencollab.dev/job/Geyser/job/master/badge/icon)](https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/)
|
|
||||||
[![Discord](https://img.shields.io/discord/613163671870242838.svg?color=%237289da&label=discord)](https://discord.gg/geysermc)
|
[![Discord](https://img.shields.io/discord/613163671870242838.svg?color=%237289da&label=discord)](https://discord.gg/geysermc)
|
||||||
[![Crowdin](https://badges.crowdin.net/geyser/localized.svg)](https://translate.geysermc.org/)
|
[![Crowdin](https://badges.crowdin.net/geyser/localized.svg)](https://translate.geysermc.org/)
|
||||||
|
|
||||||
@ -17,7 +14,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!
|
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.30 - 1.19.70 and Minecraft Java 1.19.4.
|
### Currently supporting Minecraft Bedrock 1.19.30 - 1.19.71 and Minecraft Java 1.19.4.
|
||||||
|
|
||||||
## Setting Up
|
## Setting Up
|
||||||
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
|
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
|
||||||
@ -27,7 +24,7 @@ Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Ge
|
|||||||
## Links:
|
## Links:
|
||||||
- Website: https://geysermc.org
|
- Website: https://geysermc.org
|
||||||
- Docs: https://wiki.geysermc.org/geyser/
|
- Docs: https://wiki.geysermc.org/geyser/
|
||||||
- Download: https://ci.geysermc.org
|
- Download: https://geysermc.org/download
|
||||||
- Discord: https://discord.gg/geysermc
|
- Discord: https://discord.gg/geysermc
|
||||||
- Donate: https://opencollective.com/geysermc
|
- Donate: https://opencollective.com/geysermc
|
||||||
- Test Server: `test.geysermc.org` port `25565` for Java and `19132` for Bedrock
|
- Test Server: `test.geysermc.org` port `25565` for Java and `19132` for Bedrock
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("fabric-loom") version "1.0-SNAPSHOT"
|
id("fabric-loom") version "1.0-SNAPSHOT"
|
||||||
|
id("com.modrinth.minotaur") version "2.+"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
@ -75,3 +76,21 @@ tasks {
|
|||||||
archiveVersion.set("")
|
archiveVersion.set("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modrinth {
|
||||||
|
projectId.set("wKkoqHrH")
|
||||||
|
versionNumber.set(project.version as String + "-" + System.getenv("GITHUB_RUN_NUMBER"))
|
||||||
|
versionType.set("beta")
|
||||||
|
changelog.set("A changelog can be found at https://github.com/GeyserMC/Geyser/commits")
|
||||||
|
|
||||||
|
syncBodyFrom.set(rootProject.file("README.md").readText())
|
||||||
|
|
||||||
|
uploadFile.set(tasks.getByPath("remapJar"))
|
||||||
|
gameVersions.addAll("1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4")
|
||||||
|
|
||||||
|
loaders.add("fabric")
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
required.project("fabric-api")
|
||||||
|
}
|
||||||
|
}
|
@ -68,7 +68,6 @@ public final class BlockStateValues {
|
|||||||
|
|
||||||
public static final int JAVA_AIR_ID = 0;
|
public static final int JAVA_AIR_ID = 0;
|
||||||
|
|
||||||
public static int JAVA_BELL_ID;
|
|
||||||
public static int JAVA_COBWEB_ID;
|
public static int JAVA_COBWEB_ID;
|
||||||
public static int JAVA_FURNACE_ID;
|
public static int JAVA_FURNACE_ID;
|
||||||
public static int JAVA_FURNACE_LIT_ID;
|
public static int JAVA_FURNACE_LIT_ID;
|
||||||
|
@ -49,7 +49,7 @@ public final class GameProtocol {
|
|||||||
*/
|
*/
|
||||||
public static final BedrockPacketCodec DEFAULT_BEDROCK_CODEC = Bedrock_v567patch.BEDROCK_V567PATCH.toBuilder()
|
public static final BedrockPacketCodec DEFAULT_BEDROCK_CODEC = Bedrock_v567patch.BEDROCK_V567PATCH.toBuilder()
|
||||||
.protocolVersion(575)
|
.protocolVersion(575)
|
||||||
.minecraftVersion("1.19.70")
|
.minecraftVersion("1.19.71")
|
||||||
.build();
|
.build();
|
||||||
/**
|
/**
|
||||||
* A list of all supported Bedrock versions that can join Geyser
|
* A list of all supported Bedrock versions that can join Geyser
|
||||||
@ -77,7 +77,9 @@ public final class GameProtocol {
|
|||||||
.protocolVersion(568)
|
.protocolVersion(568)
|
||||||
.minecraftVersion("1.19.62")
|
.minecraftVersion("1.19.62")
|
||||||
.build());
|
.build());
|
||||||
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC);
|
SUPPORTED_BEDROCK_CODECS.add(DEFAULT_BEDROCK_CODEC.toBuilder()
|
||||||
|
.minecraftVersion("1.19.70/1.19.71")
|
||||||
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -294,7 +294,6 @@ public final class BlockRegistryPopulator {
|
|||||||
Deque<String> cleanIdentifiers = new ArrayDeque<>();
|
Deque<String> cleanIdentifiers = new ArrayDeque<>();
|
||||||
|
|
||||||
int javaRuntimeId = -1;
|
int javaRuntimeId = -1;
|
||||||
int bellBlockId = -1;
|
|
||||||
int cobwebBlockId = -1;
|
int cobwebBlockId = -1;
|
||||||
int furnaceRuntimeId = -1;
|
int furnaceRuntimeId = -1;
|
||||||
int furnaceLitRuntimeId = -1;
|
int furnaceLitRuntimeId = -1;
|
||||||
@ -371,10 +370,7 @@ public final class BlockRegistryPopulator {
|
|||||||
// It's possible to only have this store differences in names, but the key set of all Java names is used in sending command suggestions
|
// It's possible to only have this store differences in names, but the key set of all Java names is used in sending command suggestions
|
||||||
BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier.intern(), bedrockIdentifier.intern());
|
BlockRegistries.JAVA_TO_BEDROCK_IDENTIFIERS.register(cleanJavaIdentifier.intern(), bedrockIdentifier.intern());
|
||||||
|
|
||||||
if (javaId.startsWith("minecraft:bell[")) {
|
if (javaId.contains("cobweb")) {
|
||||||
bellBlockId = uniqueJavaId;
|
|
||||||
|
|
||||||
} else if (javaId.contains("cobweb")) {
|
|
||||||
cobwebBlockId = uniqueJavaId;
|
cobwebBlockId = uniqueJavaId;
|
||||||
|
|
||||||
} else if (javaId.startsWith("minecraft:furnace[facing=north")) {
|
} else if (javaId.startsWith("minecraft:furnace[facing=north")) {
|
||||||
@ -395,10 +391,6 @@ public final class BlockRegistryPopulator {
|
|||||||
slimeBlockRuntimeId = javaRuntimeId;
|
slimeBlockRuntimeId = javaRuntimeId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bellBlockId == -1) {
|
|
||||||
throw new AssertionError("Unable to find bell in palette");
|
|
||||||
}
|
|
||||||
BlockStateValues.JAVA_BELL_ID = bellBlockId;
|
|
||||||
|
|
||||||
if (cobwebBlockId == -1) {
|
if (cobwebBlockId == -1) {
|
||||||
throw new AssertionError("Unable to find cobwebs in palette");
|
throw new AssertionError("Unable to find cobwebs in palette");
|
||||||
|
@ -79,6 +79,7 @@ public class BedrockInteractTranslator extends PacketTranslator<InteractPacket>
|
|||||||
session.sendDownstreamPacket(sneakPacket);
|
session.sendDownstreamPacket(sneakPacket);
|
||||||
|
|
||||||
Entity currentVehicle = session.getPlayerEntity().getVehicle();
|
Entity currentVehicle = session.getPlayerEntity().getVehicle();
|
||||||
|
if (currentVehicle != null) {
|
||||||
session.setMountVehicleScheduledFuture(session.scheduleInEventLoop(() -> {
|
session.setMountVehicleScheduledFuture(session.scheduleInEventLoop(() -> {
|
||||||
if (session.getPlayerEntity().getVehicle() == null) {
|
if (session.getPlayerEntity().getVehicle() == null) {
|
||||||
return;
|
return;
|
||||||
@ -94,6 +95,7 @@ public class BedrockInteractTranslator extends PacketTranslator<InteractPacket>
|
|||||||
session.sendUpstreamPacket(linkPacket);
|
session.sendUpstreamPacket(linkPacket);
|
||||||
}
|
}
|
||||||
}, 1, TimeUnit.SECONDS));
|
}, 1, TimeUnit.SECONDS));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MOUSEOVER:
|
case MOUSEOVER:
|
||||||
// Handle the buttons for mobile - "Mount", etc; and the suggestions for console - "ZL: Mount", etc
|
// Handle the buttons for mobile - "Mount", etc; and the suggestions for console - "ZL: Mount", etc
|
||||||
|
@ -199,9 +199,10 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
|
|||||||
*/
|
*/
|
||||||
private static CommandParamData[][] getParams(GeyserSession session, CommandNode commandNode, CommandNode[] allNodes) {
|
private static CommandParamData[][] getParams(GeyserSession session, CommandNode commandNode, CommandNode[] allNodes) {
|
||||||
// Check if the command is an alias and redirect it
|
// Check if the command is an alias and redirect it
|
||||||
if (commandNode.getRedirectIndex() != -1) {
|
if (commandNode.getRedirectIndex().isPresent()) {
|
||||||
GeyserImpl.getInstance().getLogger().debug("Redirecting command " + commandNode.getName() + " to " + allNodes[commandNode.getRedirectIndex()].getName());
|
int redirectIndex = commandNode.getRedirectIndex().getAsInt();
|
||||||
commandNode = allNodes[commandNode.getRedirectIndex()];
|
GeyserImpl.getInstance().getLogger().debug("Redirecting command " + commandNode.getName() + " to " + allNodes[redirectIndex].getName());
|
||||||
|
commandNode = allNodes[redirectIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commandNode.getChildIndices().length >= 1) {
|
if (commandNode.getChildIndices().length >= 1) {
|
||||||
|
@ -103,7 +103,7 @@ public class JavaBlockEventTranslator extends PacketTranslator<ClientboundBlockE
|
|||||||
} else if (packet.getValue() instanceof EndGatewayValue) {
|
} else if (packet.getValue() instanceof EndGatewayValue) {
|
||||||
blockEventPacket.setEventType(1);
|
blockEventPacket.setEventType(1);
|
||||||
session.sendUpstreamPacket(blockEventPacket);
|
session.sendUpstreamPacket(blockEventPacket);
|
||||||
} else if (packet.getValue() instanceof GenericBlockValue bellValue && packet.getBlockId() == BlockStateValues.JAVA_BELL_ID) {
|
} else if (packet.getValue() instanceof BellValue bellValue) {
|
||||||
// Bells - needed to show ring from other players
|
// Bells - needed to show ring from other players
|
||||||
BlockEntityDataPacket blockEntityPacket = new BlockEntityDataPacket();
|
BlockEntityDataPacket blockEntityPacket = new BlockEntityDataPacket();
|
||||||
blockEntityPacket.setBlockPosition(position);
|
blockEntityPacket.setBlockPosition(position);
|
||||||
@ -113,11 +113,12 @@ public class JavaBlockEventTranslator extends PacketTranslator<ClientboundBlockE
|
|||||||
builder.putInt("y", position.getY());
|
builder.putInt("y", position.getY());
|
||||||
builder.putInt("z", position.getZ());
|
builder.putInt("z", position.getZ());
|
||||||
builder.putString("id", "Bell");
|
builder.putString("id", "Bell");
|
||||||
int bedrockRingDirection = switch (bellValue.getValue()) {
|
int bedrockRingDirection = switch (bellValue.getDirection()) {
|
||||||
case 3 -> 0; // north
|
case SOUTH -> 0;
|
||||||
case 4 -> 1; // east
|
case WEST -> 1;
|
||||||
case 5 -> 3;// west
|
case NORTH -> 2;
|
||||||
default -> bellValue.getValue(); // south (2) is identical
|
case EAST -> 3;
|
||||||
|
default -> throw new IllegalStateException("Unexpected BellValue Direction: " + bellValue.getDirection());
|
||||||
};
|
};
|
||||||
builder.putInt("Direction", bedrockRingDirection);
|
builder.putInt("Direction", bedrockRingDirection);
|
||||||
builder.putByte("Ringing", (byte) 1);
|
builder.putByte("Ringing", (byte) 1);
|
||||||
|
@ -11,7 +11,7 @@ websocket = "1.5.1"
|
|||||||
protocol = "2.9.17-20230217.002312-1"
|
protocol = "2.9.17-20230217.002312-1"
|
||||||
raknet = "1.6.28-20220125.214016-6"
|
raknet = "1.6.28-20220125.214016-6"
|
||||||
mcauthlib = "d9d773e"
|
mcauthlib = "d9d773e"
|
||||||
mcprotocollib = "1.19.4-20230317.173631-4"
|
mcprotocollib = "1.19.4-20230319.175814-6"
|
||||||
adventure = "4.12.0-20220629.025215-9"
|
adventure = "4.12.0-20220629.025215-9"
|
||||||
adventure-platform = "4.1.2"
|
adventure-platform = "4.1.2"
|
||||||
junit = "5.9.2"
|
junit = "5.9.2"
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren