mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Merge remote-tracking branch 'upstream/master' into feature/1.20.40
This commit is contained in:
commit
8173917623
3 changed files with 7 additions and 5 deletions
|
@ -5,9 +5,10 @@ plugins {
|
||||||
id("com.modrinth.minotaur") version "2.+"
|
id("com.modrinth.minotaur") version "2.+"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
indra {
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
javaVersions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
target(17)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -171,10 +171,12 @@ public final class GeyserServer {
|
||||||
|
|
||||||
GeyserServerInitializer serverInitializer = new GeyserServerInitializer(this.geyser);
|
GeyserServerInitializer serverInitializer = new GeyserServerInitializer(this.geyser);
|
||||||
playerGroup = serverInitializer.getEventLoopGroup();
|
playerGroup = serverInitializer.getEventLoopGroup();
|
||||||
|
this.geyser.getLogger().debug("Setting MTU to " + this.geyser.getConfig().getMtu());
|
||||||
return new ServerBootstrap()
|
return new ServerBootstrap()
|
||||||
.channelFactory(RakChannelFactory.server(TRANSPORT.datagramChannel()))
|
.channelFactory(RakChannelFactory.server(TRANSPORT.datagramChannel()))
|
||||||
.group(group)
|
.group(group)
|
||||||
.option(RakChannelOption.RAK_HANDLE_PING, true)
|
.option(RakChannelOption.RAK_HANDLE_PING, true)
|
||||||
|
.option(RakChannelOption.RAK_MAX_MTU, this.geyser.getConfig().getMtu())
|
||||||
.childHandler(serverInitializer);
|
.childHandler(serverInitializer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.cloudburstmc.protocol.bedrock.data.inventory.crafting.PotionMixData;
|
||||||
import org.geysermc.geyser.inventory.item.Potion;
|
import org.geysermc.geyser.inventory.item.Potion;
|
||||||
import org.geysermc.geyser.item.Items;
|
import org.geysermc.geyser.item.Items;
|
||||||
import org.geysermc.geyser.item.type.Item;
|
import org.geysermc.geyser.item.type.Item;
|
||||||
import org.geysermc.geyser.network.GameProtocol;
|
|
||||||
import org.geysermc.geyser.registry.Registries;
|
import org.geysermc.geyser.registry.Registries;
|
||||||
import org.geysermc.geyser.registry.type.ItemMapping;
|
import org.geysermc.geyser.registry.type.ItemMapping;
|
||||||
import org.geysermc.geyser.registry.type.ItemMappings;
|
import org.geysermc.geyser.registry.type.ItemMappings;
|
||||||
|
@ -115,7 +114,7 @@ public class PotionMixRegistryLoader implements RegistryLoader<Object, Int2Objec
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ItemMapping getNonNull(ItemMappings mappings, Item javaItem) {
|
private static ItemMapping getNonNull(ItemMappings mappings, Item javaItem) {
|
||||||
ItemMapping itemMapping = Registries.ITEMS.forVersion(GameProtocol.DEFAULT_BEDROCK_CODEC.getProtocolVersion()).getMapping(javaItem);
|
ItemMapping itemMapping = mappings.getMapping(javaItem);
|
||||||
if (itemMapping == null)
|
if (itemMapping == null)
|
||||||
throw new NullPointerException("No item entry exists for java identifier: " + javaItem.javaIdentifier());
|
throw new NullPointerException("No item entry exists for java identifier: " + javaItem.javaIdentifier());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue