AT bullshit

This commit is contained in:
MiniDigger 2021-06-16 00:24:12 +02:00
parent 90546c7c50
commit 3fb6b93f96
65 changed files with 340 additions and 787 deletions

View File

@ -6,6 +6,152 @@
# Leave out the member and it will apply to the class itself # Leave out the member and it will apply to the class itself
# More info, see here https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers # More info, see here https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers
# Paper config files
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;)D
public org.spigotmc.SpigotWorldConfig getDouble(Ljava/lang/String;D)D
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;)I
public org.spigotmc.SpigotWorldConfig getInt(Ljava/lang/String;I)I
public org.spigotmc.SpigotWorldConfig getList(Ljava/lang/String;Ljava/lang/Object;)Ljava/util/List;
public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
# MC Utils
public net.minecraft.core.Vec3i setX(I)Lnet/minecraft/core/Vec3i;
public net.minecraft.core.Vec3i setY(I)Lnet/minecraft/core/Vec3i;
public net.minecraft.core.Vec3i setZ(I)Lnet/minecraft/core/Vec3i;
public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerLevel chunkSource
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
# Add PlayerInitialSpawnEvent
public net.minecraft.world.entity.Entity setRot(FF)V
# Add PlayerUseUnknownEntityEvent
public net.minecraft.network.protocol.game.ServerboundInteractPacket$ActionType
# Configurable RCON IP address
public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String;
# LootTable API
public org.bukkit.craftbukkit.block.CraftBlockEntityState getTileEntity()Lnet/minecraft/world/level/block/entity/BlockEntity;
public org.bukkit.craftbukkit.block.CraftLootable setLootTable(Lorg/bukkit/loot/LootTable;J)V
public org.bukkit.craftbukkit.entity.CraftMinecartContainer setLootTable(Lorg/bukkit/loot/LootTable;J)V
# Firework API
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
# Add option to make parrots stay
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
# LivingEntity setkiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
# SkeletonHore Addittions
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
# Fix client rendering skulls
public net.minecraft.world.item.ItemStack tag
# Async chunk io
public net.minecraft.server.level.ChunkMap structureManager
public net.minecraft.server.level.ChunkMap getUpdatingChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public-f net.minecraft.world.level.chunk.storage.RegionFileStorage
public net.minecraft.world.level.chunk.storage.RegionFileStorage getFile(Lnet/minecraft/world/level/ChunkPos;Z)Lnet/minecraft/world/level/chunk/storage/RegionFile;
public net.minecraft.world.level.chunk.storage.SectionStorage dirty
# Improve death events
public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent;
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
public net.minecraft.world.entity.ambient.Bat getSoundVolume()F
public net.minecraft.world.entity.monster.Ghast getSoundVolume()F
public net.minecraft.world.entity.monster.Phantom getSoundVolume()F
public net.minecraft.world.entity.animal.Squid getSoundVolume()F
public net.minecraft.world.entity.animal.Wolf getSoundVolume()F
# Add sun related api
public net.minecraft.world.entity.Mob isSunBurnTick()Z
# Turtle API
public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z
public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V
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
# Improve Server THread Pool
public net.minecraft.Util onThreadException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
# Add more zombie API
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
# Add PlayerConnectionCloseEvent
public net.minecraft.server.network.ServerLoginPacketListenerImpl$State
# Entity Activation Range 2.0
public net.minecraft.world.entity.Entity isInsidePortal
public net.minecraft.world.entity.Mob leashHolder
# No-Tick view distance
public net.minecraft.server.level.ChunkHolder broadcast(Lnet/minecraft/network/protocol/Packet;Z)V
public net.minecraft.server.level.ChunkMap setViewDistance(I)V
public net.minecraft.server.level.ChunkMap readChunk(Lnet/minecraft/world/level/ChunkPos;)Lnet/minecraft/nbt/CompoundTag;
public net.minecraft.server.level.ChunkMap playerLoadedChunk(Lnet/minecraft/server/level/ServerPlayer;[Lnet/minecraft/network/protocol/Packet;Lnet/minecraft/world/level/chunk/LevelChunk;)V
public net.minecraft.server.level.ChunkMap mainThreadMailbox # todo one of these doesn't belong here
# Optimise TickListServer
public net.minecraft.world.level.ServerTickList saveTickList(Ljava/util/function/Function;Ljava/lang/Iterable;J)Lnet/minecraft/nbt/ListTag;
# Don't move existing players to world spawn
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
# Implement Player Client Options API
public net.minecraft.world.entity.player.Player DATA_PLAYER_MODE_CUSTOMISATION
# Fix Longstanding Broken behavior
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
# Load Chunks for Login Async
public net.minecraft.server.level.ServerChunkCache runDistanceManagerUpdates()Z
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor # todo doesn't belong here but oh well
# Implement MobGoalApi
public net.minecraft.world.entity.ai.goal.GoalSelector availableGoals
# Add villager reputation API
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips
public net.minecraft.world.entity.ai.gossip.GossipContainer$EntityGossips <init>()V
# Add entity liquid API
public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
# Allow delegation to vanilla chunk gen
public org.bukkit.craftbukkit.generator.CustomChunkGenerator delegate
# Optimize redstone algorithm
public net.minecraft.world.level.block.RedStoneWireBlock shouldSignal
# Add more Evoker API
public net.minecraft.world.entity.monster.Evoker setWololoTarget(Lnet/minecraft/world/entity/animal/Sheep;)V
public net.minecraft.world.entity.monster.Evoker getWololoTarget()Lnet/minecraft/world/entity/animal/Sheep;
# More lightning API
public net.minecraft.world.entity.LightningBolt life
public net.minecraft.world.entity.LightningBolt flashes
# Configurable door breaking difficulty
public net.minecraft.world.entity.monster.Vindicator DOOR_BREAKING_PREDICATE
public net.minecraft.world.entity.monster.Zombie DOOR_BREAKING_PREDICATE
# Optimize sending packets to nearby locations (sounds/effects)
public net.minecraft.server.level.ServerLevel players
# Item Rarity API # Item Rarity API
public net.minecraft.world.item.Item rarity public net.minecraft.world.item.Item rarity
@ -29,3 +175,4 @@ public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V
# Chunk debug command # Chunk debug command
public net.minecraft.server.level.ChunkMap entitiesInLevel public net.minecraft.server.level.ChunkMap entitiesInLevel
public net.minecraft.server.level.ServerLevel players

View File

@ -620,7 +620,7 @@ index 7bad75bd86fcb484e253fca8077d017d3161158b..fe83f13d71f84591f5506e1c6b9dfbf9
this.setPvpAllowed(dedicatedserverproperties.pvp); this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight); this.setFlightAllowed(dedicatedserverproperties.allowFlight);
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 108432435aac34fadfd899941e6d2b951f509971..623b938177cc7287bccc55f34e644bda984a7b65 100644 index 5bb6df24576948b1f5b66d14769d9137bad5a7e2..b4bc656a1c5fffd8c88bc61df3ac7f84dac52d29 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -23,6 +23,7 @@ import net.minecraft.core.BlockPos; @@ -23,6 +23,7 @@ import net.minecraft.core.BlockPos;
@ -770,50 +770,3 @@ index 24e08ca0fca3e87f8a6b7670b266f3c2900b798c..3c4281ad770598ecf3b9fae0d6ed6e91
} }
}; };
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index c7bfa5fe5f7945883bd41461247e0efb04f5e9e8..9a31d8b709b28bba658603106c623560c5362947 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -39,36 +39,36 @@ public class SpigotWorldConfig
this.config.set( "world-settings.default." + path, val );
}
- private boolean getBoolean(String path, boolean def)
+ public boolean getBoolean(String path, boolean def) // Paper - private -> public
{
this.config.addDefault( "world-settings.default." + path, def );
return this.config.getBoolean( "world-settings." + this.worldName + "." + path, this.config.getBoolean( "world-settings.default." + path ) );
}
- private double getDouble(String path, double def)
+ public double getDouble(String path, double def) // Paper - private -> public
{
this.config.addDefault( "world-settings.default." + path, def );
return this.config.getDouble( "world-settings." + this.worldName + "." + path, this.config.getDouble( "world-settings.default." + path ) );
}
- private int getInt(String path)
+ public int getInt(String path) // Paper - private -> public
{
return this.config.getInt( "world-settings." + this.worldName + "." + path );
}
- private int getInt(String path, int def)
+ public int getInt(String path, int def) // Paper - private -> public
{
this.config.addDefault( "world-settings.default." + path, def );
return this.config.getInt( "world-settings." + this.worldName + "." + path, this.config.getInt( "world-settings.default." + path ) );
}
- private <T> List getList(String path, T def)
+ public <T> List getList(String path, T def) // Paper - private -> public
{
this.config.addDefault( "world-settings.default." + path, def );
return (List<T>) this.config.getList( "world-settings." + this.worldName + "." + path, this.config.getList( "world-settings.default." + path ) );
}
- private String getString(String path, String def)
+ public String getString(String path, String def) // Paper - private -> public
{
this.config.addDefault( "world-settings.default." + path, def );
return this.config.getString( "world-settings." + this.worldName + "." + path, this.config.getString( "world-settings.default." + path ) );

View File

@ -2258,7 +2258,7 @@ index 0000000000000000000000000000000000000000..9df0006c1a283f77c4d01d9fce9062fc
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index 23c0914685e51de9dcdbb305c203efd4f2a73128..6f29d1fc437764a75d592ccb0c0ddc0593a89967 100644 index 771e4b72589d7117a154ab6917bd4a56d55f19db..65e0ca442980f273d2fe5f131e174cd92f80da20 100644
--- a/src/main/java/net/minecraft/Util.java --- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java
@@ -94,7 +94,7 @@ public class Util { @@ -94,7 +94,7 @@ public class Util {
@ -2314,39 +2314,6 @@ index a153ca538d237fab567550b0bfcdf5b2985c56f8..022cccbc52a7dda2f6bf0999905db82d
@Override @Override
public BlockPos immutable() { public BlockPos immutable() {
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
index f484cf19e1ed6f4e14a6c324c59511e822335ba7..f4b5792e080d5181184eb661d005ce6cab649bf3 100644
--- a/src/main/java/net/minecraft/core/Vec3i.java
+++ b/src/main/java/net/minecraft/core/Vec3i.java
@@ -75,17 +75,17 @@ public class Vec3i implements Comparable<Vec3i> {
return this.z;
}
- protected Vec3i setX(int x) {
+ public Vec3i setX(int x) { // Paper - protected -> public
this.x = x;
return this;
}
- protected Vec3i setY(int y) {
+ public Vec3i setY(int y) { // Paper - protected -> public
this.y = y;
return this;
}
- protected Vec3i setZ(int z) {
+ public Vec3i setZ(int z) { // Paper - protected -> public
this.z = z;
return this;
}
@@ -193,6 +193,7 @@ public class Vec3i implements Comparable<Vec3i> {
return this.distSqr(pos.x(), pos.y(), pos.z(), true) < distance * distance;
}
+ @Deprecated public final double distanceSquared(Vec3i baseblockposition) { return distSqr(baseblockposition); } // Paper - OBFHELPER
public double distSqr(Vec3i vec) {
return this.distSqr((double)vec.getX(), (double)vec.getY(), (double)vec.getZ(), true);
}
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
index 3d374000cd61d4a29dae21035c5ee9a93a1ff0f9..750df4ab2fbfdcf759f4d3451340e66b6764391d 100644 index 3d374000cd61d4a29dae21035c5ee9a93a1ff0f9..750df4ab2fbfdcf759f4d3451340e66b6764391d 100644
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java --- a/src/main/java/net/minecraft/nbt/CompoundTag.java
@ -2918,7 +2885,7 @@ index f0aea7c801b3ef3b1a213ecd473ce9e718f1be46..224128235f712c3dc8588b3a5cdd3e77
MinecraftServer.LOGGER.info("Saving usercache.json"); MinecraftServer.LOGGER.info("Saving usercache.json");
this.getProfileCache().save(); this.getProfileCache().save();
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index cc9b1f922d7f6953468de56a2c004233228769ee..ce4296ab7e6f1ccc735d619eacabdf2ef2f4e361 100644 index ed9e1b4a9179a002b965a2d979b7ad0656dd1494..df32a8b1df60064c49702dca26d7310b7d27e94b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -52,9 +52,9 @@ public class ChunkHolder { @@ -52,9 +52,9 @@ public class ChunkHolder {
@ -3081,7 +3048,7 @@ index cc9b1f922d7f6953468de56a2c004233228769ee..ce4296ab7e6f1ccc735d619eacabdf2e
} }
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 474d71813740f8ad61339a67bfa5bceae4331a77..cbaafa2024a36fbdaf9f753c58ca974831af9fdf 100644 index c0a769a626165e5d5d1eef6f919966976afdae48..356a79900f5ca24b2d9f9af5a1223a4309f17df9 100644
--- 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
@@ -55,6 +55,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket; @@ -55,6 +55,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
@ -3160,7 +3127,7 @@ index 474d71813740f8ad61339a67bfa5bceae4331a77..cbaafa2024a36fbdaf9f753c58ca9748
@Override @Override
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 623b938177cc7287bccc55f34e644bda984a7b65..2cc633e6d03ae37a6d0785e0a3dcc4fe9350b10a 100644 index b4bc656a1c5fffd8c88bc61df3ac7f84dac52d29..2427b2cfb52c0e6aee1397c9951c1aa1c0f14503 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -45,6 +45,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana @@ -45,6 +45,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana
@ -3171,15 +3138,6 @@ index 623b938177cc7287bccc55f34e644bda984a7b65..2cc633e6d03ae37a6d0785e0a3dcc4fe
public class ServerChunkCache extends ChunkSource { public class ServerChunkCache extends ChunkSource {
@@ -52,7 +53,7 @@ public class ServerChunkCache extends ChunkSource {
private final DistanceManager distanceManager;
public final ChunkGenerator generator;
final ServerLevel level;
- final Thread mainThread;
+ public final Thread mainThread; // Paper - package-private -> public
final ThreadedLevelLightEngine lightEngine;
private final ServerChunkCache.MainThreadExecutor mainThreadProcessor;
public final ChunkMap chunkMap;
@@ -67,6 +68,158 @@ public class ServerChunkCache extends ChunkSource { @@ -67,6 +68,158 @@ public class ServerChunkCache extends ChunkSource {
@Nullable @Nullable
@VisibleForDebug @VisibleForDebug
@ -3404,7 +3362,7 @@ index 623b938177cc7287bccc55f34e644bda984a7b65..2cc633e6d03ae37a6d0785e0a3dcc4fe
if (optional.isPresent()) { if (optional.isPresent()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ea44904fdf709ae097f5ede128193a78c1f49d35..b6eb04733611b63916453f36abf2ae615786845c 100644 index d13a2497396cf83e125c72041c4cf4dee164b6a4..0127e3ab8d4e65c802c9b44d081cc0d51946e473 100644
--- 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
@@ -9,6 +9,7 @@ import it.unimi.dsi.fastutil.longs.LongSet; @@ -9,6 +9,7 @@ import it.unimi.dsi.fastutil.longs.LongSet;
@ -3415,17 +3373,8 @@ index ea44904fdf709ae097f5ede128193a78c1f49d35..b6eb04733611b63916453f36abf2ae61
import it.unimi.dsi.fastutil.objects.ObjectIterator; import it.unimi.dsi.fastutil.objects.ObjectIterator;
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet; import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
@@ -172,7 +173,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
private static final Logger LOGGER = LogManager.getLogger();
private static final int EMPTY_TIME_NO_TICK = 300;
final List<ServerPlayer> players;
- private final ServerChunkCache chunkSource;
+ public final ServerChunkCache chunkSource; // Paper - public
private final MinecraftServer server;
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
final EntityTickList entityTickList;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d25086e37b7ea34fd586be7818c6b585760ce18e..99292d239dfdd2c0aaeece2b526db011b17aa121 100644 index 2889d43857f418eb26600e78940dedc2b7c2b0f4..2b0d989119c9f69a68a6c1c69fb09dbbedd16716 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -228,6 +228,8 @@ public class ServerPlayer extends Player { @@ -228,6 +228,8 @@ public class ServerPlayer extends Player {
@ -3519,7 +3468,7 @@ index 65bd706ca96f5c0ec4573da9fb144fb51d2de919..3a2e8bdc215a6af604bfaad01b670a36
return this.data; return this.data;
} }
diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
index 08fb847add9f5a2c1ca6dfef31de7e711c8b9840..5b38966093fe60b298844961d015d5a9f03412a2 100644 index a4c5edee297af6d68d518b77f706732b5ccbe4de..7bf4bf5cb2c1b54a7e2733091f48f3a824336d36 100644
--- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java --- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java +++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java
@@ -78,6 +78,13 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler @@ -78,6 +78,13 @@ public abstract class BlockableEventLoop<R extends Runnable> implements Profiler
@ -3560,7 +3509,7 @@ index 7f3d83d3d071f6b441ad119b1c93be035e911e70..89e7d02b88404ac5dce06595432ae95c
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d067e2477231e145af88aa21d9173512c3a053cf..3b2b57f5049d26a14e45eb4ec88a5b498005d372 100644 index 1bb24476ad61c18215cde369913376d21c6e8ab6..6c4d0d584e9042e2cafac1dd29710469ac3b133e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity { @@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity {
@ -3572,7 +3521,7 @@ index d067e2477231e145af88aa21d9173512c3a053cf..3b2b57f5049d26a14e45eb4ec88a5b49
@Override @Override
public float getBukkitYaw() { public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index bbc126bdea2e8b0b6781f257ebc34791e7405094..e4f3dbff2605243039f9f59f025c931b3fb309c5 100644 index 7ed0498e86fa5cea8edb002146126dcedd5b23f6..e91932d25e7b5d4a95e485bfa8b70632e0641b0a 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -230,6 +230,7 @@ public abstract class Mob extends LivingEntity { @@ -230,6 +230,7 @@ public abstract class Mob extends LivingEntity {
@ -3622,7 +3571,7 @@ index 6d0b9f8834e86a465cae3fa2af830b797c65a4fb..a193358bf274bf13bfa090dd7f796d8d
public final Player player; public final Player player;
private int timesChanged; private int timesChanged;
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index e5eab8bd104b84a9583cf28b1a89f3fe357a4004..d5b8931243e2f9cac9b0f92ab8df043a831bbe70 100644 index 48902f822ccb6e231201f888a2a92923a946e8cf..680c4eb99b650c8ec7fe50022ba36070feb0a0e5 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -725,6 +725,24 @@ public final class ItemStack { @@ -725,6 +725,24 @@ public final class ItemStack {
@ -3641,7 +3590,7 @@ index e5eab8bd104b84a9583cf28b1a89f3fe357a4004..d5b8931243e2f9cac9b0f92ab8df043a
+ } + }
+ private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack; + private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack;
+ public org.bukkit.inventory.ItemStack getBukkitStack() { + public org.bukkit.inventory.ItemStack getBukkitStack() {
+ if (bukkitStack == null || bukkitStack.getHandle() != this) { + if (bukkitStack == null || bukkitStack.handle != this) {
+ bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this); + bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this);
+ } + }
+ return bukkitStack; + return bukkitStack;
@ -4349,18 +4298,6 @@ index 5af90e0f7222356cb0e905a9b6e0c4eac5617a41..5d4d953f197afc402248ab73daeb6ef5
public static VoxelShape block() { public static VoxelShape block() {
return BLOCK; return BLOCK;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 5a247fcd7398d83f37df4aa3103b55611dc87e66..1818be091ce06c1f347396a8a5b9e05f9ceca2c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {
}
net.minecraft.world.item.ItemStack handle;
+ public net.minecraft.world.item.ItemStack getHandle() { return handle; } // Paper
/**
* Mirror
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 836ee63b7ea73165257acbcdf5c7336a2a2e36f3..2b4a922b84eeb2b1b64e43a2ca8bf16dcf58218e 100644 index 836ee63b7ea73165257acbcdf5c7336a2a2e36f3..2b4a922b84eeb2b1b64e43a2ca8bf16dcf58218e 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@ -4603,19 +4540,6 @@ index 9d14625528c14c9a4b48060dedabad2ac1adf541..a430506c31d9ce7a5c90d726a68f0974
@Override @Override
public WorldBorder getWorldBorder() { public WorldBorder getWorldBorder() {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
diff --git a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
index d40c0d8be1b0153d62021b8bcb6e8b37fd0acb4e..b0897aba0ac2aa62c2f3d1268f38fef1440b230c 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
@@ -17,7 +17,7 @@ import java.util.RandomAccess;
public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, Serializable {
private static final long serialVersionUID = 8683452581112892191L;
- private transient Object[] data;
+ private transient Object[] data; public final Object[] getRawDataArray() { return this.data; } // Paper - expose for raw get
private int size;
private int initialCapacity;
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 87f4d952843654927779a16047da9d601d994fc2..e38b5957b015be3c835ca28a9fe6ee75d7954393 100644 index 87f4d952843654927779a16047da9d601d994fc2..e38b5957b015be3c835ca28a9fe6ee75d7954393 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java --- a/src/main/java/org/spigotmc/SpigotConfig.java

View File

@ -33,16 +33,3 @@ index 446dd8c15d4ccdced316deeaba379cb6937496ca..8e9d0ca8aa2b1403fc65ed8d79252504
// Spigot end // Spigot end
// CraftBukkit - Moved message to after join // CraftBukkit - Moved message to after join
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 7e7291cc41735a6c251738492a4cdd1c7798066f..cb65a20d34196866eead7844b93c65bfb853f74c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -460,7 +460,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
return d1 * d1 + d2 * d2 + d3 * d3 < radius * radius;
}
- protected void setRot(float yaw, float pitch) {
+ public void setRot(float yaw, float pitch) { // Paper - protected -> public
// CraftBukkit start - yaw was sometimes set to NaN, so we need to set it back to 0
if (Float.isNaN(yaw)) {
yaw = 0;

View File

@ -19,7 +19,7 @@ index 659305865e9c6d9996fcf2596d086050508059cd..1a35ef48c487c92f55fcbbfc19a708ed
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 7aa1f693c5f44a265ccb442c2c9e995cc3e7418d..1ed8232493c94bc0cf28ef8d4b647cb84bd3fe32 100644 index ef1d64ebdc3150596cbc5efc36d6acc52dddafee..e506fa1153cabfb93c7bece73e6fe0fafbb958c9 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
@@ -11,6 +11,7 @@ import java.io.IOException; @@ -11,6 +11,7 @@ import java.io.IOException;
@ -30,7 +30,7 @@ index 7aa1f693c5f44a265ccb442c2c9e995cc3e7418d..1ed8232493c94bc0cf28ef8d4b647cb8
import net.minecraft.util.ExceptionCollector; import net.minecraft.util.ExceptionCollector;
import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ChunkPos;
@@ -101,6 +102,7 @@ public final class RegionFileStorage implements AutoCloseable { @@ -101,6 +102,7 @@ public class RegionFileStorage implements AutoCloseable {
protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException { protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException {
RegionFile regionfile = this.getFile(pos, false); // CraftBukkit RegionFile regionfile = this.getFile(pos, false); // CraftBukkit
@ -38,7 +38,7 @@ index 7aa1f693c5f44a265ccb442c2c9e995cc3e7418d..1ed8232493c94bc0cf28ef8d4b647cb8
if (nbt == null) { if (nbt == null) {
regionfile.clear(pos); regionfile.clear(pos);
@@ -126,6 +128,18 @@ public final class RegionFileStorage implements AutoCloseable { @@ -126,6 +128,18 @@ public class RegionFileStorage implements AutoCloseable {
} }
} }

View File

@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's. ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index ac05b201167d8e17f39d3df732adf676dc24b409..d3267cdef523b62f9985e49b768e6ad22fbe874d 100644 index 1b3cf8e6310c83f9303705339bfa131c90b0ac3d..bbaf615a150bc9c1ad61d509209350eec922a9f2 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -13,6 +13,8 @@ import java.text.DecimalFormatSymbols; @@ -13,6 +13,8 @@ import java.text.DecimalFormatSymbols;
@ -79,7 +79,7 @@ index ac05b201167d8e17f39d3df732adf676dc24b409..d3267cdef523b62f9985e49b768e6ad2
public boolean isEnchanted() { public boolean isEnchanted() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 1818be091ce06c1f347396a8a5b9e05f9ceca2c9..51c1f62af5c25fe620f1d8a9cb03473e849db68d 100644 index d11f50cab14cf1483c88914912ae018ce016ac50..799af645a0a39877dc36417110a73fe33d743ba4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -6,7 +6,6 @@ import java.util.Map; @@ -6,7 +6,6 @@ import java.util.Map;
@ -90,7 +90,7 @@ index 1818be091ce06c1f347396a8a5b9e05f9ceca2c9..51c1f62af5c25fe620f1d8a9cb03473e
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.configuration.serialization.DelegateDeserialization; import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -178,28 +177,11 @@ public final class CraftItemStack extends ItemStack { @@ -177,28 +176,11 @@ public final class CraftItemStack extends ItemStack {
public void addUnsafeEnchantment(Enchantment ench, int level) { public void addUnsafeEnchantment(Enchantment ench, int level) {
Validate.notNull(ench, "Cannot add null enchantment"); Validate.notNull(ench, "Cannot add null enchantment");
@ -124,7 +124,7 @@ index 1818be091ce06c1f347396a8a5b9e05f9ceca2c9..51c1f62af5c25fe620f1d8a9cb03473e
} }
static boolean makeTag(net.minecraft.world.item.ItemStack item) { static boolean makeTag(net.minecraft.world.item.ItemStack item) {
@@ -216,66 +198,33 @@ public final class CraftItemStack extends ItemStack { @@ -215,66 +197,33 @@ public final class CraftItemStack extends ItemStack {
@Override @Override
public boolean containsEnchantment(Enchantment ench) { public boolean containsEnchantment(Enchantment ench) {

View File

@ -25,10 +25,10 @@ index 716f285e67019b8a62922d09c15883c99f9421aa..439dcc6effdc91830d2b7ede90639829
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 1ed8232493c94bc0cf28ef8d4b647cb84bd3fe32..3c82f98a34a5911fdb9e3ba66c54d25f6944fd07 100644 index e506fa1153cabfb93c7bece73e6fe0fafbb958c9..f973792c8ee4523eb4efdf31d0a97cb3358e1b3b 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
@@ -35,7 +35,7 @@ public final class RegionFileStorage implements AutoCloseable { @@ -35,7 +35,7 @@ public class RegionFileStorage implements AutoCloseable {
if (regionfile != null) { if (regionfile != null) {
return regionfile; return regionfile;
} else { } else {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerUseUnknownEntityEvent
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
index 1b316ecf2d8725b9c91a4869e6c2362c1443160d..70d309ddb215c62805b6ee13be50d8f93cdc38ba 100644 index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510e20db25a 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundInteractPacket.java
@@ -10,8 +10,8 @@ import net.minecraft.world.entity.Entity; @@ -10,8 +10,8 @@ import net.minecraft.world.entity.Entity;
@ -19,17 +19,8 @@ index 1b316ecf2d8725b9c91a4869e6c2362c1443160d..70d309ddb215c62805b6ee13be50d8f9
private final boolean usingSecondaryAction; private final boolean usingSecondaryAction;
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() { static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
@Override @Override
@@ -88,7 +88,7 @@ public class ServerboundInteractPacket implements Packet<ServerGamePacketListene
void write(FriendlyByteBuf buf);
}
- static enum ActionType {
+ public static enum ActionType { // Paper - package-private -> public
INTERACT(ServerboundInteractPacket.InteractionAction::new),
ATTACK((friendlyByteBuf) -> {
return ServerboundInteractPacket.ATTACK_ACTION;
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/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dfab012166354af6233ee1fdab1b0fba6fcbe940..fa6d414387950d522243370714d5425f09e351e8 100644 index cbd7e9b6b3d0cd5cb87ed8b2657daee9368424a0..8e751e9821dc76f33e9e844990c701f69c817c4b 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
@@ -2203,8 +2203,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2203,8 +2203,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser

View File

@ -29,19 +29,6 @@ index 3dc2187035fff8c0c338b35c07ca2164ed753b04..e3409d5f4ddcaa4edecfa4b3c638a126
} }
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
index f914b12473a607622eb9c816c980ef1adbc9e863..2f30f6332f7c81a28f2930a8b7a7379fd31f8c02 100644
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
@@ -124,7 +124,7 @@ public abstract class Settings<T extends Settings<T>> {
}
@Nullable
- private String getStringRaw(String key) {
+ public String getStringRaw(String key) { // Paper - private -> public
return (String) this.getOverride(key, this.properties.getProperty(key)); // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java diff --git a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java b/src/main/java/net/minecraft/server/rcon/thread/RconThread.java
index 5e642ab9947f054c1741e13170a36f8fe300cdbe..a93e0eb67a78abb2eabd549cd5240095a24e5545 100644 index 5e642ab9947f054c1741e13170a36f8fe300cdbe..a93e0eb67a78abb2eabd549cd5240095a24e5545 100644
--- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java --- a/src/main/java/net/minecraft/server/rcon/thread/RconThread.java

View File

@ -515,7 +515,7 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index eceaeed527f34860e1c55b9f96863f140055faa7..416dd12638540312aa48b530e24ba3ad7ab6079c 100644 index a5fa826f895fc8660521496ad1e9de5c55ffbdaa..c0ea34cacbc1b042f79b441f57a11fa646a5c872 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -168,6 +168,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -168,6 +168,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -641,19 +641,6 @@ index b79d9d26a8e60f9c0ecd69e9c2f9cfd087e21d23..f23fff80d07ac7d06715efe67cb49ebb
LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)).withOptionalRandomSeed(this.lootTableSeed); LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)).withOptionalRandomSeed(this.lootTableSeed);
if (player != null) { if (player != null) {
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 90f44b49d2728c8a1110270fa8c52104355e45c4..d57b32090cebfc952ac0a71b8aada85f49275241 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -61,7 +61,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
}
// gets the wrapped TileEntity
- protected T getTileEntity() {
+ public T getTileEntity() { // Paper - protected -> public
return this.tileEntity;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index 5cb17e8289db0ab38fd36318e2957701d6dfb341..f48b830a9ae8160388cb0d0220a44b1ec9f0d214 100644 index 5cb17e8289db0ab38fd36318e2957701d6dfb341..f48b830a9ae8160388cb0d0220a44b1ec9f0d214 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@ -670,7 +657,7 @@ index 5cb17e8289db0ab38fd36318e2957701d6dfb341..f48b830a9ae8160388cb0d0220a44b1e
public CraftChest(final Block block) { public CraftChest(final Block block) {
super(block, ChestBlockEntity.class); super(block, ChestBlockEntity.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
index 28b9a42d43522cde9d0be4d98a8a5f8fdf6c3abd..055ffe404c37e1daab61b821b590f8c7038076eb 100644 index a688845f6b8fc3de2864dd896cd132b5c7b3be59..322a8292876b3b4eb73cff2ef768f4b9325b2bdb 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
@@ -10,7 +10,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey; @@ -10,7 +10,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@ -682,15 +669,6 @@ index 28b9a42d43522cde9d0be4d98a8a5f8fdf6c3abd..055ffe404c37e1daab61b821b590f8c7
public CraftLootable(Block block, Class<T> tileEntityClass) { public CraftLootable(Block block, Class<T> tileEntityClass) {
super(block, tileEntityClass); super(block, tileEntityClass);
@@ -54,7 +54,7 @@ public abstract class CraftLootable<T extends RandomizableContainerBlockEntity>
this.setLootTable(this.getLootTable(), seed);
}
- private void setLootTable(LootTable table, long seed) {
+ public void setLootTable(LootTable table, long seed) { // Paper - public
ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
getSnapshot().setLootTable(key, seed);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
index eb21b8457774d5ac765fa9008157cb29d9b72509..abf58bef2042a9efba5a78fd7f97339deceaa780 100644 index eb21b8457774d5ac765fa9008157cb29d9b72509..abf58bef2042a9efba5a78fd7f97339deceaa780 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
@ -704,19 +682,6 @@ index eb21b8457774d5ac765fa9008157cb29d9b72509..abf58bef2042a9efba5a78fd7f97339d
private final CraftInventory inventory; private final CraftInventory inventory;
public CraftMinecartChest(CraftServer server, MinecartChest entity) { public CraftMinecartChest(CraftServer server, MinecartChest entity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
index 097d8bd479a0800114964725da8bfd19415a2956..4893d8e67025d919a455b44bb41d914a39ab5aa9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
@@ -47,7 +47,7 @@ public abstract class CraftMinecartContainer extends CraftMinecart implements Lo
return this.getHandle().lootTableSeed;
}
- private void setLootTable(LootTable table, long seed) {
+ @Override public void setLootTable(LootTable table, long seed) { // Paper
ResourceLocation newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
this.getHandle().setLootTable(newKey, seed);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
index 34b8f103625f087bb725bed595dd9c30f4a6f70c..ee9648739fb39c5842063d7442df6eb5c9336d7f 100644 index 34b8f103625f087bb725bed595dd9c30f4a6f70c..ee9648739fb39c5842063d7442df6eb5c9336d7f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java

View File

@ -5,15 +5,13 @@ Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index 15ba8033dc7b5d533f29ab061b1db6dabfba560f..4cd6e5d62dcd319329d617e075aa3a61cdf01e0d 100644 index 28e32cdac5b8c51dfcef14b585860f3181e814f3..5bfebe072ec722e7d6f3161d5d6cc709a9b80032 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -38,7 +38,8 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { @@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
private int life;
public int lifetime; public int lifetime;
@Nullable @Nullable
- private LivingEntity attachedToEntity; public LivingEntity attachedToEntity;
+ public LivingEntity attachedToEntity; // Paper - private -> public
+ public java.util.UUID spawningEntity; // Paper + public java.util.UUID spawningEntity; // Paper
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) { public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {

View File

@ -26,7 +26,7 @@ index c611b5a63498f5ad1f50a75ccd5d7299e27df7e3..9d1cddc6038f0fd0286e4a32013ae98f
+ } + }
} }
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/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 55cd070c2dbf4cf4d8d0fc62067e9bde69ac7e84..03dcaffb57436875baf1b1f85133f422f5b7bbe0 100644 index a6891c43b674919eecaac5e826b4d979478b300c..bb58cf52e69258a8c59b595f5fa28ced562965f3 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
@@ -2057,6 +2057,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2057,6 +2057,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@ -44,7 +44,7 @@ index 55cd070c2dbf4cf4d8d0fc62067e9bde69ac7e84..03dcaffb57436875baf1b1f85133f422
case RELEASE_SHIFT_KEY: case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false); this.player.setShiftKeyDown(false);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index e8768625e55f849cd31784cb46e67293bcd93abf..73277b04a45444edce02cce3e033741ebaf2ad0c 100644 index 33a61c0ab7e6ed03030bdd8d8635d989b28bd169..56ce24ab7213776285d09cc0ab91f012d3e58caf 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -579,7 +579,7 @@ public abstract class Player extends LivingEntity { @@ -579,7 +579,7 @@ public abstract class Player extends LivingEntity {
@ -56,12 +56,3 @@ index e8768625e55f849cd31784cb46e67293bcd93abf..73277b04a45444edce02cce3e033741e
} }
} }
@@ -1939,7 +1939,7 @@ public abstract class Player extends LivingEntity {
}
}
- protected void removeEntitiesOnShoulder() {
+ public void removeEntitiesOnShoulder() { // Paper - protected -> public
if (this.timeEntitySatOnShoulder + 20L < this.level.getGameTime()) {
// CraftBukkit start
if (this.spawnEntityFromShoulder(this.getShoulderEntityLeft())) {

View File

@ -4,21 +4,8 @@ Date: Mon, 31 Jul 2017 01:49:48 -0500
Subject: [PATCH] LivingEntity#setKiller Subject: [PATCH] LivingEntity#setKiller
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f0357f9d7b6a39bbdf6486a9d35d890942cc5e4c..89913edf98d65f08f379d0d201f9963c23573478 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -207,7 +207,7 @@ public abstract class LivingEntity extends Entity {
public float flyingSpeed;
@Nullable
public net.minecraft.world.entity.player.Player lastHurtByPlayer;
- protected int lastHurtByPlayerTime;
+ public int lastHurtByPlayerTime; // Paper - protected -> public
protected boolean dead;
protected int noActionTime;
protected float oRun;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index ea94dc9a3b8bd3da5f8ccbeb216384723db668aa..4e9565def5a28a7391f8f541d066c2981d0bbc92 100644 index 9e98e854b6b3f8dac3990abaa1c9f60fd1ff3836..7beb84da34e58b18cd83a53eab2bcf703e8bf35e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -8,6 +8,7 @@ import java.util.Iterator; @@ -8,6 +8,7 @@ import java.util.Iterator;

View File

@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item Allows you to determine how long it takes to use a usable/consumable item
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 51c1f62af5c25fe620f1d8a9cb03473e849db68d..3fbfe4f77c4b82d96ed022498b2d9175d548e247 100644 index 799af645a0a39877dc36417110a73fe33d743ba4..982da5f98601c6b3095d78e69e02554640708c64 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -173,6 +173,13 @@ public final class CraftItemStack extends ItemStack { @@ -172,6 +172,13 @@ public final class CraftItemStack extends ItemStack {
return (this.handle == null) ? Material.AIR.getMaxStackSize() : this.handle.getItem().getMaxStackSize(); return (this.handle == null) ? Material.AIR.getMaxStackSize() : this.handle.getItem().getMaxStackSize();
} }

View File

@ -4,19 +4,6 @@ Date: Fri, 27 Jul 2018 22:36:31 -0500
Subject: [PATCH] SkeletonHorse Additions Subject: [PATCH] SkeletonHorse Additions
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
index b5446b417963850f25c715abe52403c731b6ef01..9c5c7ef3b915afe5fe54144f51e383a83c1eb752 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
@@ -23,7 +23,7 @@ public class SkeletonHorse extends AbstractHorse {
private final SkeletonTrapGoal skeletonTrapGoal = new SkeletonTrapGoal(this);
private static final int TRAP_MAX_LIFE = 18000;
private boolean isTrap;
- private int trapTime;
+ public int trapTime; // Paper private -> public
public SkeletonHorse(EntityType<? extends SkeletonHorse> type, Level world) {
super(type, world);
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295f5dc1f18 100644 index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295f5dc1f18 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java

View File

@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 3fbfe4f77c4b82d96ed022498b2d9175d548e247..383c34a611f8371dd6ebcb858c1c0ba148d0660b 100644 index 982da5f98601c6b3095d78e69e02554640708c64..fa6819fe0eaf52a1f7182ffb775e0a210530aa9b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -572,7 +572,7 @@ public final class CraftItemStack extends ItemStack { @@ -571,7 +571,7 @@ public final class CraftItemStack extends ItemStack {
@Override @Override
public boolean hasItemMeta() { public boolean hasItemMeta() {

View File

@ -65,19 +65,6 @@ index 3bdb09ab00ec05ed532a0c26b9fd321e1f05c1a0..1451a98d69b185dd15a2d1d7681bcecb
this.blockEntitiesTags.add(compoundTag); this.blockEntitiesTags.add(compoundTag);
} }
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 4d4b471bbfb2d9174391c8adc6075ec11295408b..8b3cf3b882ea6c0d48df8b551f4b85b87b889c58 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -143,7 +143,7 @@ public final class ItemStack {
private int popTime;
@Deprecated
private Item item;
- private CompoundTag tag;
+ public CompoundTag tag; // Paper private -> public
private boolean emptyCacheFlag;
private Entity entityRepresentation;
private BlockInWorld cachedBreakBlock;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
index eaf586eb386e13e954bc593f6ddbc45929cec204..f0192a009f6a21d1781ce709624a9187048d9a08 100644 index eaf586eb386e13e954bc593f6ddbc45929cec204..f0192a009f6a21d1781ce709624a9187048d9a08 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java

View File

@ -2312,7 +2312,7 @@ index 880fc4e346549a5d7ed627244bdfd284705ad2fc..24fc2eb3ee067a4164db166aa3e07ecb
public String getLocalIp() { public String getLocalIp() {
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index ce4296ab7e6f1ccc735d619eacabdf2ef2f4e361..00f5cd29170e3594fe2ac194e04e403cef685912 100644 index df32a8b1df60064c49702dca26d7310b7d27e94b..92faf96e12b443351ea146d4d1deccb0f7e020e5 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -154,6 +154,18 @@ public class ChunkHolder { @@ -154,6 +154,18 @@ public class ChunkHolder {
@ -2357,7 +2357,7 @@ index ce4296ab7e6f1ccc735d619eacabdf2ef2f4e361..00f5cd29170e3594fe2ac194e04e403c
completablefuture = (CompletableFuture) this.futures.get(i); completablefuture = (CompletableFuture) this.futures.get(i);
if (completablefuture == null) { if (completablefuture == null) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 64304bf9fc60332d9a17194660d3a34c853a36c6..c096c2fecc6ab74255b305a7eee045bedaab44ae 100644 index a8c172c3742b8eb52c9cdd5adb65224f2e7bc736..5585c72b3c79a8c5bcc9d84c6cf4c7d61b6a42e9 100644
--- 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
@@ -115,7 +115,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -115,7 +115,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -2369,30 +2369,6 @@ index 64304bf9fc60332d9a17194660d3a34c853a36c6..c096c2fecc6ab74255b305a7eee045be
private final PoiManager poiManager; private final PoiManager poiManager;
public final LongSet toDrop; public final LongSet toDrop;
private boolean modified; private boolean modified;
@@ -126,7 +126,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final ChunkStatusUpdateListener chunkStatusListener;
public final ChunkMap.ChunkDistanceManager distanceManager;
private final AtomicInteger tickingGenerated;
- private final StructureManager structureManager;
+ public final StructureManager structureManager; // Paper - private -> public
private final File storageFolder;
private final PlayerMap playerMap;
public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap;
@@ -252,12 +252,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
@Nullable
- protected ChunkHolder getUpdatingChunkIfPresent(long pos) {
+ public final ChunkHolder getUpdatingChunkIfPresent(long pos) { // Paper - protected -> public
return (ChunkHolder) this.updatingChunkMap.get(pos);
}
@Nullable
- protected ChunkHolder getVisibleChunkIfPresent(long pos) {
+ public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public
return (ChunkHolder) this.visibleChunkMap.get(pos);
}
@@ -406,6 +406,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -406,6 +406,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void close() throws IOException { public void close() throws IOException {
try { try {
@ -2677,18 +2653,9 @@ index 64304bf9fc60332d9a17194660d3a34c853a36c6..c096c2fecc6ab74255b305a7eee045be
return this.poiManager; return this.poiManager;
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 4a343fa19566f468aca17228379f4d75f3f56f28..71ac5cf0fdedcfe422bf6f5e6ffb15ce4138aa04 100644 index bd937505244cc9305611815a9274f91395d3a8f8..b15d5c2a8d4d2184a55a16ff2071fd82cb2e0457 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -55,7 +55,7 @@ public class ServerChunkCache extends ChunkSource {
final ServerLevel level;
public final Thread mainThread; // Paper - package-private -> public
final ThreadedLevelLightEngine lightEngine;
- private final ServerChunkCache.MainThreadExecutor mainThreadProcessor;
+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public
public final ChunkMap chunkMap;
private final DimensionDataStorage dataStorage;
private long lastInhabitedUpdate;
@@ -323,10 +323,128 @@ public class ServerChunkCache extends ChunkSource { @@ -323,10 +323,128 @@ public class ServerChunkCache extends ChunkSource {
return ret; return ret;
} }
@ -2865,7 +2832,7 @@ index 4a343fa19566f468aca17228379f4d75f3f56f28..71ac5cf0fdedcfe422bf6f5e6ffb15ce
} finally { } finally {
chunkMap.callbackExecutor.run(); chunkMap.callbackExecutor.run();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 73da340ab8782efc7d97c3a3e29ea9cd9a830799..043869948201c728bf168855d260b0dca42a0b3a 100644 index a86757a96fea11de150fb48ac123c3493e5420b7..f1d08ad4f29eb2b94dc24962bac177397df1110c 100644
--- 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
@@ -210,6 +210,79 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -210,6 +210,79 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
@ -3443,19 +3410,10 @@ index 1a35ef48c487c92f55fcbbfc19a708ededc6a32d..357da4846344d1182ab7149c4d352d50
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c4cae57b2 100644 index f973792c8ee4523eb4efdf31d0a97cb3358e1b3b..ebb1a050beab9530942c4498335f084c89faef06 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
@@ -15,7 +15,7 @@ import net.minecraft.server.MinecraftServer; @@ -28,11 +28,32 @@ public class RegionFileStorage implements AutoCloseable {
import net.minecraft.util.ExceptionCollector;
import net.minecraft.world.level.ChunkPos;
-public final class RegionFileStorage implements AutoCloseable {
+public class RegionFileStorage implements AutoCloseable { // Paper - no final
public static final String ANVIL_EXTENSION = ".mca";
private static final int MAX_CACHE_SIZE = 256;
@@ -28,11 +28,32 @@ public final class RegionFileStorage implements AutoCloseable {
this.sync = dsync; this.sync = dsync;
} }
@ -3471,7 +3429,7 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
+ return regionfile != null ? regionfile.hasChunk(pos) : false; + return regionfile != null ? regionfile.hasChunk(pos) : false;
+ } + }
+ +
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit // Paper - public + public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit
+ return this.getFile(chunkcoordintpair, existingOnly, false); + return this.getFile(chunkcoordintpair, existingOnly, false);
+ } + }
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly, boolean lock) throws IOException { + public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly, boolean lock) throws IOException {
@ -3489,7 +3447,7 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
return regionfile; return regionfile;
} else { } else {
if (this.regionCache.size() >= com.destroystokyo.paper.PaperConfig.regionFileCacheSize) { // Paper - configurable if (this.regionCache.size() >= com.destroystokyo.paper.PaperConfig.regionFileCacheSize) { // Paper - configurable
@@ -50,6 +71,12 @@ public final class RegionFileStorage implements AutoCloseable { @@ -50,6 +71,12 @@ public class RegionFileStorage implements AutoCloseable {
RegionFile regionfile1 = new RegionFile(file1, this.folder, this.sync); RegionFile regionfile1 = new RegionFile(file1, this.folder, this.sync);
this.regionCache.putAndMoveToFirst(i, regionfile1); this.regionCache.putAndMoveToFirst(i, regionfile1);
@ -3502,7 +3460,7 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
return regionfile1; return regionfile1;
} }
} }
@@ -57,11 +84,12 @@ public final class RegionFileStorage implements AutoCloseable { @@ -57,11 +84,12 @@ public class RegionFileStorage implements AutoCloseable {
@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
@ -3516,7 +3474,7 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos); DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
CompoundTag nbttagcompound; CompoundTag nbttagcompound;
@@ -98,10 +126,14 @@ public final class RegionFileStorage implements AutoCloseable { @@ -98,10 +126,14 @@ public class RegionFileStorage implements AutoCloseable {
} }
return nbttagcompound; return nbttagcompound;
@ -3532,7 +3490,7 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper
if (nbt == null) { if (nbt == null) {
@@ -140,9 +172,12 @@ public final class RegionFileStorage implements AutoCloseable { @@ -140,9 +172,12 @@ public class RegionFileStorage implements AutoCloseable {
MinecraftServer.LOGGER.error("Failed to save chunk", laste); MinecraftServer.LOGGER.error("Failed to save chunk", laste);
} }
// Paper end // Paper end
@ -3546,7 +3504,7 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
ExceptionCollector<IOException> exceptionsuppressor = new ExceptionCollector<>(); ExceptionCollector<IOException> exceptionsuppressor = new ExceptionCollector<>();
ObjectIterator objectiterator = this.regionCache.values().iterator(); ObjectIterator objectiterator = this.regionCache.values().iterator();
@@ -159,7 +194,7 @@ public final class RegionFileStorage implements AutoCloseable { @@ -159,7 +194,7 @@ public class RegionFileStorage implements AutoCloseable {
exceptionsuppressor.throwIfPresent(); exceptionsuppressor.throwIfPresent();
} }
@ -3556,10 +3514,10 @@ index 3c82f98a34a5911fdb9e3ba66c54d25f6944fd07..211ab6cffe78c61fcff12ef7ffba904c
while (objectiterator.hasNext()) { while (objectiterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
index 844d65612d9c4c19d02a2b0a5b90cd44de9f17c9..cfd4c38ca99b183f23716f82c972c14be33ca13d 100644 index e5e138fb23d03eb63e547e74d3e14ec9d96d8107..90f7b06bd2c558be35c4577044fa033e1fb5cc22 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
@@ -30,12 +30,12 @@ import net.minecraft.world.level.LevelHeightAccessor; @@ -30,10 +30,10 @@ import net.minecraft.world.level.LevelHeightAccessor;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -3570,11 +3528,8 @@ index 844d65612d9c4c19d02a2b0a5b90cd44de9f17c9..cfd4c38ca99b183f23716f82c972c14b
- private final IOWorker worker; - private final IOWorker worker;
+ // Paper - remove mojang I/O thread + // Paper - remove mojang I/O thread
private final Long2ObjectMap<Optional<R>> storage = new Long2ObjectOpenHashMap<>(); private final Long2ObjectMap<Optional<R>> storage = new Long2ObjectOpenHashMap<>();
- private final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet();
+ public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); // Paper - private -> public
private final Function<Runnable, Codec<R>> codec; private final Function<Runnable, Codec<R>> codec;
private final Function<Runnable, R> factory;
private final DataFixer fixerUpper;
@@ -43,12 +43,13 @@ public class SectionStorage<R> implements AutoCloseable { @@ -43,12 +43,13 @@ public class SectionStorage<R> implements AutoCloseable {
protected final LevelHeightAccessor levelHeightAccessor; protected final LevelHeightAccessor levelHeightAccessor;

View File

@ -19,7 +19,7 @@ maybe more (please check patch overrides for drops for more):
- players, armor stands, foxes, chested donkeys/llamas - players, armor stands, foxes, chested donkeys/llamas
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c8652e3bf325d3c557257ad88fe195f7a31683d6..bea1461ee3bd65f02bf6add6ed967555092fd675 100644 index b9fdccfc9815b0aec7bb5f5ad633c69b8eba6af2..df02d712e7daf1603885547995d69cb7fa3962ca 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -218,6 +218,10 @@ public class ServerPlayer extends Player { @@ -218,6 +218,10 @@ public class ServerPlayer extends Player {
@ -70,7 +70,7 @@ index c8652e3bf325d3c557257ad88fe195f7a31683d6..bea1461ee3bd65f02bf6add6ed967555
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 773c1e0ed3e10157c968d84b19947d99bb01371a..fd0c307a4b340661ba9aff9ae4e0055c139a1ebd 100644 index 9382bc7569a39a0d5729fb7441f07b84f0d0c566..a629b6e3cd085f79ad231747cce996bb1fbdc3b2 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity { @@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
@ -193,26 +193,15 @@ index 773c1e0ed3e10157c968d84b19947d99bb01371a..fd0c307a4b340661ba9aff9ae4e0055c
// CraftBukkit start // CraftBukkit start
public int getExpReward() { public int getExpReward() {
@@ -1762,8 +1788,9 @@ public abstract class LivingEntity extends Entity { @@ -1763,7 +1789,7 @@ public abstract class LivingEntity extends Entity {
return SoundEvents.GENERIC_HURT;
} }
+
@Nullable @Nullable
- protected SoundEvent getDeathSound() { - protected SoundEvent getDeathSound() {
+ public final SoundEvent getDeathSoundPublic() { return this.getDeathSound(); } protected SoundEvent getDeathSound() { // Paper - provide PUBLIC accessor, overrides are hell to deal with + protected SoundEvent getDeathSound() { return getDeathSoundPublic(); } public SoundEvent getDeathSoundPublic() { // Paper - public OBFHELPER
return SoundEvents.GENERIC_DEATH; return SoundEvents.GENERIC_DEATH;
} }
@@ -2477,7 +2504,7 @@ public abstract class LivingEntity extends Entity {
}
- protected float getSoundVolume() {
+ public final float getSoundVolumePublic() { return this.getSoundVolume(); } protected float getSoundVolume() { // Paper - provide PUBLIC accessor, overrides are hell
return 1.0F;
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index c1cdb1905536bda76f34ad3fc796996443839767..31f4e4a93ea5fd3ffe7e60dff2e2a9642b51daa2 100644 index c1cdb1905536bda76f34ad3fc796996443839767..31f4e4a93ea5fd3ffe7e60dff2e2a9642b51daa2 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
@ -272,7 +261,7 @@ index 224eca7d20cf4b890a6bc1b314d566e02e716762..7281eb294ddd178ba742088d3c61bf3d
public void addAdditionalSaveData(CompoundTag nbt) { public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt); super.addAdditionalSaveData(nbt);
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 4adde11daa5ca97a2bf9c164c43c5c011a89b33d..cb9969d768b13863722aad3dc5daad3c10bb264a 100644 index d545349f659b2a164a28d06e9ff0f9fff8fa8ecf..bbde9b758643c087733064a126d90689d71830cf 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -755,7 +755,8 @@ public class ArmorStand extends LivingEntity { @@ -755,7 +755,8 @@ public class ArmorStand extends LivingEntity {
@ -306,7 +295,7 @@ index 9683b5e7045050ee0a6f279749dd159ff4366a7d..686dc5859c081d3b86d8e58a63abee49
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) { public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index bb006e6c703e5c4cfa16ca4ee4cf8463215c38b0..c3341d1c4e9cda85b0b236461b0a00cbebc9a856 100644 index 8f44cabc1a92dc3e9afe988b23ac982e85d49fc8..9a84ac5aa03c645037daec23cc4422106a6ace1d 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -787,9 +787,16 @@ public class CraftEventFactory { @@ -787,9 +787,16 @@ public class CraftEventFactory {
@ -354,7 +343,7 @@ index bb006e6c703e5c4cfa16ca4ee4cf8463215c38b0..c3341d1c4e9cda85b0b236461b0a00cb
+ net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSoundPublic(); + net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSoundPublic();
+ event.setDeathSound(soundEffect != null ? org.bukkit.craftbukkit.CraftSound.getBukkit(soundEffect) : null); + event.setDeathSound(soundEffect != null ? org.bukkit.craftbukkit.CraftSound.getBukkit(soundEffect) : null);
+ event.setDeathSoundCategory(org.bukkit.SoundCategory.valueOf(victim.getSoundSource().name())); + event.setDeathSoundCategory(org.bukkit.SoundCategory.valueOf(victim.getSoundSource().name()));
+ event.setDeathSoundVolume(victim.getSoundVolumePublic()); + event.setDeathSoundVolume(victim.getSoundVolume());
+ event.setDeathSoundPitch(victim.getVoicePitch()); + event.setDeathSoundPitch(victim.getVoicePitch());
+ } + }
+ +

View File

@ -4,19 +4,6 @@ Date: Sun, 7 Oct 2018 00:54:21 -0500
Subject: [PATCH] Add sun related API Subject: [PATCH] Add sun related API
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 8451baff82cb7ec7615ab50a409724897ccf4d95..32e8ae0d2a0f78af671a632c4d1be58a0b38a392 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1561,7 +1561,7 @@ public abstract class Mob extends LivingEntity {
}
- protected boolean isSunBurnTick() {
+ public boolean isSunBurnTick() { // Paper - protected -> public
if (this.level.isDay() && !this.level.isClientSide) {
float f = this.getBrightness();
BlockPos blockposition = new BlockPos(this.getX(), this.getEyeY(), this.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a19de8405de8ee29afc112556e4684b042c6f4ab..be4c05259f176e9ef5c25db2b1745df5ea4d5789 100644 index a19de8405de8ee29afc112556e4684b042c6f4ab..be4c05259f176e9ef5c25db2b1745df5ea4d5789 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0d4ab7a469b2ce643b80e7912e20d126a251960a..b75a7f702ca6166c1f869a138ac4b93ba3870c62 100644 index 0be7bd3c5deef99f9ffe6d3d6390c9297d5b5815..0680ed44a47cfafdff400dd3033c9600afd3514b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2341,6 +2341,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -2341,6 +2341,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -17,7 +17,7 @@ index 0d4ab7a469b2ce643b80e7912e20d126a251960a..b75a7f702ca6166c1f869a138ac4b93b
return 0.0F; return 0.0F;
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fd0c307a4b340661ba9aff9ae4e0055c139a1ebd..8333d604fce05349455bf1779f3e5b0a980c4c16 100644 index a629b6e3cd085f79ad231747cce996bb1fbdc3b2..f795e7e689e205e9ba5ef57482850679ad7b19f9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable; @@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@ -28,7 +28,7 @@ index fd0c307a4b340661ba9aff9ae4e0055c139a1ebd..8333d604fce05349455bf1779f3e5b0a
import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.PlayerTeam;
@@ -3730,6 +3731,38 @@ public abstract class LivingEntity extends Entity { @@ -3729,6 +3730,38 @@ public abstract class LivingEntity extends Entity {
return level.clip(raytrace); return level.clip(raytrace);
} }
@ -68,7 +68,7 @@ index fd0c307a4b340661ba9aff9ae4e0055c139a1ebd..8333d604fce05349455bf1779f3e5b0a
public int getShieldBlockingDelay() { public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index cb4c15d17ea3f22e6baa73ba6ce2a18e34ac4b00..5477f288db57d63051f4579b8cd3c19e3af430ee 100644 index 05e962ed9269db4cfa170960507b10d7b7d13741..e2e76c5de41666ef3a7132e376a3e4257bb13109 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@

View File

@ -18,7 +18,7 @@ index 70a51ba19fb34f652858b18f24554261787d97e2..065d0752db0e3ae2a89d707aaa214580
private final int searchRange; private final int searchRange;
private final int verticalSearchRange; private final int verticalSearchRange;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index b782d278463a72b8514719e9b14986f268828772..e638d982b4bd1d261a7282cad6dab98ad0b55213 100644 index fa551b1338a21b7b0864bdb9f31cb365c918facf..925f16d5eb092518ef774f69a8d99689feb0f5d7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -11,6 +11,7 @@ import net.minecraft.nbt.CompoundTag; @@ -11,6 +11,7 @@ import net.minecraft.nbt.CompoundTag;
@ -38,39 +38,6 @@ index b782d278463a72b8514719e9b14986f268828772..e638d982b4bd1d261a7282cad6dab98a
return (BlockPos) this.entityData.get(Turtle.HOME_POS); return (BlockPos) this.entityData.get(Turtle.HOME_POS);
} }
@@ -109,7 +110,7 @@ public class Turtle extends Animal {
return (Boolean) this.entityData.get(Turtle.HAS_EGG);
}
- void setHasEgg(boolean hasEgg) {
+ public void setHasEgg(boolean hasEgg) { // Paper
this.entityData.set(Turtle.HAS_EGG, hasEgg);
}
@@ -122,19 +123,19 @@ public class Turtle extends Animal {
this.entityData.set(Turtle.LAYING_EGG, diggingSand);
}
- boolean isGoingHome() {
+ public boolean isGoingHome() { // Paper - public
return (Boolean) this.entityData.get(Turtle.GOING_HOME);
}
- void setGoingHome(boolean landBound) {
+ public void setGoingHome(boolean landBound) { // Paper - public
this.entityData.set(Turtle.GOING_HOME, landBound);
}
- boolean isTravelling() {
+ public boolean isTravelling() { // Paper - public
return (Boolean) this.entityData.get(Turtle.TRAVELLING);
}
- void setTravelling(boolean travelling) {
+ public void setTravelling(boolean travelling) { // Paper - public
this.entityData.set(Turtle.TRAVELLING, travelling);
}
@@ -487,14 +488,17 @@ public class Turtle extends Animal { @@ -487,14 +488,17 @@ public class Turtle extends Animal {
if (!this.turtle.isInWater() && this.isReachedTarget()) { if (!this.turtle.isInWater() && this.isReachedTarget()) {

View File

@ -19,7 +19,7 @@ spectate the target entity.
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 76be554b8266f1cb2b2eebb4db9777bda727f421..e6b64def52915114edb7a5e53fdc8816afd809a9 100644 index df02d712e7daf1603885547995d69cb7fa3962ca..3ca3a1c16ea0900bfb868a6e2fc88e3522bf7752 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1822,14 +1822,58 @@ public class ServerPlayer extends Player { @@ -1822,14 +1822,58 @@ public class ServerPlayer extends Player {
@ -86,18 +86,9 @@ index 76be554b8266f1cb2b2eebb4db9777bda727f421..e6b64def52915114edb7a5e53fdc8816
@Override @Override
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/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2917632c5e974dbfb7d78c497ebd49e742b8ef3c..deb6352604b7cbda7de9df0d654410399f4ce159 100644 index 2917632c5e974dbfb7d78c497ebd49e742b8ef3c..4f263837f4111f77e14e4663afeff4e170b2b3da 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
@@ -1068,7 +1068,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}
}
- private void a(List<TextFilter.FilteredText> list, UnaryOperator<String> unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit
+ public void a(List<TextFilter.FilteredText> list, UnaryOperator<String> unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit // Paper - make public
ListTag nbttaglist = new ListTag();
if (this.player.isTextFilteringEnabled()) {
@@ -1381,6 +1381,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1381,6 +1381,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.a(x, y, z, yaw, pitch, PlayerTeleportEvent.TeleportCause.UNKNOWN); this.a(x, y, z, yaw, pitch, PlayerTeleportEvent.TeleportCause.UNKNOWN);
} }

View File

@ -5,11 +5,11 @@ Subject: [PATCH] Here's Johnny!
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
index aaeb82575ce0a3dac7c4e413fb782925573894d7..dcaec42b0756cf36da813815b4a54e4d6c4e293a 100644 index 6203069a09c578200b8de5e18e351f700472b62c..e3f900153c10a01fd8b1ba346fe87880c958b76a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java --- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
@@ -51,7 +51,7 @@ public class Vindicator extends AbstractIllager { @@ -51,7 +51,7 @@ public class Vindicator extends AbstractIllager {
static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> { public static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> {
return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD; return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD;
}; };
- boolean isJohnny; - boolean isJohnny;

View File

@ -12,7 +12,7 @@ server threads
Allow usage of a single thread executor by not using ForkJoin so single core CPU's. Allow usage of a single thread executor by not using ForkJoin so single core CPU's.
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index 6f29d1fc437764a75d592ccb0c0ddc0593a89967..99d52a9643efe38b449b59b6aac81c5b20ed9477 100644 index 65e0ca442980f273d2fe5f131e174cd92f80da20..81f4f26a6b83079d36acd1fd86dede0eb1116c01 100644
--- a/src/main/java/net/minecraft/Util.java --- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java
@@ -56,7 +56,7 @@ import java.util.stream.Stream; @@ -56,7 +56,7 @@ import java.util.stream.Stream;
@ -66,15 +66,6 @@ index 6f29d1fc437764a75d592ccb0c0ddc0593a89967..99d52a9643efe38b449b59b6aac81c5b
return executorService; return executorService;
} }
@@ -180,7 +185,7 @@ public class Util {
throw t instanceof RuntimeException ? (RuntimeException)t : new RuntimeException(t);
}
- private static void onThreadException(Thread thread, Throwable t) {
+ public static void onThreadException(Thread thread, Throwable t) { // Paper - make public
pauseInIde(t);
if (t instanceof CompletionException) {
t = t.getCause();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 24fc2eb3ee067a4164db166aa3e07ecbb426bbba..a302d232da3fbaa2cb3e1903cfd096d404847c54 100644 index 24fc2eb3ee067a4164db166aa3e07ecbb426bbba..a302d232da3fbaa2cb3e1903cfd096d404847c54 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java

View File

@ -20,7 +20,7 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome! Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 13dace1a8fcde011d26d37049ae3ca14d86990fc..8e86ca5221236ab3ab61d7a6859b64be9e5d8f97 100644 index 8beca0412c65ad03376fb76e2d993bc841bf9e0b..77d9a4ce7be345b6a999a0269b26c0e60acab864 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1299,11 +1299,13 @@ public class ServerPlayer extends Player { @@ -1299,11 +1299,13 @@ public class ServerPlayer extends Player {
@ -41,7 +41,7 @@ index 13dace1a8fcde011d26d37049ae3ca14d86990fc..8e86ca5221236ab3ab61d7a6859b64be
if (entity1 != entity && this.connection != null) { if (entity1 != entity && this.connection != null) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index d92a54022478eac52abf035aee89d91acf29c874..7b7c554ab22cee655d19eed793f45706f0311234 100644 index 62bb61b6f8e099eddf3ad12b7ff47f62cab2eaa9..f95b6e77318f18c62b7c7dda2be23161ddd914d7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2214,12 +2214,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -2214,12 +2214,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -93,10 +93,10 @@ index d92a54022478eac52abf035aee89d91acf29c874..7b7c554ab22cee655d19eed793f45706
if (this.valid) { if (this.valid) {
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8333d604fce05349455bf1779f3e5b0a980c4c16..1dabdba428c10e65b634b6e2036f993c4be186a7 100644 index f795e7e689e205e9ba5ef57482850679ad7b19f9..1460a3185d557acfe695d46b4254a2a573cb7323 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3329,11 +3329,13 @@ public abstract class LivingEntity extends Entity { @@ -3328,11 +3328,13 @@ public abstract class LivingEntity extends Entity {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 4) != 0; return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 4) != 0;
} }
@ -114,7 +114,7 @@ index 8333d604fce05349455bf1779f3e5b0a980c4c16..1dabdba428c10e65b634b6e2036f993c
this.dismountVehicle(entity); this.dismountVehicle(entity);
} }
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index e0e33dd92b686939f622f0a7da0d5a971f43d0d6..4c9261c68518ab7429325f0366dfb2930663288c 100644 index 1a7bd2462bab95fa6986cef705e5e5b82da30063..857346b755454956268cc594bb03dc060f2a4aac 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1096,9 +1096,11 @@ public abstract class Player extends LivingEntity { @@ -1096,9 +1096,11 @@ public abstract class Player extends LivingEntity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add more Zombie API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 017d8de4d09f524aed2ee03af7ef79468503edf0..c60d9775230b2ff554eeb38136f8e7c32c47d8cf 100644 index eabdf345ddf208aaac681f249cb11356ade08673..0878e69aa5805f635971b5ce46783ce043c19bbe 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -96,6 +96,7 @@ public class Zombie extends Monster { @@ -96,6 +96,7 @@ public class Zombie extends Monster {
@ -29,12 +29,10 @@ index 017d8de4d09f524aed2ee03af7ef79468503edf0..c60d9775230b2ff554eeb38136f8e7c3
public void startUnderWaterConversion(int ticksUntilWaterConversion) { public void startUnderWaterConversion(int ticksUntilWaterConversion) {
this.lastTick = MinecraftServer.currentTick; // CraftBukkit this.lastTick = MinecraftServer.currentTick; // CraftBukkit
this.conversionTime = ticksUntilWaterConversion; this.conversionTime = ticksUntilWaterConversion;
@@ -292,10 +299,17 @@ public class Zombie extends Monster { @@ -293,9 +300,15 @@ public class Zombie extends Monster {
} }
+ public boolean isSunSensitivePublic() { return this.isSunSensitive(); } // Paper - public getter public boolean isSunSensitive() {
protected boolean isSunSensitive() {
- return true; - return true;
+ return this.shouldBurnInDay; // Paper - use api value instead + return this.shouldBurnInDay; // Paper - use api value instead
} }
@ -48,7 +46,7 @@ index 017d8de4d09f524aed2ee03af7ef79468503edf0..c60d9775230b2ff554eeb38136f8e7c3
@Override @Override
public boolean hurt(DamageSource source, float amount) { public boolean hurt(DamageSource source, float amount) {
if (!super.hurt(source, amount)) { if (!super.hurt(source, amount)) {
@@ -415,6 +429,7 @@ public class Zombie extends Monster { @@ -415,6 +428,7 @@ public class Zombie extends Monster {
nbt.putBoolean("CanBreakDoors", this.canBreakDoors()); nbt.putBoolean("CanBreakDoors", this.canBreakDoors());
nbt.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1); nbt.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1);
nbt.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1); nbt.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1);
@ -56,7 +54,7 @@ index 017d8de4d09f524aed2ee03af7ef79468503edf0..c60d9775230b2ff554eeb38136f8e7c3
} }
@Override @Override
@@ -426,6 +441,11 @@ public class Zombie extends Monster { @@ -426,6 +440,11 @@ public class Zombie extends Monster {
if (nbt.contains("DrownedConversionTime", 99) && nbt.getInt("DrownedConversionTime") > -1) { if (nbt.contains("DrownedConversionTime", 99) && nbt.getInt("DrownedConversionTime") > -1) {
this.startUnderWaterConversion(nbt.getInt("DrownedConversionTime")); this.startUnderWaterConversion(nbt.getInt("DrownedConversionTime"));
} }
@ -69,7 +67,7 @@ index 017d8de4d09f524aed2ee03af7ef79468503edf0..c60d9775230b2ff554eeb38136f8e7c3
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
index 2e643e92569512ac4e75c0ef2ee7aa4b688e7356..41b5059f6fde8a1afa8c70b983750854ac0207a6 100644 index 2e643e92569512ac4e75c0ef2ee7aa4b688e7356..77e4875484bdaedfba576a6b008245c488b2a112 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
@@ -93,6 +93,42 @@ public class CraftZombie extends CraftMonster implements Zombie { @@ -93,6 +93,42 @@ public class CraftZombie extends CraftMonster implements Zombie {
@ -94,7 +92,7 @@ index 2e643e92569512ac4e75c0ef2ee7aa4b688e7356..41b5059f6fde8a1afa8c70b983750854
+ +
+ @Override + @Override
+ public boolean shouldBurnInDay() { + public boolean shouldBurnInDay() {
+ return getHandle().isSunSensitivePublic(); + return getHandle().isSunSensitive();
+ } + }
+ +
+ @Override + @Override

View File

@ -65,7 +65,7 @@ index 8bbf13a7aea1142b3154a1c76837a98aa5ed431d..9f0537799a3cae43fb120056b8fe805a
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index a196ab2510a1c302ef1c946400c1a7c07619994a..46432534fddbbf78e3bf46385b9638d2f92c951f 100644 index 3d97f76f14b8c22c78c46a34c2da2e6406ba28b6..477117affabfe07d52d3b40404613492b0bcdc56 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -56,10 +56,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -56,10 +56,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@ -81,12 +81,3 @@ index a196ab2510a1c302ef1c946400c1a7c07619994a..46432534fddbbf78e3bf46385b9638d2
private final String serverId; private final String serverId;
@Nullable @Nullable
private ServerPlayer delayedAcceptPlayer; private ServerPlayer delayedAcceptPlayer;
@@ -441,7 +441,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
return new GameProfile(uuid, profile.getName());
}
- private static enum State {
+ public static enum State { // Paper - make public
HELLO, KEY, AUTHENTICATING, NEGOTIATING, READY_TO_ACCEPT, DELAY_ACCEPT, ACCEPTED;

View File

@ -429,7 +429,7 @@ index 0df3961919f04f27eb265ab316aa5a0f15a70854..bb0a07a280c7d4885165e9d6488e7741
return net.minecraft.server.level.ChunkMap.MAX_VIEW_DISTANCE + net.minecraft.world.level.chunk.ChunkStatus.getDistance(status); return net.minecraft.server.level.ChunkMap.MAX_VIEW_DISTANCE + net.minecraft.world.level.chunk.ChunkStatus.getDistance(status);
} }
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 84831fc611589c19320b5e3af107080596b1fbdc..fa6d91886d433c0b7d77c1d059a23ee194ae14a4 100644 index 1ff399ae84eb5281cd058556f67374688ab59e54..1e52b8e97dcee512e7d2fbe157152df9e0779bf1 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -61,7 +61,7 @@ public class ChunkHolder { @@ -61,7 +61,7 @@ public class ChunkHolder {
@ -442,7 +442,7 @@ index 84831fc611589c19320b5e3af107080596b1fbdc..fa6d91886d433c0b7d77c1d059a23ee1
private final ShortSet[] changedBlocksPerSection; private final ShortSet[] changedBlocksPerSection;
private final BitSet blockChangedLightSectionFilter; private final BitSet blockChangedLightSectionFilter;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 71ac5cf0fdedcfe422bf6f5e6ffb15ce4138aa04..77bb2fb280293da4a38f9acc6503e84997ecb399 100644 index b15d5c2a8d4d2184a55a16ff2071fd82cb2e0457..d76568b06ff5035e59b664e371fe4a216517327a 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -49,7 +49,7 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; // Paper @@ -49,7 +49,7 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; // Paper
@ -454,19 +454,6 @@ index 71ac5cf0fdedcfe422bf6f5e6ffb15ce4138aa04..77bb2fb280293da4a38f9acc6503e849
private final DistanceManager distanceManager; private final DistanceManager distanceManager;
public final ChunkGenerator generator; public final ChunkGenerator generator;
final ServerLevel level; final ServerLevel level;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6631a2b8cf99993d727d65a67af2bc7febb685b4..08b4e46109eb97746d0204e3797ebafce959b212 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -174,7 +174,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
public static final BlockPos END_SPAWN_POINT = new BlockPos(100, 50, 0);
private static final Logger LOGGER = LogManager.getLogger();
private static final int EMPTY_TIME_NO_TICK = 300;
- final List<ServerPlayer> players;
+ public final List<ServerPlayer> players; // Paper - package->public
public final ServerChunkCache chunkSource; // Paper - public
private final MinecraftServer server;
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
diff --git a/src/main/java/net/minecraft/server/level/Ticket.java b/src/main/java/net/minecraft/server/level/Ticket.java diff --git a/src/main/java/net/minecraft/server/level/Ticket.java b/src/main/java/net/minecraft/server/level/Ticket.java
index b346fa94b23d81da7da073f71dd12e672e0f079c..8b0c6e1a649400908dbb674dfb4cdd1aa0ce1d38 100644 index b346fa94b23d81da7da073f71dd12e672e0f079c..8b0c6e1a649400908dbb674dfb4cdd1aa0ce1d38 100644
--- a/src/main/java/net/minecraft/server/level/Ticket.java --- a/src/main/java/net/minecraft/server/level/Ticket.java

View File

@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK) its only purpose is to cache the status on DISK)
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index fa6d91886d433c0b7d77c1d059a23ee194ae14a4..56e292e6550b19d0cae9ebad369da730ca1cabd8 100644 index 1e52b8e97dcee512e7d2fbe157152df9e0779bf1..2aa86f35b8960273ad91b21e260bcf91cf861e08 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -111,6 +111,19 @@ public class ChunkHolder { @@ -111,6 +111,19 @@ public class ChunkHolder {
@ -32,7 +32,7 @@ index fa6d91886d433c0b7d77c1d059a23ee194ae14a4..56e292e6550b19d0cae9ebad369da730
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getFutureIfPresentUnchecked(ChunkStatus leastStatus) { public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getFutureIfPresentUnchecked(ChunkStatus leastStatus) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 25826b41812f2d9ac29806ad7a9242e5674376fc..dd7de2c3db10d9d606d47c52eba40e71034fc11a 100644 index 5585c72b3c79a8c5bcc9d84c6cf4c7d61b6a42e9..da58b2ee334a347eea375dafd37347635a4ab62f 100644
--- 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
@@ -84,6 +84,7 @@ import net.minecraft.world.level.chunk.ProtoChunk; @@ -84,6 +84,7 @@ import net.minecraft.world.level.chunk.ProtoChunk;
@ -108,24 +108,9 @@ index 25826b41812f2d9ac29806ad7a9242e5674376fc..dd7de2c3db10d9d606d47c52eba40e71
// Spigot start // Spigot start
return this.isOutsideOfRange(chunkPos, false); return this.isOutsideOfRange(chunkPos, false);
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 77bb2fb280293da4a38f9acc6503e84997ecb399..c47d1772044913475a60292162ef4be594bed4c6 100644 index d76568b06ff5035e59b664e371fe4a216517327a..6f8b4d9974c8fb549d69e9b46ab05958c9ce0ba7 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -52,10 +52,10 @@ public class ServerChunkCache extends ChunkSource {
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList(); public static final List<ChunkStatus> getPossibleChunkStatuses() { return ServerChunkCache.CHUNK_STATUSES; } // Paper - OBFHELPER
private final DistanceManager distanceManager;
public final ChunkGenerator generator;
- final ServerLevel level;
- public final Thread mainThread; // Paper - package-private -> public
- final ThreadedLevelLightEngine lightEngine;
- public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public
+ private final ServerLevel level;
+ public final Thread mainThread; // Paper - private -> public
+ private final ThreadedLevelLightEngine lightEngine;
+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper private -> public
public final ChunkMap chunkMap;
private final DimensionDataStorage dataStorage;
private long lastInhabitedUpdate;
@@ -324,6 +324,7 @@ public class ServerChunkCache extends ChunkSource { @@ -324,6 +324,7 @@ public class ServerChunkCache extends ChunkSource {
} }
// Paper end // Paper end
@ -134,15 +119,6 @@ index 77bb2fb280293da4a38f9acc6503e84997ecb399..c47d1772044913475a60292162ef4be5
public ChunkAccess getChunkAtImmediately(int x, int z) { public ChunkAccess getChunkAtImmediately(int x, int z) {
ChunkHolder holder = this.chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); ChunkHolder holder = this.chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z));
if (holder == null) { if (holder == null) {
@@ -922,7 +923,7 @@ public class ServerChunkCache extends ChunkSource {
return this.lastSpawnState;
}
- private final class MainThreadExecutor extends BlockableEventLoop<Runnable> {
+ public final class MainThreadExecutor extends BlockableEventLoop<Runnable> { // Paper - package -> public
MainThreadExecutor(Level world) {
super("Chunk source main thread executor for " + world.dimension().location());
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java b/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
index 6e0cf8ee76143301c939fc4af5eeb091abdcbc5c..066f03ee7b4feda9ec2b0984ee7cf63fa0b9e4fc 100644 index 6e0cf8ee76143301c939fc4af5eeb091abdcbc5c..066f03ee7b4feda9ec2b0984ee7cf63fa0b9e4fc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java --- a/src/main/java/net/minecraft/world/level/chunk/ChunkStatus.java
@ -255,10 +231,10 @@ index 357da4846344d1182ab7149c4d352d5019384715..832392cc2adc94e1fcb1055d91eb4655
this.padToFullSector(); this.padToFullSector();
} finally { } finally {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 211ab6cffe78c61fcff12ef7ffba904c4cae57b2..1bee455235ece8aa299a2baeede027d251e6ff57 100644 index ebb1a050beab9530942c4498335f084c89faef06..4ab881f0488af3577deda2f90a31a3f9243306dc 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
@@ -143,6 +143,7 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final @@ -143,6 +143,7 @@ public class RegionFileStorage implements AutoCloseable {
try { try {
NbtIo.write(nbt, (DataOutput) dataoutputstream); NbtIo.write(nbt, (DataOutput) dataoutputstream);
@ -266,7 +242,7 @@ index 211ab6cffe78c61fcff12ef7ffba904c4cae57b2..1bee455235ece8aa299a2baeede027d2
} catch (Throwable throwable) { } catch (Throwable throwable) {
if (dataoutputstream != null) { if (dataoutputstream != null) {
try { try {
@@ -205,3 +206,4 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final @@ -205,3 +206,4 @@ public class RegionFileStorage implements AutoCloseable {
} }
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1dabdba428c10e65b634b6e2036f993c4be186a7..5def2e0379373b126a1b2281b0859b39443fc4ac 100644 index 1460a3185d557acfe695d46b4254a2a573cb7323..084156e1014647d8f4bfce271e114c47b1a09a81 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3548,15 +3548,18 @@ public abstract class LivingEntity extends Entity { @@ -3547,15 +3547,18 @@ public abstract class LivingEntity extends Entity {
this.entityData.set(LivingEntity.DATA_LIVING_ENTITY_FLAGS, (byte) j); this.entityData.set(LivingEntity.DATA_LIVING_ENTITY_FLAGS, (byte) j);
} }
@ -31,7 +31,7 @@ index 1dabdba428c10e65b634b6e2036f993c4be186a7..5def2e0379373b126a1b2281b0859b39
} }
} }
@@ -3629,6 +3632,7 @@ public abstract class LivingEntity extends Entity { @@ -3628,6 +3631,7 @@ public abstract class LivingEntity extends Entity {
this.releaseUsingItem(); this.releaseUsingItem();
} else { } else {
if (!this.useItem.isEmpty() && this.isUsingItem()) { if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -39,7 +39,7 @@ index 1dabdba428c10e65b634b6e2036f993c4be186a7..5def2e0379373b126a1b2281b0859b39
this.triggerItemUseEffects(this.useItem, 16); this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent // CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack; ItemStack itemstack;
@@ -3663,8 +3667,8 @@ public abstract class LivingEntity extends Entity { @@ -3662,8 +3666,8 @@ public abstract class LivingEntity extends Entity {
} }
this.stopUsingItem(); this.stopUsingItem();

View File

@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating.
Change to also use a time check instead if it passes. Change to also use a time check instead if it passes.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 5def2e0379373b126a1b2281b0859b39443fc4ac..f48435dc344fb48feb48e2a141b394829058c5c4 100644 index 084156e1014647d8f4bfce271e114c47b1a09a81..5f73418035ac1226c6b655b654367ff9cf9f0841 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3492,6 +3492,11 @@ public abstract class LivingEntity extends Entity { @@ -3491,6 +3491,11 @@ public abstract class LivingEntity extends Entity {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
} }
@ -22,7 +22,7 @@ index 5def2e0379373b126a1b2281b0859b39443fc4ac..f48435dc344fb48feb48e2a141b39482
private void updatingUsingItem() { private void updatingUsingItem() {
if (this.isUsingItem()) { if (this.isUsingItem()) {
if (ItemStack.isSameIgnoreDurability(this.getItemInHand(this.getUsedItemHand()), this.useItem)) { if (ItemStack.isSameIgnoreDurability(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
@@ -3509,8 +3514,12 @@ public abstract class LivingEntity extends Entity { @@ -3508,8 +3513,12 @@ public abstract class LivingEntity extends Entity {
if (this.shouldTriggerItemUseEffects()) { if (this.shouldTriggerItemUseEffects()) {
this.triggerItemUseEffects(stack, 5); this.triggerItemUseEffects(stack, 5);
} }
@ -37,7 +37,7 @@ index 5def2e0379373b126a1b2281b0859b39443fc4ac..f48435dc344fb48feb48e2a141b39482
this.completeUsingItem(); this.completeUsingItem();
} }
@@ -3556,7 +3565,10 @@ public abstract class LivingEntity extends Entity { @@ -3555,7 +3564,10 @@ public abstract class LivingEntity extends Entity {
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag
this.useItem = itemstack; this.useItem = itemstack;
@ -49,7 +49,7 @@ index 5def2e0379373b126a1b2281b0859b39443fc4ac..f48435dc344fb48feb48e2a141b39482
if (!this.level.isClientSide) { if (!this.level.isClientSide) {
this.setLivingEntityFlag(1, true); this.setLivingEntityFlag(1, true);
this.setLivingEntityFlag(2, enumhand == InteractionHand.OFF_HAND); this.setLivingEntityFlag(2, enumhand == InteractionHand.OFF_HAND);
@@ -3580,7 +3592,10 @@ public abstract class LivingEntity extends Entity { @@ -3579,7 +3591,10 @@ public abstract class LivingEntity extends Entity {
} }
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) { } else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
this.useItem = ItemStack.EMPTY; this.useItem = ItemStack.EMPTY;
@ -61,7 +61,7 @@ index 5def2e0379373b126a1b2281b0859b39443fc4ac..f48435dc344fb48feb48e2a141b39482
} }
} }
@@ -3706,7 +3721,10 @@ public abstract class LivingEntity extends Entity { @@ -3705,7 +3720,10 @@ public abstract class LivingEntity extends Entity {
} }
this.useItem = ItemStack.EMPTY; this.useItem = ItemStack.EMPTY;

View File

@ -14,7 +14,7 @@ Adds flying monsters to control ghast and phantoms
Adds villagers as separate config Adds villagers as separate config
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index fe98fa03548922903e4fb352fbdfeeaac87450df..8d72e68fe8f7d0a770264f54c539ea11f5e1d8da 100644 index 30ccb9c0ffabfe5536c89d1dafb97afb467371a7..9514eace33ef9de9a1d92f602549552456dc4ceb 100644
--- 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
@@ -2,7 +2,6 @@ package net.minecraft.server.level; @@ -2,7 +2,6 @@ package net.minecraft.server.level;
@ -124,18 +124,9 @@ index fe98fa03548922903e4fb352fbdfeeaac87450df..8d72e68fe8f7d0a770264f54c539ea11
} else { } else {
passenger.stopRiding(); passenger.stopRiding();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 434618dcb3d4261eb1db20b8f0807c9aba6b8332..9ebbcd15dee0141eca83187a85e0d9b0b5a0fa86 100644 index b2275c1171f52cbdf283d210c6488e974fa07d98..4ea2bea8641e08bb0350582efc8b43293703c453 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -277,7 +277,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
public boolean noCulling;
public boolean hasImpulse;
public int portalCooldown;
- protected boolean isInsidePortal;
+ public boolean isInsidePortal; // Paper - public
protected int portalTime;
protected BlockPos portalEntrancePos;
private boolean invulnerable;
@@ -306,6 +306,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -306,6 +306,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@ -167,7 +158,7 @@ index 434618dcb3d4261eb1db20b8f0807c9aba6b8332..9ebbcd15dee0141eca83187a85e0d9b0
movement = this.maybeBackOffFromEdge(movement, movementType); movement = this.maybeBackOffFromEdge(movement, movementType);
Vec3 vec3d1 = this.collide(movement); Vec3 vec3d1 = this.collide(movement);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f48435dc344fb48feb48e2a141b394829058c5c4..bd1cc5e6fea4b9a171718c1249f652782b7ce13e 100644 index 5f73418035ac1226c6b655b654367ff9cf9f0841..02609533a9c8ae70d50fa81bd0e42af6aca2ee62 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -219,7 +219,7 @@ public abstract class LivingEntity extends Entity { @@ -219,7 +219,7 @@ public abstract class LivingEntity extends Entity {
@ -180,18 +171,9 @@ index f48435dc344fb48feb48e2a141b394829058c5c4..bd1cc5e6fea4b9a171718c1249f65278
public float yya; public float yya;
public float zza; public float zza;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 1dcfab8776c9da4c461ebd98187b65bc6ed7dc4d..c9324245d18f8268191c0a89b465ef3054dd014d 100644 index 9c208d24d6f84e8818c0a7b88cdcb7c2fd703f91..623fd2220007eec7a8e799a647e7c657aae5ee6d 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -117,7 +117,7 @@ public abstract class Mob extends LivingEntity {
public ResourceLocation lootTable;
public long lootTableSeed;
@Nullable
- private Entity leashHolder;
+ public Entity leashHolder; // Paper - private -> public
private int delayedLeashHolderId;
@Nullable
private CompoundTag leashInfoTag;
@@ -198,6 +198,19 @@ public abstract class Mob extends LivingEntity { @@ -198,6 +198,19 @@ public abstract class Mob extends LivingEntity {
return this.lookControl; return this.lookControl;
} }
@ -225,7 +207,7 @@ index 920ae9af8985705a0ada7da5b7085a1ed8ca7f27..7c82d453388a27b69207d051dec316fc
protected PathfinderMob(EntityType<? extends PathfinderMob> type, Level world) { protected PathfinderMob(EntityType<? extends PathfinderMob> type, Level world) {
super(type, world); super(type, world);
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
index 70e5b4446a8485b5995a0ba26af3a86d9b79bcc7..f29ace7b6a27a602102d37d43a6dd0571f218dfe 100644 index dc7da3b806d1c759958d7c51b05efbc4b6c42653..69bf112655615337e0df3ea56b9e42fa5ff70430 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java --- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
@@ -31,6 +31,7 @@ public class GoalSelector { @@ -31,6 +31,7 @@ public class GoalSelector {
@ -709,7 +691,7 @@ index 84ce3d38d5decb4a2f9fae78e0ef5d715860dc7d..2ab585a018290996e7fa9ca6f3ad7d73
isActive = false; isActive = false;
} }
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 8e6eae7cc27f66faede9a3dc74571e1814df3652..308de0757c219c1e5fa8bde182343c4095301cde 100644 index 45be7d1821497f13ab0da3c4bbff7585238e902e..769a492305a3ce83e0da0b3de4ebd73859d1e1d9 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -180,13 +180,59 @@ public class SpigotWorldConfig @@ -180,13 +180,59 @@ public class SpigotWorldConfig

View File

@ -133,21 +133,8 @@ index 71ffa66973d8994e2a480435ac1ada3fe61600a4..7b5afc5d34b78e6404c1a5c6bb823d95
+ }, MinecraftServer.getServer()); + }, MinecraftServer.getServer());
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 56e292e6550b19d0cae9ebad369da730ca1cabd8..3653ec6f93d627092e63cede51f4db2e12b10613 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -312,7 +312,7 @@ public class ChunkHolder {
}
- private void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) {
+ public void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) { // Paper - private -> public
this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> {
entityplayer.connection.send(packet);
});
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 5473b22d21ea981f245f4826c4d47295890f88ef..480c361c919bbfbebacf9ac94418eac5ed38e233 100644 index 6d69f15d90e9096f0ee6cb7259effa87622c787b..fe0fd4e590f7ceb47467c692c81e2b3579596f4e 100644
--- 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
@@ -123,6 +123,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -123,6 +123,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider

View File

@ -1105,12 +1105,12 @@ index c28879f32b004f36ff746ea2274f91ddd9501e71..7762d8ff94f856d613a6f50311006b69
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 480c361c919bbfbebacf9ac94418eac5ed38e233..56dece64f19009583c94569c5713c2ad0c91ae17 100644 index fe0fd4e590f7ceb47467c692c81e2b3579596f4e..3a16316a8ecd658b2fbd473fa6ff14abe18e00de 100644
--- 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
@@ -1444,7 +1444,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1444,7 +1444,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) { public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
if (packets[0] == null) { if (packets[0] == null) {
- packets[0] = new ClientboundLevelChunkPacket(chunk); - packets[0] = new ClientboundLevelChunkPacket(chunk);
+ packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass + packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass
@ -1118,7 +1118,7 @@ index 480c361c919bbfbebacf9ac94418eac5ed38e233..56dece64f19009583c94569c5713c2ad
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e6ef6d9b6e9a674db1180cae6263537e57b843d3..c5070975be1ceeab20ad0b3bab790426adb5e5fa 100644 index 9514eace33ef9de9a1d92f602549552456dc4ceb..5a397c3f0f21ec8dc9b7ceecbc873cdf6843e203 100644
--- 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
@@ -292,7 +292,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -292,7 +292,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl

View File

@ -23,7 +23,7 @@ index f27fadc15cb7f5c782e45885ec6a5a69963beade..2ff4d4921e2076abf415bd3c8f5173ec
})); }));
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 51691d3dedf113d58f340b74d448c5e5375b5bed..b2f0102c2a15eb4324367f52e03e534bff883f9b 100644 index edb9952ddd014c92b9604a9a187fdcd46de8a04f..3e3097f23f775eec4107f5c2f3f2266f4250ba15 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -448,6 +448,11 @@ public class PaperWorldConfig { @@ -448,6 +448,11 @@ public class PaperWorldConfig {
@ -53,7 +53,7 @@ index bb0a07a280c7d4885165e9d6488e7741aaa7b47c..9c88426ab1275ee5fb6e28be8b213533
worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange); worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange);
worldData.addProperty("visible-chunk-count", visibleChunks.size()); worldData.addProperty("visible-chunk-count", visibleChunks.size());
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 3653ec6f93d627092e63cede51f4db2e12b10613..995d7977233f0d7683c00a75c3833f9a1eba7f92 100644 index 2aa86f35b8960273ad91b21e260bcf91cf861e08..8fff5580a88fd1643845967eb7bdab2630777e91 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -75,6 +75,17 @@ public class ChunkHolder { @@ -75,6 +75,17 @@ public class ChunkHolder {
@ -95,7 +95,7 @@ index 3653ec6f93d627092e63cede51f4db2e12b10613..995d7977233f0d7683c00a75c3833f9a
@@ -313,9 +324,48 @@ public class ChunkHolder { @@ -313,9 +324,48 @@ public class ChunkHolder {
} }
public void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) { // Paper - private -> public public void broadcast(Packet<?> packet, boolean onlyOnWatchDistanceEdge) {
- this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> { - this.playerProvider.getPlayers(this.pos, onlyOnWatchDistanceEdge).forEach((entityplayer) -> {
- entityplayer.connection.send(packet); - entityplayer.connection.send(packet);
- }); - });
@ -145,7 +145,7 @@ index 3653ec6f93d627092e63cede51f4db2e12b10613..995d7977233f0d7683c00a75c3833f9a
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) { public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 56dece64f19009583c94569c5713c2ad0c91ae17..b0cf6e186d7030b1aa9296671683bd33e2d15579 100644 index 3a16316a8ecd658b2fbd473fa6ff14abe18e00de..91930daa3c965dcc1cb50ae260c159be55f351ed 100644
--- 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
@@ -122,7 +122,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -122,7 +122,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -289,13 +289,11 @@ index 56dece64f19009583c94569c5713c2ad0c91ae17..b0cf6e186d7030b1aa9296671683bd33
}); });
return completablefuture1; return completablefuture1;
} }
@@ -962,28 +1044,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -963,27 +1045,34 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
} }
- protected void setViewDistance(int watchDistance) { public void setViewDistance(int watchDistance) {
- int j = Mth.clamp(watchDistance + 1, 3, 33); - int j = Mth.clamp(watchDistance + 1, 3, 33);
+ public void setViewDistance(int watchDistance) { // Paper - public
+ int j = Mth.clamp(watchDistance + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32 + int j = Mth.clamp(watchDistance + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32
if (j != this.viewDistance) { if (j != this.viewDistance) {
@ -348,6 +346,15 @@ index 56dece64f19009583c94569c5713c2ad0c91ae17..b0cf6e186d7030b1aa9296671683bd33
if (chunk != null) { if (chunk != null) {
this.playerLoadedChunk(player, packets, chunk); this.playerLoadedChunk(player, packets, chunk);
@@ -1091,7 +1180,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end
@Nullable
- public CompoundTag readChunk(ChunkPos pos) throws IOException { // Paper - private -> public
+ public CompoundTag readChunk(ChunkPos pos) throws IOException {
CompoundTag nbttagcompound = this.read(pos);
// Paper start - Cache chunk status on disk
if (nbttagcompound == null) {
@@ -1202,13 +1291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1202,13 +1291,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.removePlayerFromDistanceMaps(player); // Paper - distance maps this.removePlayerFromDistanceMaps(player); // Paper - distance maps
} }
@ -438,12 +445,11 @@ index 56dece64f19009583c94569c5713c2ad0c91ae17..b0cf6e186d7030b1aa9296671683bd33
+ // Paper end - per player view distance + // Paper end - per player view distance
} }
protected void addEntity(Entity entity) { public void addEntity(Entity entity) {
@@ -1442,7 +1562,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1442,6 +1562,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} }
- private void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
+ // Paper start + // Paper start
+ private static int getLightMask(final LevelChunk chunk) { + private static int getLightMask(final LevelChunk chunk) {
+ final net.minecraft.world.level.chunk.LevelChunkSection[] chunkSections = chunk.getSections(); + final net.minecraft.world.level.chunk.LevelChunkSection[] chunkSections = chunk.getSections();
@ -485,10 +491,9 @@ index 56dece64f19009583c94569c5713c2ad0c91ae17..b0cf6e186d7030b1aa9296671683bd33
+ } + }
+ // Paper end + // Paper end
+ +
+ public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) { // Paper - private -> public public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
if (packets[0] == null) { if (packets[0] == null) {
packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass packets[0] = new ClientboundLevelChunkPacket(chunk, chunk.level.chunkPacketBlockController.shouldModify(player, chunk)); // Paper - Ani-Xray - Bypass
packets[1] = new ClientboundLightUpdatePacket(chunk.getPos(), this.lightEngine, (BitSet) null, (BitSet) null, true);
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
index 45c7ebe67019cdbe88b6617a95d5c40d3a68286c..38eebda226e007c8910e04f502ce218cdfe1d456 100644 index 45c7ebe67019cdbe88b6617a95d5c40d3a68286c..38eebda226e007c8910e04f502ce218cdfe1d456 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java --- a/src/main/java/net/minecraft/server/level/DistanceManager.java
@ -514,7 +519,7 @@ index 45c7ebe67019cdbe88b6617a95d5c40d3a68286c..38eebda226e007c8910e04f502ce218c
if (withinViewDistance) { if (withinViewDistance) {
DistanceManager.this.ticketThrottlerInput.tell(ChunkTaskPriorityQueueSorter.message(() -> { DistanceManager.this.ticketThrottlerInput.tell(ChunkTaskPriorityQueueSorter.message(() -> {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 018632aa8b122f8c013579075615d88d712f4250..92a77fa90828cc4bc3d9217d2df37ffeec6ee58e 100644 index 54cc0391f77d90a206e9fb2422ea31d5b9ee22af..648e7b258eef32213c512781faffa840eedebec6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -241,6 +241,7 @@ public class ServerPlayer extends Player { @@ -241,6 +241,7 @@ public class ServerPlayer extends Player {
@ -557,7 +562,7 @@ index bcc946d2747443c34ee8ac2485a5ab41773c93af..2730923bd0bf3b0f928765b9e09e2299
while (iterator.hasNext()) { while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 687e3652d0f36a358a2348df845801ad82d8460c..4eee8156d193f59b7e28499f492f81247c4b1591 100644 index 5c30d06ac80bb9e82d5eecf58b692040c3a55a99..c71ca549c15d4f88053b8046feecab4ea6a724a4 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -527,8 +527,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -527,8 +527,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -576,7 +581,7 @@ index 687e3652d0f36a358a2348df845801ad82d8460c..4eee8156d193f59b7e28499f492f8124
if ((i & 1) != 0) { if ((i & 1) != 0) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index d4e11b552988f0ef28059f9aa2ca1f1897653171..f6b591f045ae992180806fd6aba309c0d04e722b 100644 index 164df6e9a91d9fbdbf6e4b835ea1946d81f3be55..a088cb005525fda2c9d5521ab3bac43cfa38a393 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -33,7 +33,10 @@ import net.minecraft.core.Registry; @@ -33,7 +33,10 @@ import net.minecraft.core.Registry;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index bd1cc5e6fea4b9a171718c1249f652782b7ce13e..6cc2d26403aa5074218b4b76e2d8ed9e8409a0ae 100644 index 02609533a9c8ae70d50fa81bd0e42af6aca2ee62..40e5324e19e91640ce39245d8d9f69850903f166 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3159,8 +3159,10 @@ public abstract class LivingEntity extends Entity { @@ -3158,8 +3158,10 @@ public abstract class LivingEntity extends Entity {
} else if (this.isInLava() && (!this.onGround || d7 > d8)) { } else if (this.isInLava() && (!this.onGround || d7 > d8)) {
this.jumpInLiquid((Tag) FluidTags.LAVA); this.jumpInLiquid((Tag) FluidTags.LAVA);
} else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) { } else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) {

View File

@ -8,7 +8,7 @@ This allows you to solve an issue in vanilla behavior where:
* On normal difficulty they will have a 50% of getting infected or dying. * On normal difficulty they will have a 50% of getting infected or dying.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a2b1e2c3c4bd958b6ec7b7de5561747d3a2075d2..c3f2cdedf7b9c2ff9e33b823cb20890cba0ded8a 100644 index fc1c65a4b3c3d5e52d967a3174d8373ddde95e4d..0c9aa7fb4d42c63c920a002050941299e3847d95 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -453,6 +453,11 @@ public class PaperWorldConfig { @@ -453,6 +453,11 @@ public class PaperWorldConfig {
@ -24,10 +24,10 @@ index a2b1e2c3c4bd958b6ec7b7de5561747d3a2075d2..c3f2cdedf7b9c2ff9e33b823cb20890c
private void lightQueueSize() { private void lightQueueSize() {
lightQueueSize = getInt("light-queue-size", lightQueueSize); lightQueueSize = getInt("light-queue-size", lightQueueSize);
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index ee17cba501e0cc4822bd1278d18b561c77fe9674..b036cbb9a1b6bcac91ffc8ee659fc95d6e04d5d4 100644 index 4c5213fe89ec131addcc3d705f2e3268f51f1868..299dc59535d2cd73de346618731c65bc01063b66 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -453,10 +453,13 @@ public class Zombie extends Monster { @@ -452,10 +452,13 @@ public class Zombie extends Monster {
@Override @Override
public void killed(ServerLevel world, LivingEntity other) { public void killed(ServerLevel world, LivingEntity other) {
super.killed(world, other); super.killed(world, other);

View File

@ -7,12 +7,12 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing. Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index d3f835a0c76ce559fb5f3c39714a3312c7e865d1..002561c87ddd03e8bc31864ddd9dee7bc2ff0931 100644 index ebcfe31c8395aa2bbcc9a9ac74d4c6e1f2e5d0f7..46976a0ef5098e6d794653078111a9dcc1a151d2 100644
--- 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
@@ -1466,6 +1466,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1466,6 +1466,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
protected void addEntity(Entity entity) { public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
+ // Paper start - ignore and warn about illegal addEntity calls instead of crashing server + // Paper start - ignore and warn about illegal addEntity calls instead of crashing server
+ if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) { + if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) {
@ -26,7 +26,7 @@ index d3f835a0c76ce559fb5f3c39714a3312c7e865d1..002561c87ddd03e8bc31864ddd9dee7b
EntityType<?> entitytypes = entity.getType(); EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16; int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index d037b14b34658e2f13d7e77f06576c406abc8a60..9cdfd1c8bce3adb5d3ad6d970c6f46ca75f3a952 100644 index 70de3413da219cc79a86e39893abc3f6f658f729..ba58d33810916bb8c3ac649f1e6e41354d17cde0 100644
--- 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
@@ -2120,7 +2120,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -2120,7 +2120,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl

View File

@ -70,7 +70,7 @@ index 9c88426ab1275ee5fb6e28be8b213533dc4ab859..87c9a5c1b43f6010898d72136b5eb997
List<ChunkHolder> allChunks = new ArrayList<>(visibleChunks.values()); List<ChunkHolder> allChunks = new ArrayList<>(visibleChunks.values());
List<ServerPlayer> players = world.players; List<ServerPlayer> players = world.players;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index acc30f1ff6a3a9c067e312dc7b6b6fc6bc6904fe..0882552526d4de189f3af8b72653d776cb596859 100644 index 46976a0ef5098e6d794653078111a9dcc1a151d2..1e366262306aedcd4b3236a6895d30fb35e3cc51 100644
--- 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
@@ -107,9 +107,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -107,9 +107,36 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -162,7 +162,7 @@ index acc30f1ff6a3a9c067e312dc7b6b6fc6bc6904fe..0882552526d4de189f3af8b72653d776
+ // Paper end + // Paper end
+ +
@Nullable @Nullable
public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public public ChunkHolder getVisibleChunkIfPresent(long pos) {
- return (ChunkHolder) this.visibleChunkMap.get(pos); - return (ChunkHolder) this.visibleChunkMap.get(pos);
+ // Paper start - mt safe get + // Paper start - mt safe get
+ if (Thread.currentThread() != this.level.thread) { + if (Thread.currentThread() != this.level.thread) {
@ -233,7 +233,7 @@ index acc30f1ff6a3a9c067e312dc7b6b6fc6bc6904fe..0882552526d4de189f3af8b72653d776
while (objectbidirectionaliterator.hasNext()) { while (objectbidirectionaliterator.hasNext()) {
Entry<ChunkHolder> entry = (Entry) objectbidirectionaliterator.next(); Entry<ChunkHolder> entry = (Entry) objectbidirectionaliterator.next();
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index a81c773cc281ba390d3ce44c52c43710b43829a5..34183527a23650706a9249ffac0182cb77b18086 100644 index 20a99b62b3466e4853e8d23576133dc728f7927f..302313f72b27fc4c58399c8c2d0bb3bf0cb1f8ab 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -766,7 +766,7 @@ public class ServerChunkCache extends ChunkSource { @@ -766,7 +766,7 @@ public class ServerChunkCache extends ChunkSource {

View File

@ -10,7 +10,7 @@ larger than the keep loaded range.
By skipping this, we avoid potential for a large spike on server start. By skipping this, we avoid potential for a large spike on server start.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8fc75890eb7342ff9339789434b031ef9a6a5000..58da115a0c2f34c63ae3614acb0d6f8711069e7b 100644 index e4a5b89a12c52ccca4f72823e8d7a5d5a689ff16..10489f6f76c1ac64365b677acda43efe640093c6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -309,7 +309,7 @@ public class ServerPlayer extends Player { @@ -309,7 +309,7 @@ public class ServerPlayer extends Player {
@ -22,15 +22,6 @@ index 8fc75890eb7342ff9339789434b031ef9a6a5000..58da115a0c2f34c63ae3614acb0d6f87
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
@@ -360,7 +360,7 @@ public class ServerPlayer extends Player {
}
// CraftBukkit end
- private void fudgeSpawnLocation(ServerLevel world) {
+ public void fudgeSpawnLocation(ServerLevel world) { // Paper - private -> public
BlockPos blockposition = world.getSharedSpawnPos();
if (world.dimensionType().hasSkyLight() && world.serverLevelData.getGameType() != GameType.ADVENTURE) { // CraftBukkit
@@ -528,7 +528,7 @@ public class ServerPlayer extends Player { @@ -528,7 +528,7 @@ public class ServerPlayer extends Player {
position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos()); position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos());
} }

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format. Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index ad8d6a84e1a66e03ae15269e36bc787148f12396..88d5c7a0d7de2e896433d85fbd5425351f51b64d 100644 index ad8d6a84e1a66e03ae15269e36bc787148f12396..d18f8d7c699893740fa709ef1f0caa4390e7eb20 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -378,6 +378,46 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -378,6 +378,46 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -20,7 +20,7 @@ index ad8d6a84e1a66e03ae15269e36bc787148f12396..88d5c7a0d7de2e896433d85fbd542535
+ Preconditions.checkArgument(item.getType() != Material.AIR, "air cannot be serialized"); + Preconditions.checkArgument(item.getType() != Material.AIR, "air cannot be serialized");
+ +
+ java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream(); + java.io.ByteArrayOutputStream outputStream = new java.io.ByteArrayOutputStream();
+ CompoundTag compound = (item instanceof CraftItemStack ? ((CraftItemStack) item).getHandle() : CraftItemStack.asNMSCopy(item)).save(new CompoundTag()); + CompoundTag compound = (item instanceof CraftItemStack ? ((CraftItemStack) item).handle : CraftItemStack.asNMSCopy(item)).save(new CompoundTag());
+ compound.putInt("DataVersion", getDataVersion()); + compound.putInt("DataVersion", getDataVersion());
+ try { + try {
+ net.minecraft.nbt.NbtIo.writeCompressed( + net.minecraft.nbt.NbtIo.writeCompressed(

View File

@ -50,12 +50,12 @@ index d92ddc8a4c0f5249b7ff4f97af1ea3db413b2983..8c2ec30a35e86f2b30863045b586a67e
public static enum Flag { public static enum Flag {
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
index f29ace7b6a27a602102d37d43a6dd0571f218dfe..bcb2c5480872eef6f21746003380f71b8d44f5c8 100644 index 69bf112655615337e0df3ea56b9e42fa5ff70430..faa53d08a12cc7441c670cae6d301de3f498ffe7 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java --- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
@@ -28,10 +28,12 @@ public class GoalSelector { @@ -28,10 +28,12 @@ public class GoalSelector {
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class); private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet(); public final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
private final Supplier<ProfilerFiller> profiler; private final Supplier<ProfilerFiller> profiler;
- private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); - private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class);
+ private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. + private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.

View File

@ -7,10 +7,10 @@ Will not run if max entity craming is disabled and
the max collisions per entity is less than or equal to 0 the max collisions per entity is less than or equal to 0
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6cc2d26403aa5074218b4b76e2d8ed9e8409a0ae..0fd79c399e723b5a9db04c8f2fe7b6ec66c0cf44 100644 index 40e5324e19e91640ce39245d8d9f69850903f166..6d5323acfe22bb6fa8c84ef7ff32fdfc2e4d5f9c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3256,10 +3256,16 @@ public abstract class LivingEntity extends Entity { @@ -3255,10 +3255,16 @@ public abstract class LivingEntity extends Entity {
protected void serverAiStep() {} protected void serverAiStep() {}
protected void pushEntities() { protected void pushEntities() {

View File

@ -85,7 +85,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 37fcc83cbaf8e80809c994b18f5a7f3f6d807202..efc6e03e86867665fc655e5a3e0f154af066ef24 100644 index c8adcdbb8075ab8a1645c4dd809f7de31ad13d34..9500fb90db765095afb1ecd91bbef6099cdc7a4b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1802,6 +1802,7 @@ public class ServerPlayer extends Player { @@ -1802,6 +1802,7 @@ public class ServerPlayer extends Player {
@ -96,19 +96,6 @@ index 37fcc83cbaf8e80809c994b18f5a7f3f6d807202..efc6e03e86867665fc655e5a3e0f154a
// CraftBukkit start // CraftBukkit start
if (getMainArm() != packet.getMainHand()) { if (getMainArm() != packet.getMainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index a3d31cec6d1b8de700b6cd2f7f51398debef5b6d..b916f629c2a0fb018cba19aaa612cbbcbb597dc1 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -144,7 +144,7 @@ public abstract class Player extends LivingEntity {
private static final int FLY_ACHIEVEMENT_SPEED = 25;
private static final EntityDataAccessor<Float> DATA_PLAYER_ABSORPTION_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.FLOAT);
private static final EntityDataAccessor<Integer> DATA_SCORE_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.INT);
- protected static final EntityDataAccessor<Byte> DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE);
+ public static final EntityDataAccessor<Byte> DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); // Paper - protected -> public
protected static final EntityDataAccessor<Byte> DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE);
protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG);
protected static final EntityDataAccessor<CompoundTag> DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2ed7920b0e046bc9d581878a10b04ad784bb8655..0a6d6ea67eaf8b2a59ec45fb3ffb85096f509997 100644 index 2ed7920b0e046bc9d581878a10b04ad784bb8655..0a6d6ea67eaf8b2a59ec45fb3ffb85096f509997 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

View File

@ -28,18 +28,9 @@ receives a deterministic result, and should no longer require 1 tick
delays anymore. delays anymore.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index dede8863193423858f6d60cc942919e52f28b607..4fe5b75661de64474698495776ebb8232fd252aa 100644 index 874b7d4947d452c64b7a2f37c3091ba7aed18c4d..b64a3dd03a22542b070eae34f0eaa9b321dca4ec 100644
--- 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
@@ -1550,7 +1550,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end - per player view distance
}
- protected void addEntity(Entity entity) {
+ public void addEntity(Entity entity) { // Paper - protected -> public
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
// Paper start - ignore and warn about illegal addEntity calls instead of crashing server
if (!entity.valid || entity.level != this.level || this.entityMap.containsKey(entity.getId())) {
@@ -1559,6 +1559,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -1559,6 +1559,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
.printStackTrace(); .printStackTrace();
return; return;
@ -49,7 +40,7 @@ index dede8863193423858f6d60cc942919e52f28b607..4fe5b75661de64474698495776ebb823
if (!(entity instanceof EnderDragonPart)) { if (!(entity instanceof EnderDragonPart)) {
EntityType<?> entitytypes = entity.getType(); EntityType<?> entitytypes = entity.getType();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index efc6e03e86867665fc655e5a3e0f154af066ef24..488b45d8b8d3c10b72cd0529a494ea408be58c4c 100644 index 9500fb90db765095afb1ecd91bbef6099cdc7a4b..63f20e7adf80a1b81438262087e33c3a1e63ca7f 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -237,6 +237,7 @@ public class ServerPlayer extends Player { @@ -237,6 +237,7 @@ public class ServerPlayer extends Player {

View File

@ -4,21 +4,8 @@ Date: Sun, 19 Apr 2020 04:28:29 -0400
Subject: [PATCH] Load Chunks for Login Asynchronously Subject: [PATCH] Load Chunks for Login Asynchronously
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 60cdb1f5c3f329b417f340f1d2651d89c244e439..3d1c4f8e0db37c6dabece657a17595e7bf1e3dc2 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -630,7 +630,7 @@ public class ServerChunkCache extends ChunkSource {
return this.mainThreadProcessor.pollTask();
}
- boolean runDistanceManagerUpdates() {
+ public boolean runDistanceManagerUpdates() { // Paper - packate-private -> public
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
boolean flag1 = this.chunkMap.promoteChunkMap();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 488b45d8b8d3c10b72cd0529a494ea408be58c4c..61f9eda59684c08884c4a621effb1705db592a53 100644 index 63f20e7adf80a1b81438262087e33c3a1e63ca7f..f0d574307b24d19d3006e5c53b650c75436bde38 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -172,6 +172,7 @@ public class ServerPlayer extends Player { @@ -172,6 +172,7 @@ public class ServerPlayer extends Player {
@ -50,7 +37,7 @@ index be677d437d17b74c6188ce1bd5fc6fdc228fd92f..78fbb4c3e52e900956ae0811aaf934c8
public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1); public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1);
public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit
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/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 85a82c8bb98edec526260680ddfbcb36926b97ee..10e4be89803bcdcc8bf7ce64350464c826368ae7 100644 index 2e7b909750ee512dce40b8574dfb62ed68fbbfb6..0d8a8b3d7a13e2384f8614bdc190768c03bb98c2 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
@@ -221,6 +221,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -221,6 +221,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
@ -87,7 +74,7 @@ index 85a82c8bb98edec526260680ddfbcb36926b97ee..10e4be89803bcdcc8bf7ce64350464c8
this.server.getProfiler().push("keepAlive"); this.server.getProfiler().push("keepAlive");
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 46432534fddbbf78e3bf46385b9638d2f92c951f..49308829885a473906d58fb17797127faabfcf31 100644 index 477117affabfe07d52d3b40404613492b0bcdc56..3a7cc4f8ee62c8ff726ecf3e669c9f9ba5651487 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -88,7 +88,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -88,7 +88,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@ -263,7 +250,7 @@ index 3a13c151066c8784fdc844e1d6310f77ff32e7f1..c4242a1602bbb02541c330bc02016f15
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 07630fabdc3e824572d7f551f3a876133fc253fe..e9f7191fefa7c0cf33d56abb7b2a30df261a392c 100644 index 581f80c490932f66f57e7a91d8738e09521f5a1c..20f861c99b11844849d75ce4606abee80da147de 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1491,7 +1491,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -1491,7 +1491,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 0fd79c399e723b5a9db04c8f2fe7b6ec66c0cf44..3a83cbe8fb1a5bfc7e7b699686b92561bf0cdba0 100644 index 6d5323acfe22bb6fa8c84ef7ff32fdfc2e4d5f9c..be3fd03803bef6de0a4667b1794e73287288feb7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2033,7 +2033,16 @@ public abstract class LivingEntity extends Entity { @@ -2032,7 +2032,16 @@ public abstract class LivingEntity extends Entity {
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) { if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {

View File

@ -565,7 +565,7 @@ index 0000000000000000000000000000000000000000..ee500489fca34c339175b5209ebcf341
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/PaperMobGoals.java b/src/main/java/com/destroystokyo/paper/entity/ai/PaperMobGoals.java diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/PaperMobGoals.java b/src/main/java/com/destroystokyo/paper/entity/ai/PaperMobGoals.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..a17a8d8ced942e6e3f9072f199c75391dd57dc6a index 0000000000000000000000000000000000000000..2f9e87d37a8ca794b12098232836295aadd80aff
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/PaperMobGoals.java +++ b/src/main/java/com/destroystokyo/paper/entity/ai/PaperMobGoals.java
@@ -0,0 +1,221 @@ @@ -0,0 +1,221 @@
@ -603,7 +603,7 @@ index 0000000000000000000000000000000000000000..a17a8d8ced942e6e3f9072f199c75391
+ getHandle(craftMob, goal.getTypes()).removeGoal(((PaperVanillaGoal<?>) goal).getHandle()); + getHandle(craftMob, goal.getTypes()).removeGoal(((PaperVanillaGoal<?>) goal).getHandle());
+ } else { + } else {
+ List<net.minecraft.world.entity.ai.goal.Goal> toRemove = new LinkedList<>(); + List<net.minecraft.world.entity.ai.goal.Goal> toRemove = new LinkedList<>();
+ for (WrappedGoal item : getHandle(craftMob, goal.getTypes()).availableGoals()) { + for (WrappedGoal item : getHandle(craftMob, goal.getTypes()).availableGoals) {
+ if (item.getGoal() instanceof PaperCustomGoal) { + if (item.getGoal() instanceof PaperCustomGoal) {
+ //noinspection unchecked + //noinspection unchecked
+ if (((PaperCustomGoal<T>) item.getGoal()).getHandle() == goal) { + if (((PaperCustomGoal<T>) item.getGoal()).getHandle() == goal) {
@ -683,7 +683,7 @@ index 0000000000000000000000000000000000000000..a17a8d8ced942e6e3f9072f199c75391
+ public <T extends Mob> Collection<Goal<T>> getAllGoals(T mob, GoalType type) { + public <T extends Mob> Collection<Goal<T>> getAllGoals(T mob, GoalType type) {
+ CraftMob craftMob = (CraftMob) mob; + CraftMob craftMob = (CraftMob) mob;
+ Set<Goal<T>> goals = new HashSet<>(); + Set<Goal<T>> goals = new HashSet<>();
+ for (WrappedGoal item : getHandle(craftMob, type).availableGoals()) { + for (WrappedGoal item : getHandle(craftMob, type).availableGoals) {
+ if (!item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) { + if (!item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) {
+ continue; + continue;
+ } + }
@ -707,7 +707,7 @@ index 0000000000000000000000000000000000000000..a17a8d8ced942e6e3f9072f199c75391
+ if (internalType == type) { + if (internalType == type) {
+ continue; + continue;
+ } + }
+ for (WrappedGoal item : getHandle(craftMob, internalType).availableGoals()) { + for (WrappedGoal item : getHandle(craftMob, internalType).availableGoals) {
+ if (item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) { + if (item.getGoal().getGoalTypes().hasElement(MobGoalHelper.paperToVanilla(type))) {
+ continue; + continue;
+ } + }
@ -919,19 +919,6 @@ index 8c2ec30a35e86f2b30863045b586a67e485c624b..a20faf55488baa31d7f8bf8231e3e825
MOVE, MOVE,
LOOK, LOOK,
JUMP, JUMP,
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
index bcb2c5480872eef6f21746003380f71b8d44f5c8..bcd0da029edd9b1d6f3617ee20dac00c9890ae82 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
@@ -26,7 +26,7 @@ public class GoalSelector {
}
};
private final Map<Goal.Flag, WrappedGoal> lockedFlags = new EnumMap<>(Goal.Flag.class);
- private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet();
+ private final Set<WrappedGoal> availableGoals = Sets.newLinkedHashSet(); public final Set<WrappedGoal> availableGoals() { return this.availableGoals; } // Paper - public getter
private final Supplier<ProfilerFiller> profiler;
private final EnumSet<Goal.Flag> disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<net.minecraft.world.entity.ai.goal.Goal.Flag> goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 130ab05393a7136020e06ec199256a031ba66091..8dd93620a770855450ed222dad6572e20760b08c 100644 index 130ab05393a7136020e06ec199256a031ba66091..8dd93620a770855450ed222dad6572e20760b08c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

View File

@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..0f10c333d88f2e1c56a6c7f22d421084
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java diff --git a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
index 07ecb01d02f64e85d478995062a33b58c211ed7e..e316f83a7adc7bba06a6a3fdab55cc9c004cb835 100644 index 2e342e1c258180dc02080f76385351c0a65eade2..39c0fbae8b94dabd27ee8687015557c6a9279813 100644
--- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java --- a/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
+++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java +++ b/src/main/java/net/minecraft/world/entity/ai/gossip/GossipContainer.java
@@ -29,7 +29,7 @@ import net.minecraft.util.VisibleForDebug; @@ -29,7 +29,7 @@ import net.minecraft.util.VisibleForDebug;
@ -32,15 +32,6 @@ index 07ecb01d02f64e85d478995062a33b58c211ed7e..e316f83a7adc7bba06a6a3fdab55cc9c
@VisibleForDebug @VisibleForDebug
public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() { public Map<UUID, Object2IntMap<GossipType>> getGossipEntries() {
@@ -177,7 +177,7 @@ public class GossipContainer {
return i > type.max ? Math.max(type.max, left) : i;
}
- static class EntityGossips {
+ public static class EntityGossips { // Paper - make public
final Object2IntMap<GossipType> entries = new Object2IntOpenHashMap<>();
public int weightedValue(Predicate<GossipType> gossipTypeFilter) {
@@ -228,6 +228,28 @@ public class GossipContainer { @@ -228,6 +228,28 @@ public class GossipContainer {
public void remove(GossipType gossipType) { public void remove(GossipType gossipType) {
this.entries.removeInt(gossipType); this.entries.removeInt(gossipType);

View File

@ -69,7 +69,7 @@ index 18ae2e2b339d357fbe0f6f2b18bc14c0dfe4c222..782301661f739192798ca6ef501b184b
} }
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 1f67c9c5f7161ea687983e7ae0ec7d259da9acd3..6a1c000d693031f0c537112963cfa52e22463f1d 100644 index c1db5cc45dbc7dd24a1ef4dbf88a8efb6c7f2d57..7a87258d1725348fe0c343540f6423885a97a560 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -327,7 +327,7 @@ index 1f67c9c5f7161ea687983e7ae0ec7d259da9acd3..6a1c000d693031f0c537112963cfa52e
} }
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 8982823efd8fd21d403c6c6fb158d57a9da67707..943c187efab8fdbcc38c313a498f876983a98412 100644 index 89f73e8a7f5b429c89d051b44ea6c9cbecb97730..08857bd5defc48eb2e91c1dc7c013a90443e9b7d 100644
--- 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
@@ -144,6 +144,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -144,6 +144,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -949,7 +949,7 @@ index d94241bcca4f2fd5e464a860bd356af504dc68b7..864c78ae0f0b3b50b8ea22b709c1f16b
public void runAllUpdates() { public void runAllUpdates() {
super.runAllUpdates(); super.runAllUpdates();
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 7ab28e9bd3f785838b7fa4ac5811c0e71cddcb61..d13abec908dbb756272888e9ccdedbefff719012 100644 index 08c3707e67b79de9347db9a66d3d68fedb09ab1d..76a3aafcc191cd4fd6ea43fc08e044a0a87a6ae5 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -446,6 +446,26 @@ public class ServerChunkCache extends ChunkSource { @@ -446,6 +446,26 @@ public class ServerChunkCache extends ChunkSource {
@ -1029,13 +1029,13 @@ index 7ab28e9bd3f785838b7fa4ac5811c0e71cddcb61..d13abec908dbb756272888e9ccdedbef
@@ -631,6 +662,7 @@ public class ServerChunkCache extends ChunkSource { @@ -631,6 +662,7 @@ public class ServerChunkCache extends ChunkSource {
} }
public boolean runDistanceManagerUpdates() { // Paper - packate-private -> public public boolean runDistanceManagerUpdates() {
+ if (distanceManager.delayDistanceManagerTick) return false; // Paper + if (distanceManager.delayDistanceManagerTick) return false; // Paper
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap); boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
boolean flag1 = this.chunkMap.promoteChunkMap(); boolean flag1 = this.chunkMap.promoteChunkMap();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index a01227f1b6d3589a6f56c9289824a1503a32c878..2bf25f90f760c1a5ee025a0ebaaccd9285a4db7f 100644 index d59e707f28a5f04545208ad33d122fc433b85933..8cbfcbc795c920420bd1906576dfc766910e9e62 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -183,6 +183,12 @@ public class ServerPlayer extends Player { @@ -183,6 +183,12 @@ public class ServerPlayer extends Player {
@ -1115,7 +1115,7 @@ index 8770fe0db46b01e8b608637df4f1a669a3f4cdde..3c1698ba0d3bc412ab957777d9b5211d
private final String name; private final String name;
private final Comparator<T> comparator; private final Comparator<T> comparator;
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/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c4a25ac9aad94c5ef610505db6d7539fa12cd31d..91a06e1ac325fe80aaadaf213d40495f4ce15e53 100644 index fecb2a6b8674ca110d6af539396873e9dcdc0edb..6476d2a478b85116061a13f7ef2a5fec2ade4a04 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
@@ -1566,6 +1566,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1566,6 +1566,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser

View File

@ -5,25 +5,9 @@ Subject: [PATCH] Add entity liquid API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 28f9b58c379306138f1528d91f2112c21ae9cb0a..0f37c205fe401126a19191fb5382cc1b4d3f43b4 100644 index d961faf2609ef820d27837b8f0bf6382f9ce97b6..6ae4da8ccff3627b37c4b0c0b65d23a37513fecc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1305,13 +1305,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
return this.wasTouchingWater;
}
- private boolean isInRain() {
+ public boolean isInRain() { // Paper - private -> public
BlockPos blockposition = this.blockPosition();
return this.level.isRainingAt(blockposition) || this.level.isRainingAt(new BlockPos((double) blockposition.getX(), this.getBoundingBox().maxY, (double) blockposition.getZ()));
}
- private boolean isInBubbleColumn() {
+ public boolean isInBubbleColumn() { // Paper - make public
return this.level.getBlockState(this.blockPosition()).is(Blocks.BUBBLE_COLUMN);
}
@@ -1319,7 +1319,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -1319,7 +1319,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
return this.isInWater() || this.isInRain(); return this.isInWater() || this.isInRain();
} }

View File

@ -67,16 +67,3 @@ index fe7851476636dfed02339d4d9f93824b96086769..24a2e88d083f90375c46cf948c7c89dc
Set<BlockPos> getTiles() { Set<BlockPos> getTiles() {
return this.tiles; return this.tiles;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index e9502acf47b94e529f3ce273add9b7e0f4fe6d72..a4c3e307e861e6c220425d35fe228dcb9dc7ef31 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -34,7 +34,7 @@ import org.bukkit.generator.ChunkGenerator.ChunkData;
public class CustomChunkGenerator extends InternalChunkGenerator {
- private final net.minecraft.world.level.chunk.ChunkGenerator delegate;
+ public final net.minecraft.world.level.chunk.ChunkGenerator delegate; // Paper - public
private final ChunkGenerator generator;
private final ServerLevel world;
private final Random random = new Random();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 3a83cbe8fb1a5bfc7e7b699686b92561bf0cdba0..8781b3ac40f214974ebb3e06c789f1717735d3a6 100644 index be3fd03803bef6de0a4667b1794e73287288feb7..42256b8c55c94f5c80834bf3a62b680b70c7cd10 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3353,7 +3353,7 @@ public abstract class LivingEntity extends Entity { @@ -3352,7 +3352,7 @@ public abstract class LivingEntity extends Entity {
Entity entity = this.getVehicle(); Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - suppress super.stopRiding(suppressCancellation); // Paper - suppress

View File

@ -959,7 +959,7 @@ index 0000000000000000000000000000000000000000..3728979e290ab031c9fe9eeb19a0f98d
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
index 2f7a34853fb52c840264ae9f01b3c598f1f92e96..881417b16c377572718fb3ed7c3db832ca7bf865 100644 index 4698b567ced720946b14bd3e03a5b6e0dcf401fb..cdc040c657bfc70bd5b2a2d8251d2b2a2e94ab55 100644
--- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java --- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -970,15 +970,6 @@ index 2f7a34853fb52c840264ae9f01b3c598f1f92e96..881417b16c377572718fb3ed7c3db832
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@@ -69,7 +71,7 @@ public class RedStoneWireBlock extends Block {
});
private static final float PARTICLE_DENSITY = 0.2F;
private final BlockState crossState;
- private boolean shouldSignal = true;
+ public boolean shouldSignal = true; // Paper private -> public
public RedStoneWireBlock(BlockBehaviour.Properties settings) {
super(settings);
@@ -256,6 +258,121 @@ public class RedStoneWireBlock extends Block { @@ -256,6 +258,121 @@ public class RedStoneWireBlock extends Block {
return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER); return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER);
} }

View File

@ -4,25 +4,6 @@ Date: Sun, 23 Aug 2020 15:28:35 +0200
Subject: [PATCH] Add more Evoker API Subject: [PATCH] Add more Evoker API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Evoker.java b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
index 2b09a864425160fadd05323006ddab0bab1d47c8..0400ced70839947532b90f546360701729244a73 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Evoker.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Evoker.java
@@ -125,12 +125,12 @@ public class Evoker extends SpellcasterIllager {
return SoundEvents.EVOKER_HURT;
}
- void setWololoTarget(@Nullable Sheep sheep) {
+ public void setWololoTarget(@Nullable Sheep sheep) { // Paper - make public
this.wololoTarget = sheep;
}
@Nullable
- Sheep getWololoTarget() {
+ public Sheep getWololoTarget() { // Paper - make public
return this.wololoTarget;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
index 91d07e6996e315734689ea25336992b0ed21cf25..7e861636710aa44ed36e7f20c6320dabb809c35d 100644 index 91d07e6996e315734689ea25336992b0ed21cf25..7e861636710aa44ed36e7f20c6320dabb809c35d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Destroy Speed API
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index aa81c0a4c02fd6f2ab900983fd8c9668fada802e..597ac36c6f6748ecfbf64920da172758814b8061 100644 index aa81c0a4c02fd6f2ab900983fd8c9668fada802e..2209587fbc4240561aeea6e525fbf22f5041e145 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -782,5 +782,23 @@ public class CraftBlock implements Block { @@ -782,5 +782,23 @@ public class CraftBlock implements Block {
@ -18,7 +18,7 @@ index aa81c0a4c02fd6f2ab900983fd8c9668fada802e..597ac36c6f6748ecfbf64920da172758
+ public float getDestroySpeed(ItemStack itemStack, boolean considerEnchants) { + public float getDestroySpeed(ItemStack itemStack, boolean considerEnchants) {
+ net.minecraft.world.item.ItemStack nmsItemStack; + net.minecraft.world.item.ItemStack nmsItemStack;
+ if (itemStack instanceof CraftItemStack) { + if (itemStack instanceof CraftItemStack) {
+ nmsItemStack = ((CraftItemStack) itemStack).getHandle(); + nmsItemStack = ((CraftItemStack) itemStack).handle;
+ } else { + } else {
+ nmsItemStack = CraftItemStack.asNMSCopy(itemStack); + nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
+ } + }

View File

@ -4,22 +4,6 @@ Date: Sun, 26 Jul 2020 14:44:09 +0200
Subject: [PATCH] More lightning API Subject: [PATCH] More lightning API
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
index e476bc8013ac199713e3aaae787bb61fab736aeb..fff23f1cd9da385781547664f26b59255487e2b1 100644
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
@@ -39,9 +39,9 @@ public class LightningBolt extends Entity {
private static final int START_LIFE = 2;
private static final double DAMAGE_RADIUS = 3.0D;
private static final double DETECTION_RADIUS = 15.0D;
- private int life;
+ public int life; // Paper - private -> public
public long seed;
- private int flashes;
+ public int flashes; // Paper - private -> public
public boolean visualOnly;
@Nullable
private ServerPlayer cause;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
index f7991ff14ef9cda0327b8621bf615b49cffd7ac5..db6b158f18ad7b9171a8c041802e3495d733bc16 100644 index f7991ff14ef9cda0327b8621bf615b49cffd7ac5..db6b158f18ad7b9171a8c041802e3495d733bc16 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java

View File

@ -21,7 +21,7 @@ index 19c42a9863341f1d06ad57e95049b3cd5b88aeb2..aef38974128c7986864571a3552a566a
private void keepLoadedRange() { private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index c3b05e73f9f42bdc2ab5d43fa905dd4cf5e39440..3ca07887bc67587cd820556d160037ca62c32c10 100644 index 2e2effe72235bda3c9ef985840d4322551625ed8..75860a8c0373d3675e3b7e20d7b427f787ebd16b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1704,6 +1704,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -1704,6 +1704,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@ -61,10 +61,10 @@ index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422
} else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) { } else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
return false; return false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8781b3ac40f214974ebb3e06c789f1717735d3a6..19ef1b2814270b9385ea15a89dac8c2613a672ee 100644 index 42256b8c55c94f5c80834bf3a62b680b70c7cd10..a64b2043a27261cbf6b12e8185e8a91fe6ffb468 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3271,7 +3271,7 @@ public abstract class LivingEntity extends Entity { @@ -3270,7 +3270,7 @@ public abstract class LivingEntity extends Entity {
return; return;
} }
// Paper end - don't run getEntities if we're not going to use its result // Paper end - don't run getEntities if we're not going to use its result
@ -73,7 +73,7 @@ index 8781b3ac40f214974ebb3e06c789f1717735d3a6..19ef1b2814270b9385ea15a89dac8c26
if (!list.isEmpty()) { if (!list.isEmpty()) {
// Paper - move up // Paper - move up
@@ -3438,9 +3438,16 @@ public abstract class LivingEntity extends Entity { @@ -3437,9 +3437,16 @@ public abstract class LivingEntity extends Entity {
return !this.isRemoved() && this.collides; // CraftBukkit return !this.isRemoved() && this.collides; // CraftBukkit
} }
@ -92,7 +92,7 @@ index 8781b3ac40f214974ebb3e06c789f1717735d3a6..19ef1b2814270b9385ea15a89dac8c26
// CraftBukkit start - collidable API // CraftBukkit start - collidable API
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index 7a7b566d781560a85e184a0e67977ba75e6262c5..4716ece9bd1db50c87ccadc44d9ea3c43e741338 100644 index 9cd91a73ae1a6ad550b9482db1fb7d72d7247c6e..153194d937d210e2e4fd8864e4a3c000f85d7e2e 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java --- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -83,7 +83,7 @@ public class Bat extends AmbientCreature { @@ -83,7 +83,7 @@ public class Bat extends AmbientCreature {
@ -120,7 +120,7 @@ index 23f87848b42d180c94b5659b184a768a756deed8..345fe87d5d6c3883c28d2c1b34d1020e
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
index c9e0d66443387f3f3e3999ee84d523550f48f573..d9699a422164c30a8386a8042202e1a8bc0ab2b0 100644 index 6ce4c3938fb5331b4d439c6a42a7bb5fffb1d0a0..ba58e066cca533dfed7610a730c4dd7423fe124d 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
@@ -240,7 +240,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @@ -240,7 +240,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
@ -133,7 +133,7 @@ index c9e0d66443387f3f3e3999ee84d523550f48f573..d9699a422164c30a8386a8042202e1a8
} }
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 5bfec185e15a54ee5fe6eab1aa59d1963d046262..d098d9f9280d2e08596491264a46a8978aaeaca7 100644 index 069cdfce085909991a69ebec3004d407526d469d..5fc66d7096afcfe63eba774e1dc330ac3263e4b0 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -345,7 +345,7 @@ public class ArmorStand extends LivingEntity { @@ -345,7 +345,7 @@ public class ArmorStand extends LivingEntity {

View File

@ -37,10 +37,10 @@ index 3d8f3e22223e4effeaf52cb18c14c60276d4689c..6b4163f5601a0961055c8451ec7ef220
LocalDate localdate = LocalDate.now(); LocalDate localdate = LocalDate.now();
int i = localdate.get(ChronoField.DAY_OF_MONTH); int i = localdate.get(ChronoField.DAY_OF_MONTH);
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 3125aad3b14a185bbd563827f07c15bbb1ef0895..03acacd30b84452733aa2bdeed515455a1f271f8 100644 index 15f445e7d7250f274351cc5e46cc952d3630de5a..6c4c5756def8eb368cbc6e9319ae6f7ddccf0499 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -497,7 +497,7 @@ public class Zombie extends Monster { @@ -496,7 +496,7 @@ public class Zombie extends Monster {
Object object = super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityNbt); Object object = super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityNbt);
float f = difficulty.getSpecialMultiplier(); float f = difficulty.getSpecialMultiplier();

View File

@ -59,18 +59,9 @@ index db9d8d1f30c671207617fc75c24b771cd7a23391..75b4da3d38912e52e7ca4d99d51bd97e
public int reedMaxHeight; public int reedMaxHeight;
public int bambooMaxHeight; public int bambooMaxHeight;
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
index dcaec42b0756cf36da813815b4a54e4d6c4e293a..53a9e4b0fda9f5a3b23a874c53d93fbe931b0cfb 100644 index e3f900153c10a01fd8b1ba346fe87880c958b76a..beb6943bcab48d914c32c5de07851eb1731005e2 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java --- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
@@ -48,7 +48,7 @@ import net.minecraft.world.level.ServerLevelAccessor;
public class Vindicator extends AbstractIllager {
private static final String TAG_JOHNNY = "Johnny";
- static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> {
+ public static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (difficulty) -> { // Paper - package private -> public
return difficulty == Difficulty.NORMAL || difficulty == Difficulty.HARD;
};
private boolean isJohnny; public boolean isJohnny() { return this.isJohnny; } public void setJohnny(boolean johnny) { this.isJohnny = johnny; } // Paper - OBFHELPER
@@ -195,7 +195,7 @@ public class Vindicator extends AbstractIllager { @@ -195,7 +195,7 @@ public class Vindicator extends AbstractIllager {
static class VindicatorBreakDoorGoal extends BreakDoorGoal { static class VindicatorBreakDoorGoal extends BreakDoorGoal {
@ -81,18 +72,9 @@ index dcaec42b0756cf36da813815b4a54e4d6c4e293a..53a9e4b0fda9f5a3b23a874c53d93fbe
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 03acacd30b84452733aa2bdeed515455a1f271f8..9e535cf3293cf624b1e2e1b7fb40a446b888b099 100644 index 6c4c5756def8eb368cbc6e9319ae6f7ddccf0499..bb3b932c57fd1e5b1517940c7602c7f4aeeaf17e 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -88,7 +88,7 @@ public class Zombie extends Monster {
public static final int REINFORCEMENT_RANGE_MAX = 40;
public static final int REINFORCEMENT_RANGE_MIN = 7;
private static final float BREAK_DOOR_CHANCE = 0.1F;
- private static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (enumdifficulty) -> {
+ public static final Predicate<Difficulty> DOOR_BREAKING_PREDICATE = (enumdifficulty) -> { // Paper - private -> public
return enumdifficulty == Difficulty.HARD;
};
private final BreakDoorGoal breakDoorGoal;
@@ -100,7 +100,7 @@ public class Zombie extends Monster { @@ -100,7 +100,7 @@ public class Zombie extends Monster {
public Zombie(EntityType<? extends Zombie> type, Level world) { public Zombie(EntityType<? extends Zombie> type, Level world) {

View File

@ -17,7 +17,7 @@ index 51bbb11ff8d3da95fa6d9890be3135a34b3eafac..c8213692e658f6eb82d3bd843b9525ff
this.profiler.push(() -> { this.profiler.push(() -> {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index d5cfcba5e9a496deafa32f162b6ef634eae06214..103d32b360095c179e681bd354d0b9316b050339 100644 index a988dcc693ab7f42fac39c4e4b5734ee1a1d72d4..a8576bbf964a9eab61c5b2ab7a8fba4be516b9ad 100644
--- 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
@@ -200,6 +200,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl @@ -200,6 +200,7 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
@ -29,10 +29,10 @@ index d5cfcba5e9a496deafa32f162b6ef634eae06214..103d32b360095c179e681bd354d0b931
return new Throwable(entity + " Added to world at " + new java.util.Date()); return new Throwable(entity + " Added to world at " + new java.util.Date());
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 19ef1b2814270b9385ea15a89dac8c2613a672ee..8c3fb37c511ada39dafdd19fa85e21a1b458386b 100644 index a64b2043a27261cbf6b12e8185e8a91fe6ffb468..caf1607e5ed4d76469a5c8db7356e5911853c5d9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3217,6 +3217,20 @@ public abstract class LivingEntity extends Entity { @@ -3216,6 +3216,20 @@ public abstract class LivingEntity extends Entity {
this.pushEntities(); this.pushEntities();
this.level.getProfiler().pop(); this.level.getProfiler().pop();

View File

@ -9,10 +9,10 @@ till their item is switched.
This patch clears the active item when the event is cancelled This patch clears the active item when the event is cancelled
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 8c3fb37c511ada39dafdd19fa85e21a1b458386b..b954fcfcf3bd3c55ca856126670fa6967d525fe3 100644 index caf1607e5ed4d76469a5c8db7356e5911853c5d9..60a7f238c721551e00f2eb60990a5d9743a8a3a7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3696,6 +3696,7 @@ public abstract class LivingEntity extends Entity { @@ -3695,6 +3695,7 @@ public abstract class LivingEntity extends Entity {
level.getCraftServer().getPluginManager().callEvent(event); level.getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) { if (event.isCancelled()) {

View File

@ -317,10 +317,10 @@ index c820cc7f3be693f445937a157ac2477e36f906b4..ac7d3da1ca3b41e37daacb1386566761
return this.world; return this.world;
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 1bee455235ece8aa299a2baeede027d251e6ff57..60ae9395591c81aebaa4be1541380a8fe921ce68 100644 index 4ab881f0488af3577deda2f90a31a3f9243306dc..638ccec03c11f9ed9f502271b830f100899a97d7 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
@@ -29,6 +29,28 @@ public class RegionFileStorage implements AutoCloseable { // Paper - no final @@ -29,6 +29,28 @@ public class RegionFileStorage implements AutoCloseable {
} }
// Paper start // Paper start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add more line of sight methods
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index b954fcfcf3bd3c55ca856126670fa6967d525fe3..cf7588aa282709a7b8ce6caff4aa713d54280660 100644 index 60a7f238c721551e00f2eb60990a5d9743a8a3a7..e946981ccb07c94072f9470d1b8a00d0f9b6778b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3424,6 +3424,7 @@ public abstract class LivingEntity extends Entity { @@ -3423,6 +3423,7 @@ public abstract class LivingEntity extends Entity {
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ()); Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ()); Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());