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

Implement workaround for out of order StartGame packet #714

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
2dc755c
Rename Geyser-Bukkit to Geyser-Spigot
Camotoy May 26, 2020
af669f2
Rename internal ping passthrough variable
Camotoy May 26, 2020
cae888e
Include PlatformType.java
Camotoy May 26, 2020
ccf9eff
Update workflow
Camotoy May 26, 2020
88129b1
Implement workaround for out of order StartGame packet
bundabrg Jun 1, 2020
86094c3
Update to use Thread Pool
Jun 2, 2020
cc3b4c3
Merge latest master; copy over old Geyser-Bukkit configs
Camotoy Jun 11, 2020
d611937
(Incomplete) Update MCProtocolLib
Camotoy Jun 19, 2020
ad4c1ff
Update Message system
rtm516 Jun 19, 2020
65f61ec
Finish block state changes
Camotoy Jun 19, 2020
5327610
Don't forget about Bukkit
Camotoy Jun 19, 2020
47cadc7
Fix json data in chat
rtm516 Jun 19, 2020
8c5f582
Merge branch 'mcprotocollibupdate' of https://github.com/DoctorMacc/G…
rtm516 Jun 19, 2020
1015b83
Merge branch 'master' of https://github.com/GeyserMC/Geyser into mcpr…
Camotoy Jun 20, 2020
dbe1755
Update mappings repository
Camotoy Jun 20, 2020
77873b6
Update ViaVersion integration
Camotoy Jun 21, 2020
117cdf2
Begin updating Geyser. Requires manual MCProtocolLib compile
Camotoy Jun 21, 2020
b9ccabb
According to all known laws of aviation, bees exist
Camotoy Jun 21, 2020
427f4ef
Merge master into Spigot rename
Camotoy Jun 21, 2020
63244ad
Rename Geyser-Bukkit to Geyser-Spigot
Camotoy Jun 21, 2020
56f9330
Remove ServerSpawnWeatherEntityPacket
Camotoy Jun 21, 2020
ea1a9e5
Bedrock 1.16 updating part 1
Camotoy Jun 23, 2020
0471fa8
Bedrock 1.16 updating part 2 (Doesn't work)
Camotoy Jun 23, 2020
3ea1059
Update for 1.16
Camotoy Jun 23, 2020
ca7484a
Relocate Reflections Dependency (#802)
williamjohnstone Jun 23, 2020
78df56c
Update for 1.16.1
Camotoy Jun 24, 2020
2b874b4
Merge branch 'feature/1.16' of https://github.com/GeyserMC/Geyser int…
Camotoy Jun 24, 2020
b34dc05
Uncomment JavaDeclareCommandsTranslator and update
Camotoy Jun 24, 2020
60fa43c
Update Bedrock resources dumped by @bundabrg
Camotoy Jun 24, 2020
8be0c4b
Update some entity properties based on wiki.vg
Camotoy Jun 24, 2020
1490d6d
Update ViaVersion dependency
Camotoy Jun 24, 2020
1572ac2
Update mappings repository
Camotoy Jun 24, 2020
f0aaebc
Bump block state version
AJ-Ferguson Jun 24, 2020
a964bef
Merge branch 'feature/1.16' of https://github.com/GeyserMC/Geyser int…
Camotoy Jun 24, 2020
e4d9903
Bump action versions (#810)
basaigh Jun 24, 2020
71aada1
Fix dimension switching; add static references to new Java dimensions
Camotoy Jun 25, 2020
bd16925
Update mappings repository
Camotoy Jun 25, 2020
06fa0de
Add translator for PacketViolationWarningPacket
Camotoy Jun 25, 2020
bb630dc
Update PotionMixData
Camotoy Jun 25, 2020
6f2bf65
Update JavaEntityEquipmentTranslator for Java 1.16
Camotoy Jun 26, 2020
409293f
Add new 1.16 entities
Camotoy Jun 26, 2020
e60f47f
Fix zombified piglins
Camotoy Jun 26, 2020
54f6fad
Remove try/catch from BlockTranslator and ItemTranslator
Camotoy Jun 26, 2020
17a1e82
Add closest color mapping for RGB chat colors
rtm516 Jun 26, 2020
ba91291
Quick inventory fixes. WIP
AJ-Ferguson Jun 27, 2020
d516dc5
Update Mappings (#816)
williamjohnstone Jun 27, 2020
5b147f8
Fix en_us locale downloading (#809)
rtm516 Jun 27, 2020
75f470c
Fix creative items
Camotoy Jun 27, 2020
7743f6d
Add dump command (#808)
rtm516 Jun 27, 2020
3cd85ed
Update README.md (#811)
toinouH Jun 27, 2020
dd1747c
Updated the mappings and fixed building
Tim203 Jun 27, 2020
8f763df
Move common stuff used only by connector and bootstrap to connector
Tim203 Jun 27, 2020
2e0eb6d
Fix creative item list
AJ-Ferguson Jun 27, 2020
e3e8bb2
Fix first item of creative inventory not showing
AJ-Ferguson Jun 28, 2020
6e94428
Non-working smithing table inventory support
Jun 28, 2020
1410b67
Update mappings submodule
AJ-Ferguson Jun 28, 2020
9569416
Fix chat formatting and team colors
rtm516 Jun 28, 2020
2df3d4c
Update to the latest MCProtocolLib commit
Tim203 Jun 28, 2020
980e82a
Replace Bukkit with Spigot (#831)
basaigh Jun 28, 2020
8e8bc28
Return if sound is null and update mappings
Redned235 Jun 28, 2020
c2c64fd
Fix some recipes with multiple ingredient options
AJ-Ferguson Jun 28, 2020
f5da962
Fix disconnect message formatting
rtm516 Jun 28, 2020
12d5982
Anvil fixes
AJ-Ferguson Jun 29, 2020
935ad17
Merge branch 'feature/1.16' into fix/first-login-issue-1.16
bundabrg Jun 29, 2020
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
20 changes: 10 additions & 10 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -24,31 +24,31 @@ jobs:
- name: Build with Maven
run: mvn -B package
- name: Archive artifacts (Geyser Standalone)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Standalone
path: bootstrap/standalone/target/Geyser.jar
- name: Archive artifacts (Geyser Bukkit)
uses: actions/upload-artifact@v1
- name: Archive artifacts (Geyser Spigot)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Bukkit
path: bootstrap/bukkit/target/Geyser-Bukkit.jar
name: Geyser Spigot
path: bootstrap/spigot/target/Geyser-Spigot.jar
- name: Archive artifacts (Geyser BungeeCord)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser BungeeCord
path: bootstrap/bungeecord/target/Geyser-BungeeCord.jar
- name: Archive artifacts (Geyser Sponge)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Sponge
path: bootstrap/sponge/target/Geyser-Sponge.jar
- name: Archive artifacts (Geyser Velocity)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Velocity
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "connector/src/main/resources/mappings"]
path = connector/src/main/resources/mappings
url = https://github.com/GeyserMC/mappings.git
branch = feature/1.16
2 changes: 1 addition & 1 deletion 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 now joined us here!

### Currently supporting Minecraft Bedrock v1.14.6(0) and Minecraft Java v1.15.2.
### Currently supporting Minecraft Bedrock v1.16.0 and Minecraft Java v1.16.1.

## Setting Up
Take a look [here](https://github.com/GeyserMC/Geyser/wiki#Setup) for how to set up Geyser.
Expand Down
4 changes: 4 additions & 0 deletions bootstrap/bungeecord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<pattern>io.netty</pattern>
<shadedPattern>org.geysermc.platform.bungeecord.shaded.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.reflections.reflections</pattern>
<shadedPattern>org.geysermc.platform.bungeecord.shaded.reflections</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*
*/

package org.geysermc.platform.bungeecord;

import lombok.Getter;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import org.geysermc.connector.dump.BootstrapDumpInfo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Getter
public class GeyserBungeeDumpInfo extends BootstrapDumpInfo {

private String platformName;
private String platformVersion;
private boolean onlineMode;
private List<ListenerInfo> listeners;
private List<PluginInfo> plugins;

GeyserBungeeDumpInfo(ProxyServer proxy) {
super();
this.platformName = proxy.getName();
this.platformVersion = proxy.getVersion();
this.onlineMode = proxy.getConfig().isOnlineMode();
this.listeners = new ArrayList<>();
this.plugins = new ArrayList<>();

for (net.md_5.bungee.api.config.ListenerInfo listener : proxy.getConfig().getListeners()) {
this.listeners.add(new ListenerInfo(listener.getHost().getHostString(), listener.getHost().getPort()));
}

for (Plugin plugin : proxy.getPluginManager().getPlugins()) {
this.plugins.add(new PluginInfo(true, plugin.getDescription().getName(), plugin.getDescription().getVersion(), plugin.getDescription().getMain(), Arrays.asList(plugin.getDescription().getAuthor())));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

package org.geysermc.platform.bungeecord;

import org.geysermc.common.main.IGeyserMain;
import org.geysermc.connector.common.main.IGeyserMain;

public class GeyserBungeeMain extends IGeyserMain {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.protocol.ProtocolConstants;
import org.geysermc.common.ping.GeyserPingInfo;
import org.geysermc.connector.common.ping.GeyserPingInfo;
import org.geysermc.connector.ping.IGeyserPingPassthrough;

import java.net.Inet4Address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
import org.geysermc.common.PlatformType;
import org.geysermc.connector.common.PlatformType;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
import org.geysermc.connector.ping.IGeyserPingPassthrough;
import org.geysermc.connector.utils.FileUtils;
Expand Down Expand Up @@ -140,4 +141,9 @@ public IGeyserPingPassthrough getGeyserPingPassthrough() {
public Path getConfigFolder() {
return getDataFolder().toPath();
}

@Override
public BootstrapDumpInfo getDumpInfo() {
return new GeyserBungeeDumpInfo(getProxy());
}
}
2 changes: 1 addition & 1 deletion bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</repository>
</repositories>
<modules>
<module>bukkit</module>
<module>bungeecord</module>
<module>spigot</module>
<module>sponge</module>
<module>standalone</module>
<module>velocity</module>
Expand Down
18 changes: 11 additions & 7 deletions bootstrap/bukkit/pom.xml → bootstrap/spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>bootstrap-bukkit</artifactId>
<artifactId>bootstrap-spigot</artifactId>
<dependencies>
<dependency>
<groupId>org.geysermc</groupId>
Expand All @@ -26,12 +26,12 @@
<dependency>
<groupId>us.myles</groupId>
<artifactId>viaversion</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${outputName}-Bukkit</finalName>
<finalName>${outputName}-Spigot</finalName>
<resources>
<resource>
<directory>src/main/resources/</directory>
Expand All @@ -46,7 +46,7 @@
<configuration>
<archive>
<manifestEntries>
<Main-Class>org.geysermc.platform.bukkit.GeyserBukkitMain</Main-Class>
<Main-Class>org.geysermc.platform.spigot.GeyserSpigotMain</Main-Class>
</manifestEntries>
</archive>
</configuration>
Expand All @@ -65,15 +65,19 @@
<relocations>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.geysermc.platform.bukkit.shaded.netty</shadedPattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.netty</shadedPattern>
</relocation>
<relocation>
<pattern>it.unimi.dsi.fastutil</pattern>
<shadedPattern>org.geysermc.platform.bukkit.shaded.fastutil</shadedPattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.fastutil</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.geysermc.platform.bukkit.shaded.jackson</shadedPattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>org.reflections.reflections</pattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.reflections</shadedPattern>
</relocation>
</relocations>
</configuration>
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.platform.bukkit;
package org.geysermc.platform.spigot;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -38,14 +38,14 @@

@Getter
@JsonIgnoreProperties(ignoreUnknown = true)
public class GeyserBukkitConfiguration extends GeyserJacksonConfiguration {
public class GeyserSpigotConfiguration extends GeyserJacksonConfiguration {

@JsonProperty("floodgate-key-file")
private String floodgateKeyFile;

private Path floodgateKey;

public void loadFloodgate(GeyserBukkitPlugin plugin) {
public void loadFloodgate(GeyserSpigotPlugin plugin) {
Plugin floodgate = Bukkit.getPluginManager().getPlugin("floodgate-bukkit");
floodgateKey = FloodgateKeyLoader.getKey(plugin.getGeyserLogger(), this, Paths.get(plugin.getDataFolder().toString(), plugin.getConfig().getString("floodgate-key-file", "public-key.pem")), floodgate, floodgate != null ? floodgate.getDataFolder().toPath() : null);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*
*/

package org.geysermc.platform.spigot;

import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.geysermc.connector.dump.BootstrapDumpInfo;

import java.util.ArrayList;
import java.util.List;

@Getter
public class GeyserSpigotDumpInfo extends BootstrapDumpInfo {

private String platformName;
private String platformVersion;
private String platformAPIVersion;
private boolean onlineMode;
private String serverIP;
private int serverPort;
private List<PluginInfo> plugins;

GeyserSpigotDumpInfo() {
super();
this.platformName = Bukkit.getName();
this.platformVersion = Bukkit.getVersion();
this.platformAPIVersion = Bukkit.getBukkitVersion();
this.onlineMode = Bukkit.getOnlineMode();
this.serverIP = Bukkit.getIp();
this.serverPort = Bukkit.getPort();
this.plugins = new ArrayList<>();

for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
this.plugins.add(new PluginInfo(plugin.isEnabled(), plugin.getName(), plugin.getDescription().getVersion(), plugin.getDescription().getMain(), plugin.getDescription().getAuthors()));
}
}
}
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.platform.bukkit;
package org.geysermc.platform.spigot;

import lombok.AllArgsConstructor;

Expand All @@ -33,7 +33,7 @@
import java.util.logging.Logger;

@AllArgsConstructor
public class GeyserBukkitLogger implements GeyserLogger {
public class GeyserSpigotLogger implements GeyserLogger {

private Logger logger;
private boolean debugMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
*
*/

package org.geysermc.platform.bukkit;
package org.geysermc.platform.spigot;

import org.geysermc.common.main.IGeyserMain;
import org.geysermc.connector.common.main.IGeyserMain;

public class GeyserBukkitMain extends IGeyserMain {
public class GeyserSpigotMain extends IGeyserMain {

public static void main(String[] args) {
new GeyserBukkitMain().displayMessage();
new GeyserSpigotMain().displayMessage();
}

public String getPluginType() {
Expand Down
Loading