mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
even more work
This commit is contained in:
parent
0fde46537f
commit
aca9b5cf34
41 changed files with 45 additions and 61 deletions
|
@ -66,7 +66,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+ }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,9 +50,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
||||||
|
private final IntBuffer timestamps;
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
protected final RegionBitmap usedSectors;
|
protected final RegionBitmap usedSectors;
|
||||||
public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper
|
|
||||||
+ public final Path regionFile; // Paper
|
+ public final Path regionFile; // Paper
|
||||||
|
|
||||||
public RegionFile(Path file, Path directory, boolean dsync) throws IOException {
|
public RegionFile(Path file, Path directory, boolean dsync) throws IOException {
|
||||||
|
@ -145,18 +145,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
@@ -0,0 +0,0 @@ import java.nio.file.Path;
|
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import net.minecraft.FileUtil;
|
|
||||||
import net.minecraft.nbt.CompoundTag;
|
|
||||||
+import net.minecraft.nbt.ListTag;
|
|
||||||
import net.minecraft.nbt.NbtIo;
|
|
||||||
import net.minecraft.nbt.StreamTagVisitor;
|
|
||||||
+import net.minecraft.nbt.Tag;
|
|
||||||
import net.minecraft.util.ExceptionCollector;
|
|
||||||
import net.minecraft.world.level.ChunkPos;
|
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,8 +192,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static void mergeChunkList(CompoundTag level, CompoundTag oversizedLevel, String key, String oversizedKey) {
|
+ private static void mergeChunkList(CompoundTag level, CompoundTag oversizedLevel, String key, String oversizedKey) {
|
||||||
+ ListTag levelList = level.getList(key, 10);
|
+ net.minecraft.nbt.ListTag levelList = level.getList(key, 10);
|
||||||
+ ListTag oversizedList = oversizedLevel.getList(oversizedKey, 10);
|
+ net.minecraft.nbt.ListTag oversizedList = oversizedLevel.getList(oversizedKey, 10);
|
||||||
+
|
+
|
||||||
+ if (!oversizedList.isEmpty()) {
|
+ if (!oversizedList.isEmpty()) {
|
||||||
+ levelList.addAll(oversizedList);
|
+ levelList.addAll(oversizedList);
|
||||||
|
@ -212,7 +201,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ private static int getNBTSize(Tag nbtBase) {
|
+ private static int getNBTSize(net.minecraft.nbt.Tag nbtBase) {
|
||||||
+ DataOutputStream test = new DataOutputStream(new org.apache.commons.io.output.NullOutputStream());
|
+ DataOutputStream test = new DataOutputStream(new org.apache.commons.io.output.NullOutputStream());
|
||||||
+ try {
|
+ try {
|
||||||
+ nbtBase.write(test);
|
+ nbtBase.write(test);
|
||||||
|
@ -228,8 +217,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@Nullable
|
@Nullable
|
||||||
public CompoundTag read(ChunkPos pos) throws IOException {
|
public CompoundTag read(ChunkPos pos) throws IOException {
|
||||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||||
try { // Paper
|
// CraftBukkit end
|
||||||
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
|
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -241,7 +230,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
CompoundTag nbttagcompound;
|
CompoundTag nbttagcompound;
|
||||||
label43:
|
label43:
|
||||||
{
|
{
|
||||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
NbtIo.write(nbt, (DataOutput) dataoutputstream);
|
NbtIo.write(nbt, (DataOutput) dataoutputstream);
|
|
@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
|
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex.factory(), "idcounts")).getFreeAuxValueForMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - helper function for configurable spawn radius
|
+ // Paper start - helper function for configurable spawn radius
|
|
@ -68,7 +68,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}));
|
}));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
throw new UnsupportedOperationException(); // Paper - rewrite chunk system
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -115,5 +115,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> prepareTickingChunk(ChunkHolder holder) {
|
public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> prepareTickingChunk(ChunkHolder holder) {
|
||||||
throw new UnsupportedOperationException(); // Paper - rewrite chunk system
|
CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> {
|
||||||
}
|
return ChunkStatus.FULL;
|
|
@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
player.setServerLevel(worldserver1);
|
player.setServerLevel(worldserver1);
|
||||||
String s1 = "local";
|
String s1 = connection.getLoggableAddress(this.server.logIPs());
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
|
@ -4,11 +4,11 @@ Date: Fri, 10 May 2019 18:38:19 +0100
|
||||||
Subject: [PATCH] Fix CB call to changed postToMainThread method
|
Subject: [PATCH] Fix CB call to changed postToMainThread method
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||||
|
|
||||||
Objects.requireNonNull(this.connection);
|
Objects.requireNonNull(this.connection);
|
||||||
// CraftBukkit - Don't wait
|
// CraftBukkit - Don't wait
|
||||||
|
@ -16,4 +16,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper
|
+ minecraftserver.scheduleOnMain(networkmanager::handleDisconnection); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
private <T, R> CompletableFuture<R> filterTextPacket(T text, BiFunction<TextFilter, T, CompletableFuture<R>> filterer) {
|
protected boolean isSingleplayerOwner() {
|
|
@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
// Paper end
|
}
|
||||||
|
|
||||||
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
|
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
|
||||||
- return this.read(chunkPos).thenApplyAsync((optional) -> {
|
- return this.read(chunkPos).thenApplyAsync((optional) -> {
|
||||||
|
@ -97,7 +97,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
||||||
public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper
|
protected final RegionBitmap usedSectors;
|
||||||
public final Path regionFile; // Paper
|
public final Path regionFile; // Paper
|
||||||
|
|
||||||
+ // Paper start - Cache chunk status
|
+ // Paper start - Cache chunk status
|
||||||
|
@ -135,10 +135,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
private static int getOffsetIndex(ChunkPos pos) {
|
private static int getOffsetIndex(ChunkPos pos) {
|
||||||
return pos.getRegionLocalX() + pos.getRegionLocalZ() * 32;
|
return pos.getRegionLocalX() + pos.getRegionLocalZ() * 32;
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
|
||||||
synchronized (this) {
|
public void close() throws IOException {
|
||||||
try {
|
|
||||||
// Paper end
|
|
||||||
+ this.closed = true; // Paper
|
+ this.closed = true; // Paper
|
||||||
try {
|
try {
|
||||||
this.padToFullSector();
|
this.padToFullSector();
|
||||||
|
@ -147,7 +145,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
NbtIo.write(nbt, (DataOutput) dataoutputstream);
|
NbtIo.write(nbt, (DataOutput) dataoutputstream);
|
|
@ -134,7 +134,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
||||||
|
|
||||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||||
|
@ -149,7 +149,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
|
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -153,7 +153,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ this.stackedContents.initialize(recipe); // Paper - better exact choice recipes
|
+ this.stackedContents.initialize(recipe); // Paper - better exact choice recipes
|
||||||
entity.getInventory().fillStackedContents(this.stackedContents);
|
entity.getInventory().fillStackedContents(this.stackedContents);
|
||||||
this.menu.fillCraftSlotsStackedContents(this.stackedContents);
|
this.menu.fillCraftSlotsStackedContents(this.stackedContents);
|
||||||
if (this.stackedContents.canCraft(recipe, (IntList)null)) {
|
if (this.stackedContents.canCraft(recipe.value(), (IntList)null)) {
|
||||||
@@ -0,0 +0,0 @@ public class ServerPlaceRecipe<C extends Container> implements PlaceRecipe<Integ
|
@@ -0,0 +0,0 @@ public class ServerPlaceRecipe<C extends Container> implements PlaceRecipe<Integ
|
||||||
int l = k;
|
int l = k;
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/player/StackedContents.jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/StackedContents.java
|
--- a/src/main/java/net/minecraft/world/entity/player/StackedContents.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/StackedContents.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/StackedContents.java
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.world.item.crafting.Recipe;
|
@@ -0,0 +0,0 @@ import net.minecraft.world.item.crafting.RecipeHolder;
|
||||||
public class StackedContents {
|
public class StackedContents {
|
||||||
private static final int EMPTY = 0;
|
private static final int EMPTY = 0;
|
||||||
public final Int2IntMap contents = new Int2IntOpenHashMap();
|
public final Int2IntMap contents = new Int2IntOpenHashMap();
|
||||||
|
@ -306,12 +306,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
-public abstract class AbstractCookingRecipe implements Recipe<Container> {
|
-public abstract class AbstractCookingRecipe implements Recipe<Container> {
|
||||||
+public abstract class AbstractCookingRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe<Container> implements Recipe<Container> { // Paper - improve exact recipe choices
|
+public abstract class AbstractCookingRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe<Container> implements Recipe<Container> { // Paper - improve exact recipe choices
|
||||||
protected final RecipeType<?> type;
|
protected final RecipeType<?> type;
|
||||||
protected final ResourceLocation id;
|
protected final CookingBookCategory category;
|
||||||
private final CookingBookCategory category;
|
protected final String group;
|
||||||
@@ -0,0 +0,0 @@ public abstract class AbstractCookingRecipe implements Recipe<Container> {
|
@@ -0,0 +0,0 @@ public abstract class AbstractCookingRecipe implements Recipe<Container> {
|
||||||
this.result = output;
|
this.result = result;
|
||||||
this.experience = experience;
|
this.experience = experience;
|
||||||
this.cookingTime = cookTime;
|
this.cookingTime = cookingTime;
|
||||||
+ this.checkExactIngredients(); // Paper - improve exact recipe choices
|
+ this.checkExactIngredients(); // Paper - improve exact recipe choices
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public interface Recipe<C extends Container> {
|
@@ -0,0 +0,0 @@ public interface Recipe<C extends Container> {
|
||||||
}
|
}
|
||||||
|
|
||||||
org.bukkit.inventory.Recipe toBukkitRecipe(); // CraftBukkit
|
org.bukkit.inventory.Recipe toBukkitRecipe(org.bukkit.NamespacedKey id); // CraftBukkit
|
||||||
+
|
+
|
||||||
+ // Paper start - improved exact choice recipes
|
+ // Paper start - improved exact choice recipes
|
||||||
+ default boolean hasExactIngredients() {
|
+ default boolean hasExactIngredients() {
|
||||||
|
@ -345,13 +345,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
final int width;
|
final int width;
|
||||||
final int height;
|
final int height;
|
||||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements CraftingRecipe {
|
@@ -0,0 +0,0 @@ public class ShapedRecipe implements CraftingRecipe {
|
||||||
this.recipeItems = input;
|
this.recipeItems = ingredients;
|
||||||
this.result = output;
|
this.result = result;
|
||||||
this.showNotification = showNotification;
|
this.showNotification = showNotification;
|
||||||
+ this.checkExactIngredients(); // Paper - improve exact recipe choices
|
+ this.checkExactIngredients(); // Paper - improve exact recipe choices
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShapedRecipe(ResourceLocation id, String group, CraftingBookCategory category, int width, int height, NonNullList<Ingredient> input, ItemStack output) {
|
public ShapedRecipe(String group, CraftingBookCategory category, int width, int height, NonNullList<Ingredient> ingredients, ItemStack result) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
|
@ -363,12 +363,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
-public class ShapelessRecipe implements CraftingRecipe {
|
-public class ShapelessRecipe implements CraftingRecipe {
|
||||||
+public class ShapelessRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe<CraftingContainer> implements CraftingRecipe { // Paper - improve exact recipe choices
|
+public class ShapelessRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe<CraftingContainer> implements CraftingRecipe { // Paper - improve exact recipe choices
|
||||||
|
|
||||||
private final ResourceLocation id;
|
|
||||||
final String group;
|
final String group;
|
||||||
|
final CraftingBookCategory category;
|
||||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements CraftingRecipe {
|
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements CraftingRecipe {
|
||||||
this.category = category;
|
this.category = category;
|
||||||
this.result = output;
|
this.result = result;
|
||||||
this.ingredients = input;
|
this.ingredients = ingredients;
|
||||||
+ this.checkExactIngredients(); // Paper - improve exact recipe choices
|
+ this.checkExactIngredients(); // Paper - improve exact recipe choices
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,15 +25,15 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
private final MessageSignatureCache messageSignatureCache;
|
private final MessageSignatureCache messageSignatureCache;
|
||||||
private final FutureChain chatMessageChain;
|
private final FutureChain chatMessageChain;
|
||||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
private boolean waitingForSwitchToConfig;
|
||||||
+ private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
|
+ private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
|
||||||
|
|
||||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
|
||||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
super(server, connection, clientData, player); // CraftBukkit
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
|
|
@ -6061,8 +6061,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
|
|
||||||
+ this.removePlayerFromDistanceMaps(player); // Paper - distance maps
|
+ this.removePlayerFromDistanceMaps(player); // Paper - distance maps
|
||||||
+ }
|
|
||||||
+
|
|
||||||
this.applyChunkTrackingView(player, ChunkTrackingView.EMPTY);
|
this.applyChunkTrackingView(player, ChunkTrackingView.EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
// Paper end
|
||||||
|
|
||||||
+ // Paper start - optimise getPlayerByUUID
|
+ // Paper start - optimise getPlayerByUUID
|
||||||
+ @Nullable
|
+ @Nullable
|
|
@ -26,5 +26,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && !io.papermc.paper.util.TickThread.isTickThread() ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE)); // Paper - rewrite chunk system
|
return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE));
|
||||||
}
|
}
|
Loading…
Reference in a new issue