batch o' patches

This commit is contained in:
Jake Potrebic
2022-06-08 00:40:34 -07:00
parent 88d7a4ed1d
commit da97ab094f
38 changed files with 9 additions and 17 deletions

View File

@@ -25,9 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) { if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack}); SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
- ItemStack itemstack1 = (ItemStack) world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world).map((recipecampfire) -> { - ItemStack itemstack1 = (ItemStack) campfire.quickCheck.getRecipeFor(inventorysubcontainer, world).map((recipecampfire) -> {
+ // Paper start + Optional<CampfireCookingRecipe> recipe = campfire.quickCheck.getRecipeFor( inventorysubcontainer, world);
+ Optional<CampfireCookingRecipe> recipe = world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world);
+ ItemStack itemstack1 = (ItemStack) recipe.map((recipecampfire) -> { + ItemStack itemstack1 = (ItemStack) recipe.map((recipecampfire) -> {
+ // Paper end + // Paper end
return recipecampfire.assemble(inventorysubcontainer); return recipecampfire.assemble(inventorysubcontainer);

View File

@@ -276,7 +276,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override @Override
public void sendMessage(Component message, UUID sender) { public void sendSystemMessage(Component message) {
- MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors - MinecraftServer.LOGGER.info(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
+ MinecraftServer.LOGGER.info(io.papermc.paper.console.HexFormattingConverter.SERIALIZER.serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors + MinecraftServer.LOGGER.info(io.papermc.paper.console.HexFormattingConverter.SERIALIZER.serialize(io.papermc.paper.adventure.PaperAdventure.asAdventure(message))); // Paper - Log message with colors
} }

View File

@@ -9,9 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -0,0 +0,0 @@ public class PaperConfig { @@ -0,0 +0,0 @@ public class PaperConfig {
fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync); trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false);
} }
+
+ public static boolean enableBrigadierConsoleHighlighting = true; + public static boolean enableBrigadierConsoleHighlighting = true;
+ public static boolean enableBrigadierConsoleCompletions = true; + public static boolean enableBrigadierConsoleCompletions = true;
+ private static void consoleSettings() { + private static void consoleSettings() {

View File

@@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper + worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper
} }
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, holder, this.getServer().progressListenerFactory.create(11), ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
@@ -0,0 +0,0 @@ public final class CraftServer implements Server { @@ -0,0 +0,0 @@ public final class CraftServer implements Server {
return null; return null;
} }

View File

@@ -29,13 +29,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- Optional<ItemEntity> optional = list.stream().filter((itemEntity) -> { - Optional<ItemEntity> optional = list.stream().filter((itemEntity) -> {
- return entity.wantsToPickUp(itemEntity.getItem()); - return entity.wantsToPickUp(itemEntity.getItem());
- }).filter((itemEntity) -> { - }).filter((itemEntity) -> {
- return itemEntity.closerThan(entity, 9.0D); - return itemEntity.closerThan(entity, 32.0D);
- }).filter(entity::hasLineOfSight).findFirst(); - }).filter(entity::hasLineOfSight).findFirst();
- brain.setMemory(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, optional); - brain.setMemory(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, optional);
+ // Paper start - remove streams in favour of lists + // Paper start - remove streams in favour of lists
+ ItemEntity nearest = null; + ItemEntity nearest = null;
+ for (ItemEntity entityItem : list) { + for (ItemEntity entityItem : list) {
+ if (entity.wantsToPickUp(entityItem.getItem()) && entityItem.closerThan(entity, 9.0D) && entity.hasLineOfSight(entityItem)) { + if (entity.wantsToPickUp(entityItem.getItem()) && entityItem.closerThan(entity, 32.0D) && entity.hasLineOfSight(entityItem)) {
+ nearest = entityItem; + nearest = entityItem;
+ break; + break;
+ } + }

View File

@@ -8,19 +8,11 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -0,0 +0,0 @@ import net.minecraft.gametest.framework.GameTestTicker;
import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TextComponent;
-import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
import net.minecraft.network.protocol.status.ServerStatus;
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next(); ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420) if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
- entityplayer.connection.disconnect(new TranslatableComponent("multiplayer.disconnect.not_whitelisted")); - entityplayer.connection.disconnect(Component.translatable("multiplayer.disconnect.not_whitelisted"));
+ entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message + entityplayer.connection.disconnect(org.spigotmc.SpigotConfig.whitelistMessage); // Paper - use configurable message
} }
} }