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

Update feature/forge branch to 1.20.4, target neoforge #4396

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
44174fd
Add 1.20.50 Bedrock support (#4296)
onebeastchris Nov 21, 2023
119fbc8
Don't send an awkward "null" when a exeption disconnect cause doesn't…
onebeastchris Nov 22, 2023
3292718
Don't show custom names on display entities (#4309)
onebeastchris Nov 23, 2023
0f50a3c
Re-implement subchunk v9 with proper index (#4287)
Kas-tle Nov 29, 2023
11945db
Clear mob spawners if the Java server so requests (#4232)
onebeastchris Dec 1, 2023
b8481cc
Fix: Recipe tags application
onebeastchris Dec 1, 2023
308f293
Fix potential issue with the settings form - coordinate showing might…
onebeastchris Dec 4, 2023
998caee
Catch all throwables when loading each extension (#4320)
Konicai Dec 4, 2023
95d6535
Project wide syntax/annotation cleanup (#4238)
onebeastchris Dec 5, 2023
c0f6a2b
Add more info to Fabric's geyser dumps (#4175)
onebeastchris Dec 6, 2023
94a1cbe
Default motd and player count passthrough config values to true(#2523)
TheFlood424K Dec 6, 2023
9d6dd58
Ensure executor service isn't null by accessing it via the getter (#4…
onebeastchris Dec 6, 2023
3971650
Fix collision problem with glass pane and iron bars (#4302)
MikuSnow Dec 7, 2023
1499def
Catch UnknownHostExceptions in legacy ping passthrough pings (#4331)
onebeastchris Dec 7, 2023
f1e7ef9
Fix issues with the ConnectionTestCommand (#4333)
onebeastchris Dec 11, 2023
d63a70d
Add support for adding custom translations. (#4047)
kyrptonaught Dec 11, 2023
3d05181
Fix: Show the correct port that Geyser started on when using Geyser-F…
onebeastchris Dec 12, 2023
f337039
1.20.3: update Items class
Konicai Nov 21, 2023
184a14d
Update versions in README and modrinth task (#4303)
hasankayra04 Nov 21, 2023
a89aa4e
1.20.3: compiling protocol changes
Konicai Nov 25, 2023
f38d82c
Drop <1.20.50
Konicai Nov 27, 2023
f0e9839
update mappings
Konicai Nov 27, 2023
c7da8fe
Better nullability annotations/handling for ItemStacks
Konicai Nov 30, 2023
701e567
Enable 1.21 experimental features
Konicai Nov 30, 2023
9b53f2e
Update 1.20.50 creative items to include experimental items
Konicai Nov 30, 2023
e2062dd
Reimplement support for 1.20.40
Konicai Dec 1, 2023
2200905
Crafter translation
Konicai Dec 3, 2023
21a2c23
translate trial spawners, cleanup
Konicai Dec 13, 2023
d3a4b13
cleanup
Konicai Dec 14, 2023
4294982
fabric: require 1.20.4 as ViaFabric doesn't support 1.20.2
Konicai Dec 14, 2023
a13492e
Final 1.20.4 cleanup
Konicai Dec 14, 2023
aaf38f4
Target Java 17
Kas-tle Dec 15, 2023
6e56666
Update spigot adapters to include 1.20.4 (#4340)
Konicai Dec 15, 2023
58ff00d
Fixed an issue where there would be a null score in SetScorePacket
Tim203 Dec 16, 2023
af83e92
Fix (de)serialization of ClientboundExplodePacket (#4351)
Konicai Dec 19, 2023
f3e56d2
Gracefully fail on older spigot builds due to outdated netty (#4355)
onebeastchris Dec 20, 2023
32a8573
Fix broken netty util class check (#4357)
onebeastchris Dec 20, 2023
cdb8ab3
bump cloudburst/netty dependencies (#4354)
onebeastchris Dec 20, 2023
071ee2a
Merge remote-tracking branch 'upstream/master' into feature/forge-pla…
onebeastchris Dec 21, 2023
0b6f558
init: neoforge 1.20.4 support
onebeastchris Dec 21, 2023
f4f49cd
NeoForge builds
Kas-tle Dec 22, 2023
fbbfa96
Archive neoforge artifacts
Kas-tle Dec 22, 2023
3726b27
Merge pull request #13 from Kas-tle/feature/neoforge
onebeastchris Dec 22, 2023
b0ccf45
Closes GeyserMC/Geyser#4358 (#4360)
Kas-tle Dec 24, 2023
592a58a
Use uuid for bukkit api permission checks (#4363)
onebeastchris Dec 25, 2023
8ee9c45
transformForge -> transformNeoForge
onebeastchris Dec 26, 2023
46bde0c
Fix: protocol being null during online mode login (#4369)
onebeastchris Dec 31, 2023
7613bdb
Fix https://github.com/GeyserMC/Geyser/issues/4378
Camotoy Jan 4, 2024
178a886
Merge remote-tracking branch 'upstream/master' into feature/forge-pla…
onebeastchris Jan 10, 2024
afacada
Neoforge boots!
onebeastchris Jan 10, 2024
b9ab9fe
more fixes
onebeastchris Jan 12, 2024
a5883bc
Merge remote-tracking branch 'upstream/feature/forge-platform' into f…
onebeastchris Jan 16, 2024
1d3914f
yeet platform executor
onebeastchris Jan 17, 2024
6ab0e7e
yet another temp branch to figure out the runServer task
onebeastchris Jan 18, 2024
f640f97
yeet transitive dependency, that cant be right
onebeastchris Jan 21, 2024
7d4a69f
Attempt at getting the runServer task to work, part two
onebeastchris Jan 21, 2024
96c4731
Revert the changes for the runServer task, try and shut down the inje…
onebeastchris Jan 21, 2024
e94ef30
Remove spigot weird bug workaround, shut down properly
onebeastchris Jan 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ jobs:
name: Geyser Fabric
path: bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
if-no-files-found: error
- name: Archive artifacts (Geyser Forge)
- name: Archive artifacts (Geyser NeoForge)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
if: success()
with:
name: Geyser Forge
path: bootstrap/mod/forge/build/libs/Geyser-Forge.jar
name: Geyser NeoForge
path: bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
if-no-files-found: error
- name: Archive artifacts (Geyser Standalone)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
Expand Down Expand Up @@ -127,13 +127,13 @@ jobs:
arguments: fabric:modrinth
gradle-home-cache-cleanup: true

- name: Publish to Modrinth (Forge)
- name: Publish to Modrinth (NeoForge)
uses: gradle/gradle-build-action@3bfe3a46584a206fb8361cdedd0647b0c4204232
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
env:
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
with:
arguments: forge:modrinth
arguments: neoforge:modrinth
gradle-home-cache-cleanup: true

- name: Notify Discord
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ jobs:
name: Geyser Fabric
path: geyser/bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
if-no-files-found: error
- name: Archive artifacts (Geyser Forge)
- name: Archive artifacts (Geyser NeoForge)
uses: actions/upload-artifact@v3
if: success()
with:
name: Geyser Forge
path: geyser/bootstrap/mod/forge/build/libs/Geyser-Forge.jar
name: Geyser NeoForge
path: geyser/bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
if-no-files-found: error
- name: Archive artifacts (Geyser Standalone)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
Expand Down
18 changes: 7 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,28 @@ public class LongClassName {
public int nameWithMultipleWords = 0;

/**
* Javadoc comment to explain what a function does.
*/
* Javadoc comment to explain what a function does.
*/
@RandomAnnotation(stuff = true, moreStuff = "might exist")
public void applyStuff() {
Variable variable = new Variable();
Variable otherVariable = new Variable();

if (condition) {
// Do stuff.
// Do stuff.
} else if (anotherCondition) {
// Do something else.
// Do something else.
}

switch (value) {
case 0:
stuff();
break;
case 1:
differentStuff();
break;
case 0 -> stuff();
case 1 -> differentStuff();
}
}
}
```

Make sure to comment your code where possible.
Make sure to comment your code where possible. To mark nullable methods, use `@Nullable` (and subsequently, `@NonNull`) from the `org.checkerframework.checker.nullness.qual` package.

The nature of our software requires a lot of arrays and maps to be stored - where possible, use Fastutil's specialized maps. For example, if you're storing block state translations, use an `Int2IntMap`.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,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!

### Currently supporting Minecraft Bedrock 1.20.0 - 1.20.40 and Minecraft Java 1.20.2
### Currently supporting Minecraft Bedrock 1.20.40 - 1.20.51 and Minecraft Java 1.20.4

## Setting Up
Take a look [here](https://wiki.geysermc.org/geyser/setup/) for how to set up Geyser.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

package org.geysermc.geyser.processor;

import org.checkerframework.checker.nullness.qual.Nullable;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
Expand Down Expand Up @@ -159,7 +161,7 @@ public void complete() {
this.processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Completed processing for " + this.annotationClassName);
}

private BufferedReader createReader() throws IOException {
private @Nullable BufferedReader createReader() throws IOException {
if (this.outputPath != null) {
this.processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Reading existing " + this.annotationClassName + " list from " + this.outputPath);
return Files.newBufferedReader(this.outputPath);
Expand Down
1 change: 1 addition & 0 deletions api/src/main/java/org/geysermc/geyser/api/GeyserApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public interface GeyserApi extends GeyserApiBase {
* @param apiClass the builder class
* @param <R> the implementation type
* @param <T> the API type
* @throws IllegalArgumentException if there is no provider for the specified API class
* @return the builder instance
*/
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@

public enum CameraShake {
POSITIONAL,
ROTATIONAL;
ROTATIONAL
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

package org.geysermc.geyser.api.block.custom.component;

import org.checkerframework.checker.nullness.qual.NonNull;

import java.util.LinkedHashMap;
import java.util.Set;

import org.checkerframework.checker.nullness.qual.NonNull;

/**
* This class is used to store conditions for a placement filter for a custom block.
*
Expand All @@ -43,7 +43,7 @@ public enum Face {
NORTH,
SOUTH,
WEST,
EAST;
EAST
}

public enum BlockFilterType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface JavaBlockState {
*
* @return whether the block state is waterlogged
*/
@NonNull boolean waterlogged();
boolean waterlogged();

/**
* Gets the collision of the block state
Expand All @@ -53,7 +53,7 @@ public interface JavaBlockState {
*
* @return whether the block state can be broken with hand
*/
@NonNull boolean canBreakWithHand();
boolean canBreakWithHand();

/**
* Gets the pick item of the block state
Expand All @@ -74,7 +74,7 @@ public interface JavaBlockState {
*
* @return whether the block state has block entity
*/
@Nullable boolean hasBlockEntity();
boolean hasBlockEntity();

/**
* Creates a new {@link JavaBlockState.Builder} instance
Expand All @@ -94,17 +94,17 @@ interface Builder {

Builder blockHardness(@NonNegative float blockHardness);

Builder waterlogged(@NonNull boolean waterlogged);
Builder waterlogged(boolean waterlogged);

Builder collision(@NonNull JavaBoundingBox[] collision);

Builder canBreakWithHand(@NonNull boolean canBreakWithHand);
Builder canBreakWithHand(boolean canBreakWithHand);

Builder pickItem(@Nullable String pickItem);

Builder pistonBehavior(@Nullable String pistonBehavior);

Builder hasBlockEntity(@Nullable boolean hasBlockEntity);
Builder hasBlockEntity(boolean hasBlockEntity);

JavaBlockState build();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
package org.geysermc.geyser.api.block.custom.nonvanilla;

import org.checkerframework.checker.nullness.qual.NonNull;

public record JavaBoundingBox(@NonNull double middleX, @NonNull double middleY, @NonNull double middleZ, @NonNull double sizeX, @NonNull double sizeY, @NonNull double sizeZ) {
public record JavaBoundingBox(double middleX, double middleY, double middleZ, double sizeX, double sizeY, double sizeZ) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.event.Event;
import org.geysermc.event.bus.OwnedEventBus;
import org.geysermc.geyser.api.extension.Extension;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import org.geysermc.event.Event;
import org.geysermc.event.subscribe.OwnedSubscriber;
import org.geysermc.geyser.api.extension.Extension;

/**
* Represents a subscribed listener to a {@link Event}. Wraps around
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/**
* Called whenever Geyser gets pinged
*
* <p>
* This event allows you to modify/obtain the MOTD, maximum player count, and current number of players online,
* Geyser will reply to the client with what was given.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/**
* Called when commands are defined within Geyser.
*
* <p>
* This event allows you to register new commands using the {@link #register(Command)}
* method and retrieve the default commands defined.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.api.block.custom.CustomBlockData;
import org.geysermc.geyser.api.block.custom.CustomBlockState;
import org.geysermc.geyser.api.block.custom.nonvanilla.JavaBlockItem;
import org.geysermc.geyser.api.block.custom.nonvanilla.JavaBlockState;
import org.geysermc.event.Event;

/**
* Called on Geyser's startup when looking for custom blocks. Custom blocks must be registered through this event.
*
* <p>
* This event will not be called if the "add-non-bedrock-items" setting is disabled in the Geyser config.
*/
public abstract class GeyserDefineCustomBlocksEvent implements Event {
Expand All @@ -48,8 +47,8 @@ public abstract class GeyserDefineCustomBlocksEvent implements Event {
/**
* Registers the given {@link CustomBlockState} as an override for the
* given java state identifier
* Java state identifiers are listed in
* https://raw.githubusercontent.com/GeyserMC/mappings/master/blocks.json
* Java state identifiers are listed
* <a href="https://raw.githubusercontent.com/GeyserMC/mappings/master/blocks.json">here</a>
*
* @param javaIdentifier the java state identifier to override
* @param customBlockState the custom block state with which to override java state identifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/**
* Called on Geyser's startup when looking for custom items. Custom items must be registered through this event.
*
* <p>
* This event will not be called if the "add non-Bedrock items" setting is disabled in the Geyser config.
*/
public interface GeyserDefineCustomItemsEvent extends Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/**
* Called on Geyser's startup when looking for custom skulls. Custom skulls must be registered through this event.
*
* <p>
* This event will not be called if the "add-non-bedrock-items" setting is disabled in the Geyser config.
*/
public abstract class GeyserDefineCustomSkullsEvent implements Event {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@

package org.geysermc.geyser.api.extension.exception;

import java.io.Serial;

/**
* Thrown when an extension's description is invalid.
*/
public class InvalidDescriptionException extends Exception {

@Serial
private static final long serialVersionUID = 1L;

public InvalidDescriptionException(Throwable cause) {
super(cause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,16 @@

package org.geysermc.geyser.api.extension.exception;

import java.io.Serial;

/**
* Thrown when an extension is invalid.
*/
public class InvalidExtensionException extends Exception {

@Serial
private static final long serialVersionUID = 1L;

public InvalidExtensionException(Throwable cause) {
super(cause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public enum CreativeCategory {
*
* @return the name of the category
*/
@NonNull public String internalName() {
public @NonNull String internalName() {
return internalName;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public record PlatformType(String platformName) {
public static final PlatformType ANDROID = new PlatformType("Android");
public static final PlatformType BUNGEECORD = new PlatformType("BungeeCord");
public static final PlatformType FABRIC = new PlatformType("Fabric");
public static final PlatformType FORGE = new PlatformType("Forge");
public static final PlatformType NEOFORGE = new PlatformType("NeoForge");
public static final PlatformType SPIGOT = new PlatformType("Spigot");

@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/**
* This is a way to represent a boolean, but with a non set value added.
* This class was inspired by adventure's version https://github.com/KyoriPowered/adventure/blob/main/4/api/src/main/java/net/kyori/adventure/util/TriState.java
* This class was inspired by adventure's <a href="https://github.com/KyoriPowered/adventure/blob/main/4/api/src/main/java/net/kyori/adventure/util/TriState.java">TriState</a>
*/
public enum TriState {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import net.md_5.bungee.api.plugin.Plugin;
import org.geysermc.geyser.dump.BootstrapDumpInfo;

import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand All @@ -51,7 +52,8 @@ public class GeyserBungeeDumpInfo extends BootstrapDumpInfo {
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()));
InetSocketAddress address = (InetSocketAddress) listener.getSocketAddress();
this.listeners.add(new ListenerInfo(address.getHostString(), address.getPort()));
}

for (Plugin plugin : proxy.getPluginManager().getPlugins()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.netty.PipelineUtils;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.GeyserBootstrap;
import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.network.netty.GeyserInjector;
Expand Down Expand Up @@ -125,7 +126,7 @@ protected void initializeLocalChannel0(GeyserBootstrap bootstrap) throws Excepti
.channel(LocalServerChannelWrapper.class)
.childHandler(new ChannelInitializer<>() {
@Override
protected void initChannel(Channel ch) throws Exception {
protected void initChannel(@NonNull Channel ch) throws Exception {
if (proxy.getConfig().getServers() == null) {
// Proxy hasn't finished loading all plugins - it loads the config after all plugins
// Probably doesn't need to be translatable?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +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.checkerframework.checker.nullness.qual.Nullable;
import org.geysermc.geyser.ping.GeyserPingInfo;
import org.geysermc.geyser.ping.IGeyserPingPassthrough;

Expand Down Expand Up @@ -104,7 +105,7 @@ public int getVersion() {
}

@Override
public InetSocketAddress getVirtualHost() {
public @Nullable InetSocketAddress getVirtualHost() {
return null;
}

Expand Down
Loading