Fix more issues

This commit is contained in:
Jake Potrebic 2022-06-07 20:59:40 -07:00
parent e880bd3dd5
commit e8ece1a43a
3 changed files with 6 additions and 4 deletions

View file

@ -289,7 +289,7 @@ public net.minecraft.world.level.levelgen.SurfaceRules$Context blockX
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockY public net.minecraft.world.level.levelgen.SurfaceRules$Context blockY
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockZ public net.minecraft.world.level.levelgen.SurfaceRules$Context blockZ
public net.minecraft.world.level.levelgen.SurfaceRules$Context context public net.minecraft.world.level.levelgen.SurfaceRules$Context context
public net.minecraft.world.level.levelgen.SurfaceRules$Context system public net.minecraft.world.level.levelgen.SurfaceRules$Context randomState
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource

View file

@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
EntitySelectorOptions.bootStrap(); EntitySelectorOptions.bootStrap();
DispenseItemBehavior.bootStrap(); DispenseItemBehavior.bootStrap();
CauldronInteraction.bootStrap(); CauldronInteraction.bootStrap();
+ Registry.register(net.minecraft.core.Registry.CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC); // Paper - register custom flat bedrock thing. TODO is this the best place to do this? + Registry.register(net.minecraft.core.Registry.CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec()); // Paper - register custom flat bedrock thing. TODO is this the best place to do this?
Registry.freezeBuiltins(); Registry.freezeBuiltins();
Bootstrap.wrapStreams(); Bootstrap.wrapStreams();
} }

View file

@ -86,7 +86,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private static boolean canSendImmediate(Connection networkManager, Packet<?> packet) { + private static boolean canSendImmediate(Connection networkManager, Packet<?> packet) {
+ return networkManager.isPending || networkManager.protocol != ConnectionProtocol.PLAY || + return networkManager.isPending || networkManager.protocol != ConnectionProtocol.PLAY ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundKeepAlivePacket || + packet instanceof net.minecraft.network.protocol.game.ClientboundKeepAlivePacket ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundChatPacket || + packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundSystemChatPacket ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundChatPreviewPacket ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket || + packet instanceof net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundSetTitleTextPacket || + packet instanceof net.minecraft.network.protocol.game.ClientboundSetTitleTextPacket ||
+ packet instanceof net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket || + packet instanceof net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket ||
@ -170,7 +172,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start + // Paper start
+ } catch (Exception e) { + } catch (Exception e) {
+ LOGGER.error("NetworkException: " + player, e); + LOGGER.error("NetworkException: " + player, e);
+ disconnect(new net.minecraft.network.chat.TranslatableComponent("disconnect.genericReason", "Internal Exception: " + e.getMessage())); + disconnect(Component.translatable("disconnect.genericReason", "Internal Exception: " + e.getMessage()));
+ packet.onPacketDispatchFinish(player, null); + packet.onPacketDispatchFinish(player, null);
+ } + }
+ // Paper end + // Paper end