mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 03:55:14 +01:00
AT & Mapping fixes (#6809)
This commit is contained in:
parent
f47aeafe00
commit
7a0886180f
@ -4,13 +4,12 @@ tiny 2 0 spigot mojang+yarn
|
||||
# is imported and not fully qualified. Easiest fix is to just change the name
|
||||
c net/minecraft/server/level/PlayerChunkMap$a net/minecraft/server/level/ChunkMap$ChunkDistanceManager
|
||||
|
||||
# CraftBukkit adds the getServer() method, clashes with a Mojang method
|
||||
c net/minecraft/world/level/World net/minecraft/world/level/Level
|
||||
m ()Lorg/bukkit/craftbukkit/CraftServer; getServer getCraftServer
|
||||
|
||||
# CraftBukkit adds the server field, clashes with a Mojang field
|
||||
c net/minecraft/server/network/PlayerConnection net/minecraft/server/network/ServerGamePacketListenerImpl
|
||||
# CB adds getPlayer()CraftPlayer, conflicts with getPlayer()ServerPlayer
|
||||
m ()Lorg/bukkit/craftbukkit/entity/CraftPlayer; getPlayer getCraftPlayer
|
||||
m (DDDFFLorg/bukkit/event/player/PlayerTeleportEvent$TeleportCause;)V a teleport
|
||||
# CB adds int, ItemStack to end of params
|
||||
m (Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V a updateBookPages
|
||||
|
||||
# CraftBukkit adds the getType() method, clashes with a Mojang method
|
||||
c net/minecraft/world/entity/EntityAreaEffectCloud net/minecraft/world/entity/AreaEffectCloud
|
||||
@ -48,10 +47,6 @@ c net/minecraft/server/level/EntityPlayer net/minecraft/server/level/ServerPlaye
|
||||
c net/minecraft/world/level/block/entity/IHopper net/minecraft/world/level/block/entity/Hopper
|
||||
m ()Lnet/minecraft/world/level/World; getWorld getLevel
|
||||
|
||||
# Teleport method in ServerGamePacketListenerImpl
|
||||
c net/minecraft/server/network/PlayerConnection net/minecraft/server/network/ServerGamePacketListenerImpl
|
||||
m (DDDFFLorg/bukkit/event/player/PlayerTeleportEvent$TeleportCause;)V a teleport
|
||||
|
||||
# Commands performCommand adds a stripSlash boolean
|
||||
c net/minecraft/commands/CommandDispatcher net/minecraft/commands/Commands
|
||||
m (Lnet/minecraft/commands/CommandListenerWrapper;Ljava/lang/String;Ljava/lang/String;Z)I a performCommand
|
||||
|
@ -79,7 +79,7 @@ public net.minecraft.world.entity.animal.Turtle isTravelling()Z
|
||||
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
|
||||
|
||||
# Call player spectator target event
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl a(Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V # todo fix this mapping
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl updateBookPages(Ljava/util/List;Ljava/util/function/UnaryOperator;Lnet/minecraft/world/item/ItemStack;ILnet/minecraft/world/item/ItemStack;)V
|
||||
|
||||
# Improve Server THread Pool
|
||||
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
|
||||
@ -219,12 +219,6 @@ public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
|
||||
# Cook speed multipler API
|
||||
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipeType
|
||||
|
||||
# Improve CraftChunk#getEntities
|
||||
public net.minecraft.world.level.entity.PersistentEntitySectionManager sectionStorage
|
||||
|
||||
# Optimize light engine
|
||||
public-f net.minecraft.world.level.chunk.DataLayer
|
||||
|
||||
# Add methods to get translation keys
|
||||
public org.bukkit.craftbukkit.inventory.CraftMetaFirework
|
||||
public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/FireworkEffect$Type;)I
|
||||
@ -250,5 +244,5 @@ public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
|
||||
# Default entity attributes
|
||||
public net.minecraft.world.entity.ai.attributes.AttributeSupplier instances
|
||||
|
||||
# Add ItemFactory#getMonsterEgg API
|
||||
# Add ItemFactory#getSpawnEgg API
|
||||
public net.minecraft.world.item.SpawnEggItem BY_ID
|
||||
|
@ -84,10 +84,10 @@ index 24d5a44cb81ec5f10bfcce002a193f4566de88fc..d8be2ad889f46491e50404916fb4ae0d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/DataLayer.java b/src/main/java/net/minecraft/world/level/chunk/DataLayer.java
|
||||
index 689a3bc80e753ecb3194ae81c0c48d2eef61f700..c561d69b4b903cd3625468b239cb1ace3e317700 100644
|
||||
index 4ddcdb3881f616f922cb539bf9d00a1ac89f051f..68a6c4db5980e733d81ef9a34cf32950f0983de6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/DataLayer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/DataLayer.java
|
||||
@@ -13,11 +13,65 @@ public class DataLayer {
|
||||
@@ -13,11 +13,65 @@ public final class DataLayer {
|
||||
private static final int NIBBLE_SIZE = 4;
|
||||
@Nullable
|
||||
protected byte[] data;
|
||||
@ -153,7 +153,7 @@ index 689a3bc80e753ecb3194ae81c0c48d2eef61f700..c561d69b4b903cd3625468b239cb1ace
|
||||
if (bytes.length != 2048) {
|
||||
throw (IllegalArgumentException) Util.pauseInIde((Throwable) (new IllegalArgumentException("DataLayer should be 2048 bytes not: " + bytes.length)));
|
||||
}
|
||||
@@ -52,7 +106,8 @@ public class DataLayer {
|
||||
@@ -52,7 +106,8 @@ public final class DataLayer {
|
||||
|
||||
private void set(int index, int value) {
|
||||
if (this.data == null) {
|
||||
@ -163,7 +163,7 @@ index 689a3bc80e753ecb3194ae81c0c48d2eef61f700..c561d69b4b903cd3625468b239cb1ace
|
||||
}
|
||||
|
||||
int k = DataLayer.getByteIndex(index);
|
||||
@@ -74,13 +129,33 @@ public class DataLayer {
|
||||
@@ -74,13 +129,33 @@ public final class DataLayer {
|
||||
public byte[] getData() {
|
||||
if (this.data == null) {
|
||||
this.data = new byte[2048];
|
||||
|
@ -4276,10 +4276,10 @@ index 8393950a0b38ec7897d7643803d5accdb1f983f3..ae2050da03ea2ed82b5b0dadbe4e9d37
|
||||
@Nullable
|
||||
BlockState setBlockState(BlockPos pos, BlockState state, boolean moved);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/DataLayer.java b/src/main/java/net/minecraft/world/level/chunk/DataLayer.java
|
||||
index c561d69b4b903cd3625468b239cb1ace3e317700..08c1be9c9735132f383b9be9fda6f8af4a502107 100644
|
||||
index 68a6c4db5980e733d81ef9a34cf32950f0983de6..0ed00b98e2e183aa6a8a2dfeaabea6b3c8ab97a9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/DataLayer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/DataLayer.java
|
||||
@@ -12,7 +12,7 @@ public class DataLayer {
|
||||
@@ -12,7 +12,7 @@ public final class DataLayer {
|
||||
public static final int SIZE = 2048;
|
||||
private static final int NIBBLE_SIZE = 4;
|
||||
@Nullable
|
||||
@ -4288,7 +4288,7 @@ index c561d69b4b903cd3625468b239cb1ace3e317700..08c1be9c9735132f383b9be9fda6f8af
|
||||
// Paper start
|
||||
public static byte[] EMPTY_NIBBLE = new byte[2048];
|
||||
private static final int nibbleBucketSizeMultiplier = Integer.getInteger("Paper.nibbleBucketSize", 3072);
|
||||
@@ -55,6 +55,7 @@ public class DataLayer {
|
||||
@@ -55,6 +55,7 @@ public final class DataLayer {
|
||||
boolean poolSafe = false;
|
||||
public java.lang.Runnable cleaner;
|
||||
private void registerCleaner() {
|
||||
@ -4296,7 +4296,7 @@ index c561d69b4b903cd3625468b239cb1ace3e317700..08c1be9c9735132f383b9be9fda6f8af
|
||||
if (!poolSafe) {
|
||||
cleaner = net.minecraft.server.MCUtil.registerCleaner(this, this.data, DataLayer::releaseBytes);
|
||||
} else {
|
||||
@@ -69,7 +70,7 @@ public class DataLayer {
|
||||
@@ -69,7 +70,7 @@ public final class DataLayer {
|
||||
}
|
||||
public DataLayer(byte[] bytes, boolean isSafe) {
|
||||
this.data = bytes;
|
||||
@ -4305,7 +4305,7 @@ index c561d69b4b903cd3625468b239cb1ace3e317700..08c1be9c9735132f383b9be9fda6f8af
|
||||
registerCleaner();
|
||||
// Paper end
|
||||
if (bytes.length != 2048) {
|
||||
@@ -155,7 +156,7 @@ public class DataLayer {
|
||||
@@ -155,7 +156,7 @@ public final class DataLayer {
|
||||
}
|
||||
// Paper end
|
||||
public DataLayer copy() {
|
||||
|
Loading…
Reference in New Issue
Block a user