mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
More work
This commit is contained in:
parent
062733b903
commit
908c938d0c
93 changed files with 7008 additions and 233 deletions
|
@ -16,6 +16,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.GenericFutureListener;
|
import io.netty.util.concurrent.GenericFutureListener;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ShortMap;
|
import it.unimi.dsi.fastutil.ints.Int2ShortMap;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.nbt.NBTTagString;
|
||||||
|
import net.minecraft.network.NetworkManager;
|
||||||
|
+import net.minecraft.network.PacketDataSerializer;
|
||||||
|
import net.minecraft.network.chat.ChatComponentText;
|
||||||
|
import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.ChatMessageType;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80);
|
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80);
|
||||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||||
|
@ -75,7 +83,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper start - brand support
|
+ // Paper start - brand support
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public String getClientBrandName() {
|
+ public String getClientBrandName() {
|
||||||
+ return getHandle().playerConnection.getClientBrandName();
|
+ return getHandle().playerConnection != null ? getHandle().playerConnection.getClientBrandName() : null;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: DigitalRegent <misterwener@gmail.com>
|
|
||||||
Date: Sat, 11 Apr 2020 13:10:58 +0200
|
|
||||||
Subject: [PATCH] Brand support
|
|
||||||
|
|
||||||
TODO(Proximyst): Fixup this into the other brand support patch
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
||||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
||||||
// Paper start - brand support
|
|
||||||
@Override
|
|
||||||
public String getClientBrandName() {
|
|
||||||
- return getHandle().playerConnection.getClientBrandName();
|
|
||||||
+ return getHandle().playerConnection != null ? getHandle().playerConnection.getClientBrandName() : null;
|
|
||||||
}
|
|
||||||
// Paper end
|
|
||||||
|
|
|
@ -4,10 +4,39 @@ Date: Wed, 21 Dec 2016 11:47:25 -0600
|
||||||
Subject: [PATCH] Add API methods to control if armour stands can move
|
Subject: [PATCH] Add API methods to control if armour stands can move
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.ai.control.ControllerLook;
|
||||||
|
import net.minecraft.world.entity.ai.control.ControllerMove;
|
||||||
|
import net.minecraft.world.entity.ai.control.EntityAIBodyControl;
|
||||||
|
import net.minecraft.world.entity.ai.goal.PathfinderGoal;
|
||||||
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat;
|
||||||
|
import net.minecraft.world.entity.ai.goal.PathfinderGoalSelector;
|
||||||
|
import net.minecraft.world.entity.ai.navigation.Navigation;
|
||||||
|
import net.minecraft.world.entity.ai.navigation.NavigationAbstract;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.ai.sensing.EntitySenses;
|
||||||
|
import net.minecraft.world.entity.decoration.EntityHanging;
|
||||||
|
import net.minecraft.world.entity.decoration.EntityLeash;
|
||||||
|
import net.minecraft.world.entity.item.EntityItem;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityBlaze;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityEnderman;
|
||||||
|
import net.minecraft.world.entity.monster.IMonster;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
|
--- a/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/EntityArmorStand.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.EntitySize;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
|
import net.minecraft.world.entity.EnumItemSlot;
|
||||||
|
import net.minecraft.world.entity.EnumMainHand;
|
||||||
|
+import net.minecraft.world.entity.EnumMoveType;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityArrow;
|
||||||
|
import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
|
||||||
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
@@ -0,0 +0,0 @@ public class EntityArmorStand extends EntityLiving {
|
||||||
public Vector3f rightArmPose;
|
public Vector3f rightArmPose;
|
||||||
public Vector3f leftLegPose;
|
public Vector3f leftLegPose;
|
||||||
|
|
|
@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||||
public final Convertable.ConversionSession convertable;
|
public final Convertable.ConversionSession convertable;
|
||||||
public final UUID uuid;
|
public final UUID uuid;
|
||||||
boolean hasPhysicsEvent = true; // Paper
|
public boolean hasPhysicsEvent = true; // Paper
|
||||||
+ private static Throwable getAddToWorldStackTrace(Entity entity) {
|
+ private static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||||
+ return new Throwable(entity + " Added to world at " + new java.util.Date());
|
+ return new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||||
+ }
|
+ }
|
||||||
|
@ -100,12 +100,20 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
+import net.minecraft.server.level.PlayerChunkMap;
|
||||||
|
import net.minecraft.server.level.TicketType;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.sounds.SoundCategory;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||||
private CraftEntity bukkitEntity;
|
private CraftEntity bukkitEntity;
|
||||||
|
|
||||||
+ PlayerChunkMap.EntityTracker tracker; // Paper
|
+ PlayerChunkMap.EntityTracker tracker; // Paper
|
||||||
+ Throwable addedToWorldStack; // Paper - entity debug
|
+ public Throwable addedToWorldStack; // Paper - entity debug
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (bukkitEntity == null) {
|
if (bukkitEntity == null) {
|
||||||
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
||||||
|
|
|
@ -28,6 +28,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParameterSet
|
||||||
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
|
||||||
|
import net.minecraft.world.phys.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.phys.MovingObjectPosition;
|
||||||
|
+import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||||
|
import net.minecraft.world.phys.Vec3D;
|
||||||
|
import net.minecraft.world.scores.ScoreboardTeam;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||||
return world.rayTrace(raytrace);
|
return world.rayTrace(raytrace);
|
||||||
}
|
}
|
||||||
|
@ -123,30 +131,50 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@
|
||||||
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
|
import com.destroystokyo.paper.block.TargetBlockInfo;
|
||||||
|
+import com.destroystokyo.paper.entity.TargetEntityInfo;
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.projectile.EntityThrownExpBottle;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityThrownTrident;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityTippedArrow;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityWitherSkull;
|
||||||
|
+import net.minecraft.world.level.RayTrace;
|
||||||
|
import net.minecraft.world.phys.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||||
|
+import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||||
|
+import net.minecraft.world.phys.Vec3D;
|
||||||
|
import org.apache.commons.lang.Validate;
|
||||||
|
import org.bukkit.FluidCollisionMode;
|
||||||
|
import org.bukkit.Location;
|
||||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition()),
|
new TargetBlockInfo(CraftBlock.at(getHandle().world, ((MovingObjectPositionBlock)rayTrace).getBlockPosition()),
|
||||||
net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection()));
|
MCUtil.toBukkitBlockFace(((MovingObjectPositionBlock)rayTrace).getDirection()));
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public Entity getTargetEntity(int maxDistance, boolean ignoreBlocks) {
|
+ public Entity getTargetEntity(int maxDistance, boolean ignoreBlocks) {
|
||||||
+ net.minecraft.server.MovingObjectPositionEntity rayTrace = rayTraceEntity(maxDistance, ignoreBlocks);
|
+ MovingObjectPositionEntity rayTrace = rayTraceEntity(maxDistance, ignoreBlocks);
|
||||||
+ return rayTrace == null ? null : rayTrace.getEntity().getBukkitEntity();
|
+ return rayTrace == null ? null : rayTrace.getEntity().getBukkitEntity();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public com.destroystokyo.paper.entity.TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks) {
|
+ public TargetEntityInfo getTargetEntityInfo(int maxDistance, boolean ignoreBlocks) {
|
||||||
+ net.minecraft.server.MovingObjectPositionEntity rayTrace = rayTraceEntity(maxDistance, ignoreBlocks);
|
+ MovingObjectPositionEntity rayTrace = rayTraceEntity(maxDistance, ignoreBlocks);
|
||||||
+ return rayTrace == null ? null : new com.destroystokyo.paper.entity.TargetEntityInfo(rayTrace.getEntity().getBukkitEntity(), new org.bukkit.util.Vector(rayTrace.getPos().x, rayTrace.getPos().y, rayTrace.getPos().z));
|
+ return rayTrace == null ? null : new TargetEntityInfo(rayTrace.getEntity().getBukkitEntity(), new org.bukkit.util.Vector(rayTrace.getPos().x, rayTrace.getPos().y, rayTrace.getPos().z));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public net.minecraft.server.MovingObjectPositionEntity rayTraceEntity(int maxDistance, boolean ignoreBlocks) {
|
+ public MovingObjectPositionEntity rayTraceEntity(int maxDistance, boolean ignoreBlocks) {
|
||||||
+ net.minecraft.server.MovingObjectPositionEntity rayTrace = getHandle().getTargetEntity(maxDistance);
|
+ MovingObjectPositionEntity rayTrace = getHandle().getTargetEntity(maxDistance);
|
||||||
+ if (rayTrace == null) {
|
+ if (rayTrace == null) {
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
+ if (!ignoreBlocks) {
|
+ if (!ignoreBlocks) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTraceBlocks = getHandle().getRayTrace(maxDistance, net.minecraft.server.RayTrace.FluidCollisionOption.NONE);
|
+ MovingObjectPosition rayTraceBlocks = getHandle().getRayTrace(maxDistance, RayTrace.FluidCollisionOption.NONE);
|
||||||
+ if (rayTraceBlocks != null) {
|
+ if (rayTraceBlocks != null) {
|
||||||
+ net.minecraft.server.Vec3D eye = getHandle().getEyePosition(1.0F);
|
+ Vec3D eye = getHandle().getEyePosition(1.0F);
|
||||||
+ if (eye.distanceSquared(rayTraceBlocks.getPos()) <= eye.distanceSquared(rayTrace.getPos())) {
|
+ if (eye.distanceSquared(rayTraceBlocks.getPos()) <= eye.distanceSquared(rayTrace.getPos())) {
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ if (packetListener instanceof PlayerConnection) {
|
+ if (packetListener instanceof PlayerConnection) {
|
||||||
+ /* Player was logged in */
|
+ /* Player was logged in */
|
||||||
+ final PlayerConnection playerConnection = (PlayerConnection) packetListener;
|
+ final PlayerConnection playerConnection = (PlayerConnection) packetListener;
|
||||||
+ new com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent(playerConnection.player.uniqueID,
|
+ new com.destroystokyo.paper.event.player.PlayerConnectionCloseEvent(playerConnection.player.getUniqueID(),
|
||||||
+ playerConnection.player.getName(), ((java.net.InetSocketAddress)socketAddress).getAddress(), false).callEvent();
|
+ playerConnection.player.getName(), ((java.net.InetSocketAddress)socketAddress).getAddress(), false).callEvent();
|
||||||
+ } else if (packetListener instanceof LoginListener) {
|
+ } else if (packetListener instanceof LoginListener) {
|
||||||
+ /* Player is login stage */
|
+ /* Player is login stage */
|
||||||
|
|
|
@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
+ // Paper start - support specific overrides for prepare result
|
+ // Paper start - support specific overrides for prepare result
|
||||||
+ public static void callPrepareResultEvent(net.minecraft.server.Container container, int resultSlot) {
|
+ public static void callPrepareResultEvent(Container container, int resultSlot) {
|
||||||
+ com.destroystokyo.paper.event.inventory.PrepareResultEvent event;
|
+ com.destroystokyo.paper.event.inventory.PrepareResultEvent event;
|
||||||
+ InventoryView view = container.getBukkitView();
|
+ InventoryView view = container.getBukkitView();
|
||||||
+ org.bukkit.inventory.ItemStack origItem = view.getTopInventory().getItem(resultSlot);
|
+ org.bukkit.inventory.ItemStack origItem = view.getTopInventory().getItem(resultSlot);
|
||||||
|
|
|
@ -40,6 +40,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.SystemUtils;
|
||||||
|
import net.minecraft.core.BaseBlockPosition;
|
||||||
|
import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.EnumDirection;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.world.item.context.BlockActionContext;
|
||||||
|
import net.minecraft.world.level.GameRules;
|
||||||
@@ -0,0 +0,0 @@ public class BlockFire extends BlockFireAbstract {
|
@@ -0,0 +0,0 @@ public class BlockFire extends BlockFireAbstract {
|
||||||
|
|
||||||
world.setTypeAndData(blockposition, this.a(world, blockposition, l), 3);
|
world.setTypeAndData(blockposition, this.a(world, blockposition, l), 3);
|
||||||
|
|
|
@ -65,8 +65,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import com.google.common.net.InetAddresses;
|
+import com.google.common.net.InetAddresses;
|
||||||
+import com.mojang.authlib.GameProfile;
|
+import com.mojang.authlib.GameProfile;
|
||||||
+import com.mojang.authlib.properties.Property;
|
+import com.mojang.authlib.properties.Property;
|
||||||
+import net.minecraft.server.MinecraftKey;
|
+import net.minecraft.network.PacketDataSerializer;
|
||||||
+import net.minecraft.network.protocol.game.PacketDataSerializer;
|
+import net.minecraft.resources.MinecraftKey;
|
||||||
+
|
+
|
||||||
+import java.net.InetAddress;
|
+import java.net.InetAddress;
|
||||||
+import java.security.InvalidKeyException;
|
+import java.security.InvalidKeyException;
|
||||||
|
@ -192,6 +192,21 @@ diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/LoginListener.java
|
--- a/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/LoginListener.java
|
+++ b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||||
|
@@ -0,0 +0,0 @@ import javax.crypto.Cipher;
|
||||||
|
import javax.crypto.SecretKey;
|
||||||
|
import net.minecraft.DefaultUncaughtExceptionHandler;
|
||||||
|
import net.minecraft.network.NetworkManager;
|
||||||
|
+import net.minecraft.network.PacketDataSerializer;
|
||||||
|
import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginInCustomPayload;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginInEncryptionBegin;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginInListener;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginInStart;
|
||||||
|
+import net.minecraft.network.protocol.login.PacketLoginOutCustomPayload;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginOutDisconnect;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginOutEncryptionBegin;
|
||||||
|
import net.minecraft.network.protocol.login.PacketLoginOutSetCompression;
|
||||||
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.Waitable;
|
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.util.Waitable;
|
||||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||||
import org.bukkit.event.player.PlayerPreLoginEvent;
|
import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||||
|
|
|
@ -147,7 +147,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
// Paper start - Prevent tile entity and entity crashes
|
// Paper start - Prevent tile entity and entity crashes
|
||||||
- System.err.println("TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ());
|
- System.err.println("TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ());
|
||||||
+ String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ();
|
+ String msg = "TileEntity threw exception at " + tileentity.getWorld().getWorld().getName() + ":" + tileentity.getPosition().getX() + "," + tileentity.getPosition().getY() + "," + tileentity.getPosition().getZ();
|
||||||
+ System.err.println(msg);
|
+ System.err.println(msg);
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
+ getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable)));
|
+ getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable)));
|
||||||
|
|
|
@ -18,6 +18,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
}
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- protected void releaseShoulderEntities() {
|
||||||
|
+ public void releaseShoulderEntities() { // Paper - protected -> public
|
||||||
|
if (this.e + 20L < this.world.getTime()) {
|
||||||
|
// CraftBukkit start
|
||||||
|
if (this.spawnEntityFromShoulder(this.getShoulderEntityLeft())) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
|
||||||
|
|
|
@ -36,29 +36,61 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@
|
||||||
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
|
+import com.destroystokyo.paper.block.TargetBlockInfo;
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.world.EnumHand;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.projectile.EntityThrownExpBottle;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityThrownTrident;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityTippedArrow;
|
||||||
|
import net.minecraft.world.entity.projectile.EntityWitherSkull;
|
||||||
|
+import net.minecraft.world.phys.MovingObjectPosition;
|
||||||
|
+import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||||
|
import org.apache.commons.lang.Validate;
|
||||||
|
import org.bukkit.FluidCollisionMode;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
@@ -0,0 +0,0 @@ import org.bukkit.attribute.AttributeInstance;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
+import org.bukkit.craftbukkit.block.CraftBlock;
|
||||||
|
import org.bukkit.craftbukkit.entity.memory.CraftMemoryKey;
|
||||||
|
import org.bukkit.craftbukkit.entity.memory.CraftMemoryMapper;
|
||||||
|
import org.bukkit.craftbukkit.inventory.CraftEntityEquipment;
|
||||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return blocks.get(0);
|
return blocks.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Block getTargetBlock(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public Block getTargetBlock(int maxDistance, TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, MCUtil.getNMSFluidCollisionOption(fluidMode));
|
||||||
+ return !(rayTrace instanceof net.minecraft.server.MovingObjectPositionBlock) ? null : org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition());
|
+ return !(rayTrace instanceof MovingObjectPositionBlock) ? null : CraftBlock.at(getHandle().world, ((MovingObjectPositionBlock)rayTrace).getBlockPosition());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public org.bukkit.block.BlockFace getTargetBlockFace(int maxDistance, TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, MCUtil.getNMSFluidCollisionOption(fluidMode));
|
||||||
+ return !(rayTrace instanceof net.minecraft.server.MovingObjectPositionBlock) ? null : net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection());
|
+ return !(rayTrace instanceof MovingObjectPositionBlock) ? null : MCUtil.toBukkitBlockFace(((MovingObjectPositionBlock)rayTrace).getDirection());
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public com.destroystokyo.paper.block.TargetBlockInfo getTargetBlockInfo(int maxDistance, com.destroystokyo.paper.block.TargetBlockInfo.FluidMode fluidMode) {
|
+ public TargetBlockInfo getTargetBlockInfo(int maxDistance, TargetBlockInfo.FluidMode fluidMode) {
|
||||||
+ net.minecraft.server.MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, net.minecraft.server.MCUtil.getNMSFluidCollisionOption(fluidMode));
|
+ MovingObjectPosition rayTrace = getHandle().getRayTrace(maxDistance, MCUtil.getNMSFluidCollisionOption(fluidMode));
|
||||||
+ return !(rayTrace instanceof net.minecraft.server.MovingObjectPositionBlock) ? null :
|
+ return !(rayTrace instanceof MovingObjectPositionBlock) ? null :
|
||||||
+ new com.destroystokyo.paper.block.TargetBlockInfo(org.bukkit.craftbukkit.block.CraftBlock.at(getHandle().world, ((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getBlockPosition()),
|
+ new TargetBlockInfo(CraftBlock.at(getHandle().world, ((MovingObjectPositionBlock)rayTrace).getBlockPosition()),
|
||||||
+ net.minecraft.server.MCUtil.toBukkitBlockFace(((net.minecraft.server.MovingObjectPositionBlock)rayTrace).getDirection()));
|
+ MCUtil.toBukkitBlockFace(((MovingObjectPositionBlock)rayTrace).getDirection()));
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
|
|
|
@ -62,7 +62,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.SystemUtils;
|
import net.minecraft.SystemUtils;
|
||||||
|
+import net.minecraft.nbt.NBTCompressedStreamTools;
|
||||||
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
||||||
private final IntBuffer i;
|
private final IntBuffer i;
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
@ -75,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
public RegionFile(Path path, Path path1, RegionFileCompression regionfilecompression, boolean flag) throws IOException {
|
public RegionFile(Path path, Path path1, RegionFileCompression regionfilecompression, boolean flag) throws IOException {
|
||||||
this.g = ByteBuffer.allocateDirect(8192);
|
this.g = ByteBuffer.allocateDirect(8192);
|
||||||
+ this.file = java_nio_file_path.toFile(); // Paper
|
+ this.file = path.toFile(); // Paper
|
||||||
+ initOversizedState(); // Paper
|
+ initOversizedState(); // Paper
|
||||||
this.freeSectors = new RegionFileBitSet();
|
this.freeSectors = new RegionFileBitSet();
|
||||||
this.f = regionfilecompression;
|
this.f = regionfilecompression;
|
||||||
|
@ -159,6 +163,17 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCac
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.io.DataOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
+import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTCompressedStreamTools;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
+import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.util.ExceptionSuppressor;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
@@ -0,0 +0,0 @@ public final class RegionFileCache implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public final class RegionFileCache implements AutoCloseable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,20 @@ diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.GameRules;
|
||||||
|
import net.minecraft.world.level.IWorldReader;
|
||||||
|
import net.minecraft.world.level.World;
|
||||||
|
import net.minecraft.world.level.block.BlockCommand;
|
||||||
|
+import net.minecraft.world.level.block.BlockSign;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntity;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntityCommand;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||||
|
|
||||||
this.player.resetIdleTimer();
|
this.player.resetIdleTimer();
|
||||||
if (blockposition.getY() < this.minecraftServer.getMaxBuildHeight()) {
|
if (blockposition.getY() < this.minecraftServer.getMaxBuildHeight()) {
|
||||||
- if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.a((EntityHuman) this.player, blockposition)) {
|
- if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.a((EntityHuman) this.player, blockposition)) {
|
||||||
+ if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.a((EntityHuman) this.player, blockposition) || (worldserver.getType(blockposition).getBlock() instanceof net.minecraft.server.BlockSign && worldserver.paperConfig.allowUsingSignsInsideSpawnProtection))) { // Paper
|
+ if (this.teleportPos == null && this.player.h((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.a((EntityHuman) this.player, blockposition) || (worldserver.getType(blockposition).getBlock() instanceof BlockSign && worldserver.paperConfig.allowUsingSignsInsideSpawnProtection))) { // Paper
|
||||||
// CraftBukkit start - Check if we can actually do something over this large a distance
|
// CraftBukkit start - Check if we can actually do something over this large a distance
|
||||||
// Paper - move check up
|
// Paper - move check up
|
||||||
this.player.clearActiveItem(); // SPIGOT-4706
|
this.player.clearActiveItem(); // SPIGOT-4706
|
||||||
|
|
|
@ -65,16 +65,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.antixray;
|
+package com.destroystokyo.paper.antixray;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.BlockPosition;
|
+import net.minecraft.core.BlockPosition;
|
||||||
+import net.minecraft.server.Chunk;
|
+import net.minecraft.core.EnumDirection;
|
||||||
+import net.minecraft.server.ChunkSection;
|
|
||||||
+import net.minecraft.server.EntityPlayer;
|
|
||||||
+import net.minecraft.server.EnumDirection;
|
|
||||||
+import net.minecraft.server.IBlockData;
|
|
||||||
+import net.minecraft.server.IChunkAccess;
|
|
||||||
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
+import net.minecraft.server.PlayerInteractManager;
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
+import net.minecraft.server.World;
|
+import net.minecraft.server.level.PlayerInteractManager;
|
||||||
|
+import net.minecraft.world.level.World;
|
||||||
|
+import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
+import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkSection;
|
||||||
|
+import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
+
|
+
|
||||||
+public class ChunkPacketBlockController {
|
+public class ChunkPacketBlockController {
|
||||||
+
|
+
|
||||||
|
@ -125,7 +125,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.concurrent.ThreadLocalRandom;
|
+import java.util.concurrent.ThreadLocalRandom;
|
||||||
+import java.util.function.IntSupplier;
|
+import java.util.function.IntSupplier;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.*;
|
+import net.minecraft.core.BlockPosition;
|
||||||
|
+import net.minecraft.core.EnumDirection;
|
||||||
|
+import net.minecraft.core.IRegistry;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
|
+import net.minecraft.resources.MinecraftKey;
|
||||||
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
+import net.minecraft.server.level.PlayerInteractManager;
|
||||||
|
+import net.minecraft.server.level.WorldServer;
|
||||||
|
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
+import net.minecraft.world.level.World;
|
||||||
|
+import net.minecraft.world.level.block.Block;
|
||||||
|
+import net.minecraft.world.level.block.Blocks;
|
||||||
|
+import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
+import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkEmpty;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkSection;
|
||||||
|
+import net.minecraft.world.level.chunk.DataPalette;
|
||||||
|
+import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
+import org.bukkit.Bukkit;
|
+import org.bukkit.Bukkit;
|
||||||
+import org.bukkit.World.Environment;
|
+import org.bukkit.World.Environment;
|
||||||
+
|
+
|
||||||
|
@ -754,9 +772,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.antixray;
|
+package com.destroystokyo.paper.antixray;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.Chunk;
|
|
||||||
+import net.minecraft.server.DataPalette;
|
|
||||||
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
|
+import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
+import net.minecraft.world.level.chunk.DataPalette;
|
||||||
+
|
+
|
||||||
+public class ChunkPacketInfo<T> {
|
+public class ChunkPacketInfo<T> {
|
||||||
+
|
+
|
||||||
|
@ -841,9 +859,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.antixray;
|
+package com.destroystokyo.paper.antixray;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.Chunk;
|
|
||||||
+import net.minecraft.server.IBlockData;
|
|
||||||
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
+import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
|
+import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
+import net.minecraft.world.level.chunk.Chunk;
|
||||||
+
|
+
|
||||||
+public final class ChunkPacketInfoAntiXray extends ChunkPacketInfo<IBlockData> implements Runnable {
|
+public final class ChunkPacketInfoAntiXray extends ChunkPacketInfo<IBlockData> implements Runnable {
|
||||||
+
|
+
|
||||||
|
@ -1022,6 +1040,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntity;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntitySkull;
|
||||||
|
+import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
import net.minecraft.world.level.chunk.BiomeStorage;
|
||||||
|
import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkSection;
|
||||||
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
private List<NBTTagCompound> g;
|
private List<NBTTagCompound> g;
|
||||||
private boolean h;
|
private boolean h;
|
||||||
|
@ -1238,6 +1264,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.nbt.GameProfileSerializer;
|
import net.minecraft.nbt.GameProfileSerializer;
|
||||||
import net.minecraft.network.PacketDataSerializer;
|
import net.minecraft.network.PacketDataSerializer;
|
||||||
|
+import net.minecraft.world.level.World;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
@@ -0,0 +0,0 @@ public class ChunkSection {
|
@@ -0,0 +0,0 @@ public class ChunkSection {
|
||||||
private short e;
|
private short e;
|
||||||
final DataPaletteBlock<IBlockData> blockIds; // Paper - package-private
|
final DataPaletteBlock<IBlockData> blockIds; // Paper - package-private
|
||||||
|
|
|
@ -332,11 +332,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.io;
|
+package com.destroystokyo.paper.io;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.ChunkCoordIntPair;
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.NBTTagCompound;
|
+import net.minecraft.server.level.WorldServer;
|
||||||
+import net.minecraft.server.RegionFile;
|
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
+import net.minecraft.server.WorldServer;
|
+import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||||
+import org.apache.logging.log4j.Logger;
|
+import org.apache.logging.log4j.Logger;
|
||||||
+
|
+
|
||||||
+import java.io.IOException;
|
+import java.io.IOException;
|
||||||
|
@ -1477,10 +1477,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import co.aikar.timings.Timing;
|
+import co.aikar.timings.Timing;
|
||||||
+import com.destroystokyo.paper.io.PaperFileIOThread;
|
+import com.destroystokyo.paper.io.PaperFileIOThread;
|
||||||
+import com.destroystokyo.paper.io.IOUtil;
|
+import com.destroystokyo.paper.io.IOUtil;
|
||||||
+import net.minecraft.server.ChunkCoordIntPair;
|
+import net.minecraft.server.level.PlayerChunkMap;
|
||||||
+import net.minecraft.server.ChunkRegionLoader;
|
+import net.minecraft.server.level.WorldServer;
|
||||||
+import net.minecraft.server.PlayerChunkMap;
|
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
+import net.minecraft.server.WorldServer;
|
+import net.minecraft.world.level.chunk.storage.ChunkRegionLoader;
|
||||||
+
|
+
|
||||||
+import java.util.ArrayDeque;
|
+import java.util.ArrayDeque;
|
||||||
+import java.util.function.Consumer;
|
+import java.util.function.Consumer;
|
||||||
|
@ -1630,14 +1630,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import com.destroystokyo.paper.io.PaperFileIOThread;
|
+import com.destroystokyo.paper.io.PaperFileIOThread;
|
||||||
+import com.destroystokyo.paper.io.IOUtil;
|
+import com.destroystokyo.paper.io.IOUtil;
|
||||||
+import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
+import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
||||||
+import net.minecraft.server.ChunkRegionLoader;
|
|
||||||
+import net.minecraft.server.IAsyncTaskHandler;
|
|
||||||
+import net.minecraft.server.IChunkAccess;
|
|
||||||
+import net.minecraft.server.NBTTagCompound;
|
|
||||||
+import net.minecraft.server.WorldServer;
|
|
||||||
+
|
+
|
||||||
+import java.util.concurrent.CompletableFuture;
|
+import java.util.concurrent.CompletableFuture;
|
||||||
+import java.util.concurrent.atomic.AtomicInteger;
|
+import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
+import net.minecraft.server.level.WorldServer;
|
||||||
|
+import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
|
+import net.minecraft.world.level.chunk.storage.ChunkRegionLoader;
|
||||||
+
|
+
|
||||||
+public final class ChunkSaveTask extends ChunkTask {
|
+public final class ChunkSaveTask extends ChunkTask {
|
||||||
+
|
+
|
||||||
|
@ -1746,7 +1745,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+import com.destroystokyo.paper.io.PaperFileIOThread;
|
+import com.destroystokyo.paper.io.PaperFileIOThread;
|
||||||
+import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
+import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
||||||
+import net.minecraft.server.WorldServer;
|
+import net.minecraft.server.level.WorldServer;
|
||||||
+
|
+
|
||||||
+abstract class ChunkTask extends PrioritizedTaskQueue.PrioritizedTask implements Runnable {
|
+abstract class ChunkTask extends PrioritizedTaskQueue.PrioritizedTask implements Runnable {
|
||||||
+
|
+
|
||||||
|
@ -1794,13 +1793,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import com.destroystokyo.paper.io.IOUtil;
|
+import com.destroystokyo.paper.io.IOUtil;
|
||||||
+import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
+import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
||||||
+import com.destroystokyo.paper.io.QueueExecutorThread;
|
+import com.destroystokyo.paper.io.QueueExecutorThread;
|
||||||
+import net.minecraft.server.ChunkRegionLoader;
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
+import net.minecraft.server.IAsyncTaskHandler;
|
|
||||||
+import net.minecraft.server.IChunkAccess;
|
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.NBTTagCompound;
|
+import net.minecraft.server.level.ChunkProviderServer;
|
||||||
+import net.minecraft.server.PlayerChunk;
|
+import net.minecraft.server.level.PlayerChunk;
|
||||||
+import net.minecraft.server.WorldServer;
|
+import net.minecraft.server.level.WorldServer;
|
||||||
|
+import net.minecraft.util.thread.IAsyncTaskHandler;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
+import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
|
+import net.minecraft.world.level.chunk.storage.ChunkRegionLoader;
|
||||||
+import org.apache.commons.lang.StringUtils;
|
+import org.apache.commons.lang.StringUtils;
|
||||||
+import org.apache.logging.log4j.Level;
|
+import org.apache.logging.log4j.Level;
|
||||||
+import org.bukkit.Bukkit;
|
+import org.bukkit.Bukkit;
|
||||||
|
@ -1888,7 +1889,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ PaperFileIOThread.LOGGER.log(Level.ERROR, "Load Task - " + (loadTask == null ? "none" : loadTask.toString()));
|
+ PaperFileIOThread.LOGGER.log(Level.ERROR, "Load Task - " + (loadTask == null ? "none" : loadTask.toString()));
|
||||||
+ PaperFileIOThread.LOGGER.log(Level.ERROR, "Save Task - " + (saveTask == null ? "none" : saveTask.toString()));
|
+ PaperFileIOThread.LOGGER.log(Level.ERROR, "Save Task - " + (saveTask == null ? "none" : saveTask.toString()));
|
||||||
+ // log current status of chunk to indicate whether we're waiting on generation or loading
|
+ // log current status of chunk to indicate whether we're waiting on generation or loading
|
||||||
+ net.minecraft.server.PlayerChunk chunkHolder = chunkInfo.world.getChunkProvider().playerChunkMap.getVisibleChunk(key);
|
+ PlayerChunk chunkHolder = chunkInfo.world.getChunkProvider().playerChunkMap.getVisibleChunk(key);
|
||||||
+
|
+
|
||||||
+ dumpChunkInfo(new HashSet<>(), chunkHolder, chunkInfo.chunkX, chunkInfo.chunkZ);
|
+ dumpChunkInfo(new HashSet<>(), chunkHolder, chunkInfo.chunkX, chunkInfo.chunkZ);
|
||||||
+ }
|
+ }
|
||||||
|
@ -1912,7 +1913,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Holder - null for (" + x +"," + z +")");
|
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Holder - null for (" + x +"," + z +")");
|
||||||
+ } else {
|
+ } else {
|
||||||
+ IChunkAccess chunk = chunkHolder.getAvailableChunkNow();
|
+ IChunkAccess chunk = chunkHolder.getAvailableChunkNow();
|
||||||
+ net.minecraft.server.ChunkStatus holderStatus = chunkHolder.getChunkHolderStatus();
|
+ ChunkStatus holderStatus = chunkHolder.getChunkHolderStatus();
|
||||||
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Holder - non-null");
|
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Holder - non-null");
|
||||||
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Status - " + ((chunk == null) ? "null chunk" : chunk.getChunkStatus().toString()));
|
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Status - " + ((chunk == null) ? "null chunk" : chunk.getChunkStatus().toString()));
|
||||||
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Ticket Status - " + PlayerChunk.getChunkStatus(chunkHolder.getTicketLevel()));
|
+ PaperFileIOThread.LOGGER.log(Level.ERROR, indentStr + "Chunk Ticket Status - " + PlayerChunk.getChunkStatus(chunkHolder.getTicketLevel()));
|
||||||
|
@ -1955,7 +1956,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ * less-than or equal to 0, then this chunk task manager will operate off of the world's chunk task queue.
|
+ * less-than or equal to 0, then this chunk task manager will operate off of the world's chunk task queue.
|
||||||
+ * @param world Specified world.
|
+ * @param world Specified world.
|
||||||
+ * @param threads Specified number of threads.
|
+ * @param threads Specified number of threads.
|
||||||
+ * @see net.minecraft.server.ChunkProviderServer#serverThreadQueue
|
+ * @see ChunkProviderServer#serverThreadQueue
|
||||||
+ */
|
+ */
|
||||||
+ public ChunkTaskManager(final WorldServer world, final int threads) {
|
+ public ChunkTaskManager(final WorldServer world, final int threads) {
|
||||||
+ this.world = world;
|
+ this.world = world;
|
||||||
|
@ -1980,7 +1981,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ * the global queue is not shutdown. If the global workers is configured to be disabled or use 0 threads, then
|
+ * the global queue is not shutdown. If the global workers is configured to be disabled or use 0 threads, then
|
||||||
+ * this chunk task manager will operate off of the world's chunk task queue.
|
+ * this chunk task manager will operate off of the world's chunk task queue.
|
||||||
+ * @param world The world that this task manager is responsible for
|
+ * @param world The world that this task manager is responsible for
|
||||||
+ * @see net.minecraft.server.ChunkProviderServer#serverThreadQueue
|
+ * @see ChunkProviderServer#serverThreadQueue
|
||||||
+ */
|
+ */
|
||||||
+ public ChunkTaskManager(final WorldServer world) {
|
+ public ChunkTaskManager(final WorldServer world) {
|
||||||
+ this.world = world;
|
+ this.world = world;
|
||||||
|
@ -2088,7 +2089,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ * @param chunkX Chunk's x coordinate
|
+ * @param chunkX Chunk's x coordinate
|
||||||
+ * @param chunkZ Chunk's z coordinate
|
+ * @param chunkZ Chunk's z coordinate
|
||||||
+ * @param priority Priority for this task
|
+ * @param priority Priority for this task
|
||||||
+ * @param onComplete The consumer to invoke with the {@link net.minecraft.server.ChunkRegionLoader.InProgressChunkHolder} object once this task is complete
|
+ * @param onComplete The consumer to invoke with the {@link ChunkRegionLoader.InProgressChunkHolder} object once this task is complete
|
||||||
+ * @param intendingToBlock Whether the caller is intending to block on this task completing (this is a performance tune, and has no adverse side-effects)
|
+ * @param intendingToBlock Whether the caller is intending to block on this task completing (this is a performance tune, and has no adverse side-effects)
|
||||||
+ * @return The {@link ChunkLoadTask} associated with
|
+ * @return The {@link ChunkLoadTask} associated with
|
||||||
+ */
|
+ */
|
||||||
|
@ -2355,6 +2356,14 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
|
import net.minecraft.world.level.chunk.IChunkProvider;
|
||||||
|
+import net.minecraft.world.level.chunk.ProtoChunkExtension;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureManager;
|
||||||
|
import net.minecraft.world.level.storage.Convertable;
|
||||||
|
import net.minecraft.world.level.storage.WorldData;
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
return playerChunk.getAvailableChunkNow();
|
return playerChunk.getAvailableChunkNow();
|
||||||
|
|
||||||
|
@ -2417,7 +2426,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+ IChunkAccess current = this.getChunkAtImmediately(x, z); // we want to bypass ticket restrictions
|
+ IChunkAccess current = this.getChunkAtImmediately(x, z); // we want to bypass ticket restrictions
|
||||||
+ if (current != null) {
|
+ if (current != null) {
|
||||||
+ if (!(current instanceof ProtoChunkExtension) && !(current instanceof net.minecraft.server.Chunk)) {
|
+ if (!(current instanceof ProtoChunkExtension) && !(current instanceof Chunk)) {
|
||||||
+ return CompletableFuture.completedFuture(PlayerChunk.UNLOADED_CHUNK_ACCESS);
|
+ return CompletableFuture.completedFuture(PlayerChunk.UNLOADED_CHUNK_ACCESS);
|
||||||
+ }
|
+ }
|
||||||
+ // we know the chunk is at full status here (either in read-only mode or the real thing)
|
+ // we know the chunk is at full status here (either in read-only mode or the real thing)
|
||||||
|
@ -2587,6 +2596,14 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.ProtoChunk;
|
||||||
|
import net.minecraft.world.level.chunk.ProtoChunkExtension;
|
||||||
|
import net.minecraft.world.level.chunk.storage.ChunkRegionLoader;
|
||||||
|
import net.minecraft.world.level.chunk.storage.IChunkLoader;
|
||||||
|
+import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureManager;
|
||||||
|
import net.minecraft.world.level.storage.Convertable;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
private final LightEngineThreaded lightEngine;
|
private final LightEngineThreaded lightEngine;
|
||||||
private final IAsyncTaskHandler<Runnable> executor;
|
private final IAsyncTaskHandler<Runnable> executor;
|
||||||
|
@ -3001,17 +3018,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+ // Paper start - async io
|
+ // Paper start - async io
|
||||||
+ net.minecraft.server.NBTTagCompound inProgressWrite = com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE
|
+ NBTTagCompound inProgressWrite = com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE
|
||||||
+ .getPendingWrite(this.world, x, z, false);
|
+ .getPendingWrite(this.world, x, z, false);
|
||||||
+
|
+
|
||||||
+ if (inProgressWrite != null) {
|
+ if (inProgressWrite != null) {
|
||||||
+ return net.minecraft.server.ChunkRegionLoader.getStatus(inProgressWrite);
|
+ return ChunkRegionLoader.getStatus(inProgressWrite);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+ // variant of PlayerChunkMap#getChunkStatusOnDisk that does not load data off disk, but loads the region file
|
+ // variant of PlayerChunkMap#getChunkStatusOnDisk that does not load data off disk, but loads the region file
|
||||||
+ ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z);
|
+ ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z);
|
||||||
+ synchronized (world.getChunkProvider().playerChunkMap) {
|
+ synchronized (world.getChunkProvider().playerChunkMap) {
|
||||||
+ net.minecraft.server.RegionFile file;
|
+ RegionFile file;
|
||||||
+ try {
|
+ try {
|
||||||
+ file = world.getChunkProvider().playerChunkMap.regionFileCache.getFile(chunkPos, false);
|
+ file = world.getChunkProvider().playerChunkMap.regionFileCache.getFile(chunkPos, false);
|
||||||
+ } catch (IOException ex) {
|
+ } catch (IOException ex) {
|
||||||
|
@ -3049,6 +3066,22 @@ diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/mai
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.core.IRegistry;
|
||||||
|
import net.minecraft.core.IRegistryCustom;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
import net.minecraft.core.particles.ParticleParam;
|
||||||
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkSection;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
|
+import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||||
|
import net.minecraft.world.level.dimension.DimensionManager;
|
||||||
|
import net.minecraft.world.level.dimension.end.EnderDragonBattle;
|
||||||
|
import net.minecraft.world.level.levelgen.HeightMap;
|
||||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||||
return this.chunkProvider.getChunkAt(x, z, false);
|
return this.chunkProvider.getChunkAt(x, z, false);
|
||||||
}
|
}
|
||||||
|
@ -3185,6 +3218,16 @@ diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlac
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/VillagePlace.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.stream.Stream;
|
||||||
|
import net.minecraft.SystemUtils;
|
||||||
|
import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.server.level.LightEngineGraphSection;
|
||||||
|
+import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.util.datafix.DataFixTypes;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.IWorldReader;
|
||||||
@@ -0,0 +0,0 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
@@ -0,0 +0,0 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||||
private final VillagePlace.a a = new VillagePlace.a();
|
private final VillagePlace.a a = new VillagePlace.a();
|
||||||
private final LongSet b = new LongOpenHashSet();
|
private final LongSet b = new LongOpenHashSet();
|
||||||
|
@ -3630,7 +3673,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ private volatile PersistentStructureLegacy c; // Paper - async chunk loading
|
+ private volatile PersistentStructureLegacy c; // Paper - async chunk loading
|
||||||
+
|
+
|
||||||
+ private final Object persistentDataLock = new Object(); // Paper
|
+ private final Object persistentDataLock = new Object(); // Paper
|
||||||
+ protected final RegionFileCache regionFileCache;
|
+ public final RegionFileCache regionFileCache;
|
||||||
|
|
||||||
public IChunkLoader(File file, DataFixer datafixer, boolean flag) {
|
public IChunkLoader(File file, DataFixer datafixer, boolean flag) {
|
||||||
+ this.regionFileCache = new RegionFileCache(file, flag); // Paper - nuke IOWorker
|
+ this.regionFileCache = new RegionFileCache(file, flag); // Paper - nuke IOWorker
|
||||||
|
@ -3764,7 +3807,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCac
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.nbt.NBTTagCompound;
|
@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.util.ExceptionSuppressor;
|
import net.minecraft.util.ExceptionSuppressor;
|
||||||
import net.minecraft.world.level.ChunkCoordIntPair;
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
|
||||||
|
@ -3889,7 +3932,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper - nuke IOWorker
|
+ // Paper - nuke IOWorker
|
||||||
private final Long2ObjectMap<Optional<R>> c = new Long2ObjectOpenHashMap();
|
private final Long2ObjectMap<Optional<R>> c = new Long2ObjectOpenHashMap();
|
||||||
- private final LongLinkedOpenHashSet d = new LongLinkedOpenHashSet();
|
- private final LongLinkedOpenHashSet d = new LongLinkedOpenHashSet();
|
||||||
+ protected final LongLinkedOpenHashSet d = new LongLinkedOpenHashSet(); // Paper - private -> protected
|
+ public final LongLinkedOpenHashSet d = new LongLinkedOpenHashSet(); // Paper - private -> public
|
||||||
private final Function<Runnable, Codec<R>> e;
|
private final Function<Runnable, Codec<R>> e;
|
||||||
private final Function<Runnable, R> f;
|
private final Function<Runnable, R> f;
|
||||||
private final DataFixer g;
|
private final DataFixer g;
|
||||||
|
|
|
@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import com.mojang.authlib.properties.Property;
|
+import com.mojang.authlib.properties.Property;
|
||||||
+import com.mojang.authlib.properties.PropertyMap;
|
+import com.mojang.authlib.properties.PropertyMap;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.UserCache;
|
+import net.minecraft.server.players.UserCache;
|
||||||
+import org.apache.commons.lang3.Validate;
|
+import org.apache.commons.lang3.Validate;
|
||||||
+import org.bukkit.craftbukkit.entity.CraftPlayer;
|
+import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||||
+import org.spigotmc.SpigotConfig;
|
+import org.spigotmc.SpigotConfig;
|
||||||
|
|
|
@ -14,6 +14,14 @@ diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.core.particles.ParticleParam;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.level.PlayerChunk;
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -25,6 +25,14 @@ diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/NetworkManager.java
|
--- a/src/main/java/net/minecraft/network/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/network/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/network/NetworkManager.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutTabComplete;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutTitle;
|
||||||
|
import net.minecraft.server.CancelledPacketHandleException;
|
||||||
|
import net.minecraft.server.MCUtil;
|
||||||
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.network.LoginListener;
|
||||||
|
import net.minecraft.server.network.PlayerConnection;
|
||||||
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -48,3 +56,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.packetListener instanceof PlayerConnection) {
|
if (this.packetListener instanceof PlayerConnection) {
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/network/LoginListener.java
|
||||||
|
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener {
|
||||||
|
return new GameProfile(uuid, gameprofile.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
- static enum EnumProtocolState {
|
||||||
|
+ public enum EnumProtocolState { // Paper - package private -> public
|
||||||
|
|
||||||
|
HELLO, KEY, AUTHENTICATING, NEGOTIATING, READY_TO_ACCEPT, DELAY_ACCEPT, ACCEPTED;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,15 @@ diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
|
@@ -0,0 +0,0 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||||
|
import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
|
||||||
|
import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.EnumDirection;
|
||||||
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
+import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
@@ -0,0 +0,0 @@ public final class MCUtil {
|
@@ -0,0 +0,0 @@ public final class MCUtil {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,14 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCac
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.io.IOException;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import net.minecraft.nbt.NBTCompressedStreamTools;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.util.ExceptionSuppressor;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public final class RegionFileCache implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public final class RegionFileCache implements AutoCloseable {
|
||||||
|
|
||||||
protected void write(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException {
|
protected void write(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) throws IOException {
|
||||||
|
|
|
@ -211,9 +211,23 @@ diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.world.level.ChunkCoordIntPair;
|
@@ -0,0 +0,0 @@ import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.EnumDirection;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
+import net.minecraft.server.level.ChunkMapDistance;
|
||||||
|
+import net.minecraft.server.level.ChunkProviderServer;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
+import net.minecraft.server.level.PlayerChunk;
|
||||||
|
+import net.minecraft.server.level.PlayerChunkMap;
|
||||||
|
+import net.minecraft.server.level.Ticket;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
import net.minecraft.world.level.RayTrace;
|
import net.minecraft.world.level.RayTrace;
|
||||||
import net.minecraft.world.level.World;
|
import net.minecraft.world.level.World;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
+import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||||
+import com.google.gson.JsonArray;
|
+import com.google.gson.JsonArray;
|
||||||
+import com.google.gson.JsonObject;
|
+import com.google.gson.JsonObject;
|
||||||
|
@ -417,7 +431,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
public class ChunkProviderServer extends IChunkProvider {
|
public class ChunkProviderServer extends IChunkProvider {
|
||||||
|
|
||||||
- private static final List<ChunkStatus> b = ChunkStatus.a();
|
- private static final List<ChunkStatus> b = ChunkStatus.a();
|
||||||
+ private static final List<ChunkStatus> b = ChunkStatus.a(); static final List<ChunkStatus> getPossibleChunkStatuses() { return ChunkProviderServer.b; } // Paper - OBFHELPER
|
+ private static final List<ChunkStatus> b = ChunkStatus.a(); public static final List<ChunkStatus> getPossibleChunkStatuses() { return ChunkProviderServer.b; } // Paper - OBFHELPER
|
||||||
private final ChunkMapDistance chunkMapDistance;
|
private final ChunkMapDistance chunkMapDistance;
|
||||||
public final ChunkGenerator chunkGenerator;
|
public final ChunkGenerator chunkGenerator;
|
||||||
private final WorldServer world;
|
private final WorldServer world;
|
||||||
|
@ -443,7 +457,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
public volatile Long2ObjectLinkedOpenHashMap<PlayerChunk> visibleChunks;
|
public volatile Long2ObjectLinkedOpenHashMap<PlayerChunk> visibleChunks;
|
||||||
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
|
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
|
||||||
- private final LongSet loadedChunks;
|
- private final LongSet loadedChunks;
|
||||||
+ final LongSet loadedChunks; // Paper - private -> package
|
+ public final LongSet loadedChunks; // Paper - private -> public
|
||||||
public final WorldServer world;
|
public final WorldServer world;
|
||||||
private final LightEngineThreaded lightEngine;
|
private final LightEngineThreaded lightEngine;
|
||||||
private final IAsyncTaskHandler<Runnable> executor;
|
private final IAsyncTaskHandler<Runnable> executor;
|
||||||
|
|
|
@ -78,6 +78,14 @@ diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/mai
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutWorldParticles;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.ScoreboardServer;
|
||||||
|
import net.minecraft.server.level.progress.WorldLoadListener;
|
||||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||||
return ((PersistentIdCounts) this.getMinecraftServer().E().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
|
return ((PersistentIdCounts) this.getMinecraftServer().E().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,14 @@ diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.storage.SavedFile;
|
||||||
|
import net.minecraft.world.level.storage.WorldData;
|
||||||
|
import net.minecraft.world.level.storage.WorldNBTStorage;
|
||||||
|
import net.minecraft.world.phys.Vec3D;
|
||||||
|
+import net.minecraft.world.scores.Scoreboard;
|
||||||
|
import net.minecraft.world.scores.ScoreboardObjective;
|
||||||
|
import net.minecraft.world.scores.ScoreboardTeam;
|
||||||
|
import net.minecraft.world.scores.ScoreboardTeamBase;
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
private CraftServer cserver;
|
private CraftServer cserver;
|
||||||
|
|
|
@ -15,9 +15,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.stream.Collectors;
|
+import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
|
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
|
||||||
+import net.minecraft.server.EntityVindicator;
|
+import net.minecraft.world.EnumDifficulty;
|
||||||
+import net.minecraft.server.EntityZombie;
|
+import net.minecraft.world.entity.monster.EntityVindicator;
|
||||||
+import net.minecraft.server.EnumDifficulty;
|
+import net.minecraft.world.entity.monster.EntityZombie;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
|
@ -110,6 +110,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.CompletionException;
|
import java.util.concurrent.CompletionException;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.boss.EntityComplexPart;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.GameRules;
|
||||||
|
+import net.minecraft.world.level.World;
|
||||||
|
import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkConverter;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
// CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
|
// CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
|
||||||
boolean needsRemoval = false;
|
boolean needsRemoval = false;
|
||||||
|
@ -139,7 +147,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ && mode != PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN) {
|
+ && mode != PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ Entity other = world.getEntity(entity.uniqueID);
|
+ Entity other = world.getEntity(entity.getUniqueID());
|
||||||
+
|
+
|
||||||
+ if (mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN && other != null && !other.dead
|
+ if (mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN && other != null && !other.dead
|
||||||
+ && Objects.equals(other.getSaveID(), entity.getSaveID())
|
+ && Objects.equals(other.getSaveID(), entity.getSaveID())
|
||||||
|
|
|
@ -8,6 +8,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.INamableTileEntity;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.entity.animal.EntityAnimal;
|
||||||
|
import net.minecraft.world.entity.animal.EntityFish;
|
||||||
|
+import net.minecraft.world.entity.decoration.EntityHanging;
|
||||||
|
import net.minecraft.world.entity.item.EntityItem;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||||
|
|
||||||
public void setPosition(double d0, double d1, double d2) {
|
public void setPosition(double d0, double d1, double d2) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
+ boolean isQueuedForRegister = false;
|
+ public boolean isQueuedForRegister = false;
|
||||||
public static Random SHARED_RANDOM = new Random() {
|
public static Random SHARED_RANDOM = new Random() {
|
||||||
private boolean locked = false;
|
private boolean locked = false;
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -108,6 +108,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.animal.EntityFish;
|
||||||
|
import net.minecraft.world.entity.item.EntityItem;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||||
|
+import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.enchantment.EnchantmentManager;
|
||||||
|
import net.minecraft.world.item.enchantment.EnchantmentProtection;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||||
public boolean Y;
|
public boolean Y;
|
||||||
public boolean impulse;
|
public boolean impulse;
|
||||||
|
|
|
@ -38,6 +38,15 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.EnumHand;
|
||||||
|
import net.minecraft.world.EnumInteractionResult;
|
||||||
|
import net.minecraft.world.INamableTileEntity;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityAnimal;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityFish;
|
||||||
|
import net.minecraft.world.entity.item.EntityItem;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.entity.vehicle.EntityBoat;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
+import net.minecraft.server.level.ChunkProviderServer;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.level.PlayerChunkMap;
|
||||||
|
import net.minecraft.server.level.TicketType;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||||
public static int nextEntityId() {
|
public static int nextEntityId() {
|
||||||
return entityCount.incrementAndGet();
|
return entityCount.incrementAndGet();
|
||||||
|
|
|
@ -12,14 +12,14 @@ diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/m
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
@@ -0,0 +0,0 @@ import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.Engin
|
@@ -0,0 +0,0 @@ import java.util.stream.Collectors;
|
||||||
import net.minecraft.server.EntityVindicator;
|
|
||||||
import net.minecraft.server.EntityZombie;
|
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
|
||||||
import net.minecraft.server.EnumDifficulty;
|
import net.minecraft.world.EnumDifficulty;
|
||||||
+import net.minecraft.server.EntityTypes;
|
+import net.minecraft.world.entity.EntityTypes;
|
||||||
|
import net.minecraft.world.entity.monster.EntityVindicator;
|
||||||
|
import net.minecraft.world.entity.monster.EntityZombie;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
|
||||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||||
EnumDifficulty.class
|
EnumDifficulty.class
|
||||||
);
|
);
|
||||||
|
|
|
@ -31,8 +31,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||||
public final Convertable.ConversionSession convertable;
|
public final Convertable.ConversionSession convertable;
|
||||||
public final UUID uuid;
|
public final UUID uuid;
|
||||||
boolean hasPhysicsEvent = true; // Paper
|
public boolean hasPhysicsEvent = true; // Paper
|
||||||
+ boolean hasEntityMoveEvent = false; // Paper
|
+ public boolean hasEntityMoveEvent = false; // Paper
|
||||||
private static Throwable getAddToWorldStackTrace(Entity entity) {
|
private static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||||
return new Throwable(entity + " Added to world at " + new java.util.Date());
|
return new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
- PlayerChunkMap.EntityTracker tracker; // Paper
|
- PlayerChunkMap.EntityTracker tracker; // Paper
|
||||||
+ public PlayerChunkMap.EntityTracker tracker; // Paper package private -> public
|
+ public PlayerChunkMap.EntityTracker tracker; // Paper package private -> public
|
||||||
boolean collisionLoadChunks = false; // Paper
|
public boolean collisionLoadChunks = false; // Paper
|
||||||
Throwable addedToWorldStack; // Paper - entity debug
|
public Throwable addedToWorldStack; // Paper - entity debug
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
|
|
@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.network;
|
+package com.destroystokyo.paper.network;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.NetworkManager;
|
+import net.minecraft.network.NetworkManager;
|
||||||
+
|
+
|
||||||
+import java.net.InetSocketAddress;
|
+import java.net.InetSocketAddress;
|
||||||
+
|
+
|
||||||
|
|
|
@ -28,6 +28,14 @@ diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/mai
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/level/WorldServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.entity.animal.EntityWaterAnimal;
|
||||||
|
import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton;
|
||||||
|
import net.minecraft.world.entity.boss.EntityComplexPart;
|
||||||
|
import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
|
||||||
|
+import net.minecraft.world.entity.item.EntityItem;
|
||||||
|
import net.minecraft.world.entity.npc.NPC;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.entity.raid.PersistentRaid;
|
||||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
@@ -0,0 +0,0 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||||
} else if (this.isUUIDTaken(entity)) {
|
} else if (this.isUUIDTaken(entity)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -9,6 +9,14 @@ diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.biome.BiomeBase;
|
||||||
|
import net.minecraft.world.level.biome.BiomeManager;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.BlockFireAbstract;
|
||||||
|
+import net.minecraft.world.level.block.BlockRedstoneTorch;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.entity.ITickable;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntity;
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
private org.spigotmc.TickLimiter tileLimiter;
|
private org.spigotmc.TickLimiter tileLimiter;
|
||||||
private int tileTickPosition;
|
private int tileTickPosition;
|
||||||
|
|
|
@ -73,6 +73,14 @@ diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.advancements.CriterionInstance;
|
||||||
|
import net.minecraft.advancements.CriterionProgress;
|
||||||
|
import net.minecraft.advancements.CriterionTrigger;
|
||||||
|
import net.minecraft.advancements.CriterionTriggers;
|
||||||
|
+import net.minecraft.advancements.critereon.CriterionTriggerAbstract;
|
||||||
|
import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.ChatMessageType;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutAdvancements;
|
||||||
@@ -0,0 +0,0 @@ public class AdvancementDataPlayer {
|
@@ -0,0 +0,0 @@ public class AdvancementDataPlayer {
|
||||||
private Advancement l;
|
private Advancement l;
|
||||||
private boolean m = true;
|
private boolean m = true;
|
||||||
|
|
|
@ -43,6 +43,15 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
- 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.world != this.world || this.trackedEntities.containsKey(entity.getId())) {
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
.printStackTrace();
|
.printStackTrace();
|
||||||
return;
|
return;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -203,6 +203,14 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.ja
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.SystemUtils;
|
||||||
|
import net.minecraft.nbt.NBTCompressedStreamTools;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
||||||
protected final RegionFileBitSet freeSectors;
|
protected final RegionFileBitSet freeSectors;
|
||||||
public final File file; // Paper
|
public final File file; // Paper
|
||||||
|
|
|
@ -57,6 +57,14 @@ diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapC
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java
|
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java
|
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.PacketDataSerializer;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntity;
|
||||||
|
+import net.minecraft.world.level.block.entity.TileEntitySkull;
|
||||||
|
import net.minecraft.world.level.chunk.BiomeStorage;
|
||||||
|
import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkSection;
|
||||||
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
|
|
||||||
if (this.f() || (i & 1 << j) != 0) {
|
if (this.f() || (i & 1 << j) != 0) {
|
||||||
|
@ -82,6 +90,14 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkul
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.UUID;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import net.minecraft.nbt.GameProfileSerializer;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
+import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutTileEntityData;
|
||||||
|
import net.minecraft.server.players.UserCache;
|
||||||
|
import net.minecraft.util.UtilColor;
|
||||||
@@ -0,0 +0,0 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa
|
@@ -0,0 +0,0 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
|
@ -91,7 +107,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ static NBTTagCompound sanitizeTileEntityUUID(NBTTagCompound cmp) {
|
+ public static NBTTagCompound sanitizeTileEntityUUID(NBTTagCompound cmp) {
|
||||||
+ NBTTagCompound owner = cmp.getCompound("Owner");
|
+ NBTTagCompound owner = cmp.getCompound("Owner");
|
||||||
+ if (!owner.isEmpty()) {
|
+ if (!owner.isEmpty()) {
|
||||||
+ sanitizeUUID(owner);
|
+ sanitizeUUID(owner);
|
||||||
|
|
|
@ -8,6 +8,14 @@ diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.world.effect.MobEffect;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
|
+import net.minecraft.world.entity.npc.EntityVillagerAbstract;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.EnumGamemode;
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
for (Iterator iterator = entity.getAllPassengers().iterator(); iterator.hasNext(); entity1.dead = true) {
|
for (Iterator iterator = entity.getAllPassengers().iterator(); iterator.hasNext(); entity1.dead = true) {
|
||||||
|
|
|
@ -104,6 +104,14 @@ diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutWind
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutWindowItems.java
|
--- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutWindowItems.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutWindowItems.java
|
+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutWindowItems.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.io.IOException;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import net.minecraft.core.NonNullList;
|
||||||
|
+import net.minecraft.network.NetworkManager;
|
||||||
|
import net.minecraft.network.PacketDataSerializer;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
@@ -0,0 +0,0 @@ public class PacketPlayOutWindowItems implements Packet<PacketListenerPlayOut> {
|
@@ -0,0 +0,0 @@ public class PacketPlayOutWindowItems implements Packet<PacketListenerPlayOut> {
|
||||||
private int a;
|
private int a;
|
||||||
private List<ItemStack> b;
|
private List<ItemStack> b;
|
||||||
|
|
|
@ -21,9 +21,11 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.world.phys.MovingObjectPosition;
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
|
||||||
|
import net.minecraft.world.phys.MovingObjectPosition;
|
||||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||||
|
+import net.minecraft.world.phys.Vec3D;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
+import org.bukkit.Location; // Paper
|
+import org.bukkit.Location; // Paper
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
|
@ -20,10 +20,10 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
|
@@ -0,0 +0,0 @@ import net.minecraft.world.phys.MovingObjectPosition;
|
||||||
import net.minecraft.world.phys.MovingObjectPosition;
|
|
||||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||||
|
import net.minecraft.world.phys.Vec3D;
|
||||||
+import io.papermc.paper.event.block.BlockPreDispenseEvent; // Paper
|
+import io.papermc.paper.event.block.BlockPreDispenseEvent; // Paper
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location; // Paper
|
import org.bukkit.Location; // Paper
|
||||||
|
|
|
@ -26,17 +26,6 @@ diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
|
--- a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
|
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
|
||||||
@@ -0,0 +0,0 @@ import com.destroystokyo.paper.io.PaperFileIOThread;
|
|
||||||
import com.destroystokyo.paper.io.IOUtil;
|
|
||||||
import com.destroystokyo.paper.io.PrioritizedTaskQueue;
|
|
||||||
import com.destroystokyo.paper.io.QueueExecutorThread;
|
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
|
||||||
+import net.minecraft.server.ChunkCoordIntPair;
|
|
||||||
import net.minecraft.server.ChunkRegionLoader;
|
|
||||||
+import net.minecraft.server.ChunkStatus;
|
|
||||||
import net.minecraft.server.IAsyncTaskHandler;
|
|
||||||
import net.minecraft.server.IChunkAccess;
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
@@ -0,0 +0,0 @@ public final class ChunkTaskManager {
|
@@ -0,0 +0,0 @@ public final class ChunkTaskManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +82,17 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java b/sr
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMapDistance.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.Set;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
+import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.util.ArraySetSorted;
|
||||||
|
import net.minecraft.util.thread.Mailbox;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.Chunk;
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.Chunk;
|
||||||
import net.minecraft.world.level.chunk.ChunkStatus;
|
import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
@ -572,6 +572,14 @@ diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.server.AdvancementDataPlayer;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.network.ITextFilter;
|
||||||
|
import net.minecraft.server.network.PlayerConnection;
|
||||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
private int lastArmorScored = Integer.MIN_VALUE;
|
private int lastArmorScored = Integer.MIN_VALUE;
|
||||||
private int lastExpLevelScored = Integer.MIN_VALUE;
|
private int lastExpLevelScored = Integer.MIN_VALUE;
|
||||||
|
@ -888,6 +896,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
|
import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
|
||||||
import it.unimi.dsi.fastutil.longs.LongIterator;
|
import it.unimi.dsi.fastutil.longs.LongIterator;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.CrashReport;
|
||||||
|
import net.minecraft.CrashReportSystemDetails;
|
||||||
|
import net.minecraft.ReportedException;
|
||||||
|
import net.minecraft.SystemUtils;
|
||||||
|
+import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager;
|
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
|
|
@ -30,25 +30,199 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.entity.ai;
|
+package com.destroystokyo.paper.entity.ai;
|
||||||
+
|
+
|
||||||
|
+import com.destroystokyo.paper.entity.RangedEntity;
|
||||||
|
+import com.destroystokyo.paper.util.set.OptimizedSmallEnumSet;
|
||||||
+import com.google.common.collect.BiMap;
|
+import com.google.common.collect.BiMap;
|
||||||
+import com.google.common.collect.HashBiMap;
|
+import com.google.common.collect.HashBiMap;
|
||||||
+
|
|
||||||
+import com.destroystokyo.paper.entity.RangedEntity;
|
|
||||||
+import com.destroystokyo.paper.entity.ai.GoalKey;
|
|
||||||
+import com.destroystokyo.paper.entity.ai.GoalType;
|
|
||||||
+import com.destroystokyo.paper.util.set.OptimizedSmallEnumSet;
|
|
||||||
+
|
|
||||||
+import net.minecraft.server.*; // intentional star import
|
|
||||||
+
|
|
||||||
+import java.lang.reflect.Constructor;
|
+import java.lang.reflect.Constructor;
|
||||||
+import java.util.EnumSet;
|
+import java.util.EnumSet;
|
||||||
+import java.util.HashMap;
|
+import java.util.HashMap;
|
||||||
+import java.util.HashSet;
|
+import java.util.HashSet;
|
||||||
+import java.util.Map;
|
+import java.util.Map;
|
||||||
+import java.util.Set;
|
+import java.util.Set;
|
||||||
+
|
+import net.minecraft.world.entity.EntityAgeable;
|
||||||
|
+import net.minecraft.world.entity.EntityCreature;
|
||||||
|
+import net.minecraft.world.entity.EntityFlying;
|
||||||
|
+import net.minecraft.world.entity.EntityInsentient;
|
||||||
|
+import net.minecraft.world.entity.EntityTameableAnimal;
|
||||||
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoal;
|
||||||
|
+import net.minecraft.world.entity.ambient.EntityAmbient;
|
||||||
|
+import net.minecraft.world.entity.ambient.EntityBat;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityAnimal;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityBee;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityCat;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityChicken;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityCod;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityCow;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityDolphin;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityFish;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityFishSchool;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityFox;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityGolem;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityIronGolem;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityMushroomCow;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityOcelot;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityPanda;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityParrot;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityPerchable;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityPig;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityPolarBear;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityPufferFish;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityRabbit;
|
||||||
|
+import net.minecraft.world.entity.animal.EntitySalmon;
|
||||||
|
+import net.minecraft.world.entity.animal.EntitySheep;
|
||||||
|
+import net.minecraft.world.entity.animal.EntitySnowman;
|
||||||
|
+import net.minecraft.world.entity.animal.EntitySquid;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityTropicalFish;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityTurtle;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityWaterAnimal;
|
||||||
|
+import net.minecraft.world.entity.animal.EntityWolf;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorse;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorseAbstract;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorseChestedAbstract;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorseDonkey;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorseMule;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityHorseZombie;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityLlama;
|
||||||
|
+import net.minecraft.world.entity.animal.horse.EntityLlamaTrader;
|
||||||
|
+import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
|
||||||
|
+import net.minecraft.world.entity.boss.wither.EntityWither;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityBlaze;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityCaveSpider;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityCreeper;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityDrowned;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityEnderman;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityEndermite;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityEvoker;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityGhast;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityGiantZombie;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityGuardian;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityGuardianElder;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityIllagerAbstract;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityIllagerIllusioner;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityIllagerWizard;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityMagmaCube;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityMonster;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityMonsterPatrolling;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityPhantom;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityPigZombie;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityPillager;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityRavager;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityShulker;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySilverfish;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySkeleton;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySkeletonAbstract;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySkeletonStray;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySkeletonWither;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySlime;
|
||||||
|
+import net.minecraft.world.entity.monster.EntitySpider;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityStrider;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityVex;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityVindicator;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityWitch;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityZoglin;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityZombie;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityZombieHusk;
|
||||||
|
+import net.minecraft.world.entity.monster.EntityZombieVillager;
|
||||||
|
+import net.minecraft.world.entity.monster.IRangedEntity;
|
||||||
|
+import net.minecraft.world.entity.monster.hoglin.EntityHoglin;
|
||||||
|
+import net.minecraft.world.entity.monster.piglin.EntityPiglin;
|
||||||
|
+import net.minecraft.world.entity.monster.piglin.EntityPiglinAbstract;
|
||||||
|
+import net.minecraft.world.entity.monster.piglin.EntityPiglinBrute;
|
||||||
|
+import net.minecraft.world.entity.npc.EntityVillager;
|
||||||
|
+import net.minecraft.world.entity.npc.EntityVillagerAbstract;
|
||||||
|
+import net.minecraft.world.entity.npc.EntityVillagerTrader;
|
||||||
|
+import net.minecraft.world.entity.raid.EntityRaider;
|
||||||
+import org.bukkit.NamespacedKey;
|
+import org.bukkit.NamespacedKey;
|
||||||
+import org.bukkit.entity.*; // intentional star import
|
+import org.bukkit.entity.AbstractHorse;
|
||||||
|
+import org.bukkit.entity.AbstractVillager;
|
||||||
|
+import org.bukkit.entity.Ageable;
|
||||||
|
+import org.bukkit.entity.Ambient;
|
||||||
|
+import org.bukkit.entity.Animals;
|
||||||
|
+import org.bukkit.entity.Bat;
|
||||||
|
+import org.bukkit.entity.Bee;
|
||||||
|
+import org.bukkit.entity.Blaze;
|
||||||
|
+import org.bukkit.entity.Cat;
|
||||||
|
+import org.bukkit.entity.CaveSpider;
|
||||||
|
+import org.bukkit.entity.ChestedHorse;
|
||||||
|
+import org.bukkit.entity.Chicken;
|
||||||
|
+import org.bukkit.entity.Cod;
|
||||||
|
+import org.bukkit.entity.Cow;
|
||||||
|
+import org.bukkit.entity.Creature;
|
||||||
|
+import org.bukkit.entity.Creeper;
|
||||||
|
+import org.bukkit.entity.Dolphin;
|
||||||
|
+import org.bukkit.entity.Donkey;
|
||||||
|
+import org.bukkit.entity.Drowned;
|
||||||
|
+import org.bukkit.entity.ElderGuardian;
|
||||||
|
+import org.bukkit.entity.EnderDragon;
|
||||||
|
+import org.bukkit.entity.Enderman;
|
||||||
|
+import org.bukkit.entity.Endermite;
|
||||||
|
+import org.bukkit.entity.Evoker;
|
||||||
|
+import org.bukkit.entity.Fish;
|
||||||
|
+import org.bukkit.entity.Flying;
|
||||||
|
+import org.bukkit.entity.Fox;
|
||||||
|
+import org.bukkit.entity.Ghast;
|
||||||
|
+import org.bukkit.entity.Giant;
|
||||||
|
+import org.bukkit.entity.Golem;
|
||||||
|
+import org.bukkit.entity.Guardian;
|
||||||
|
+import org.bukkit.entity.Hoglin;
|
||||||
|
+import org.bukkit.entity.Horse;
|
||||||
|
+import org.bukkit.entity.Husk;
|
||||||
|
+import org.bukkit.entity.Illager;
|
||||||
|
+import org.bukkit.entity.Illusioner;
|
||||||
|
+import org.bukkit.entity.IronGolem;
|
||||||
|
+import org.bukkit.entity.Llama;
|
||||||
|
+import org.bukkit.entity.MagmaCube;
|
||||||
|
+import org.bukkit.entity.Mob;
|
||||||
|
+import org.bukkit.entity.Monster;
|
||||||
|
+import org.bukkit.entity.Mule;
|
||||||
|
+import org.bukkit.entity.MushroomCow;
|
||||||
|
+import org.bukkit.entity.Ocelot;
|
||||||
|
+import org.bukkit.entity.Panda;
|
||||||
|
+import org.bukkit.entity.Parrot;
|
||||||
|
+import org.bukkit.entity.Phantom;
|
||||||
|
+import org.bukkit.entity.Pig;
|
||||||
|
+import org.bukkit.entity.PigZombie;
|
||||||
|
+import org.bukkit.entity.Piglin;
|
||||||
|
+import org.bukkit.entity.PiglinAbstract;
|
||||||
|
+import org.bukkit.entity.PiglinBrute;
|
||||||
|
+import org.bukkit.entity.Pillager;
|
||||||
|
+import org.bukkit.entity.PolarBear;
|
||||||
|
+import org.bukkit.entity.PufferFish;
|
||||||
|
+import org.bukkit.entity.Rabbit;
|
||||||
|
+import org.bukkit.entity.Raider;
|
||||||
|
+import org.bukkit.entity.Ravager;
|
||||||
|
+import org.bukkit.entity.Salmon;
|
||||||
|
+import org.bukkit.entity.Sheep;
|
||||||
|
+import org.bukkit.entity.Shulker;
|
||||||
|
+import org.bukkit.entity.Silverfish;
|
||||||
|
+import org.bukkit.entity.Skeleton;
|
||||||
|
+import org.bukkit.entity.SkeletonHorse;
|
||||||
|
+import org.bukkit.entity.Slime;
|
||||||
|
+import org.bukkit.entity.Snowman;
|
||||||
|
+import org.bukkit.entity.Spellcaster;
|
||||||
|
+import org.bukkit.entity.Spider;
|
||||||
|
+import org.bukkit.entity.Squid;
|
||||||
|
+import org.bukkit.entity.Stray;
|
||||||
|
+import org.bukkit.entity.Strider;
|
||||||
|
+import org.bukkit.entity.Tameable;
|
||||||
|
+import org.bukkit.entity.TraderLlama;
|
||||||
|
+import org.bukkit.entity.TropicalFish;
|
||||||
|
+import org.bukkit.entity.Turtle;
|
||||||
|
+import org.bukkit.entity.Vex;
|
||||||
|
+import org.bukkit.entity.Villager;
|
||||||
|
+import org.bukkit.entity.Vindicator;
|
||||||
|
+import org.bukkit.entity.WanderingTrader;
|
||||||
|
+import org.bukkit.entity.WaterMob;
|
||||||
|
+import org.bukkit.entity.Witch;
|
||||||
|
+import org.bukkit.entity.Wither;
|
||||||
|
+import org.bukkit.entity.WitherSkeleton;
|
||||||
|
+import org.bukkit.entity.Wolf;
|
||||||
|
+import org.bukkit.entity.Zoglin;
|
||||||
|
+import org.bukkit.entity.Zombie;
|
||||||
|
+import org.bukkit.entity.ZombieHorse;
|
||||||
|
+import org.bukkit.entity.ZombieVillager;
|
||||||
+
|
+
|
||||||
+public class MobGoalHelper {
|
+public class MobGoalHelper {
|
||||||
+
|
+
|
||||||
|
@ -392,8 +566,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.entity.ai;
|
+package com.destroystokyo.paper.entity.ai;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.PathfinderGoal;
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoal;
|
||||||
+
|
|
||||||
+import org.bukkit.entity.Mob;
|
+import org.bukkit.entity.Mob;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
|
@ -453,10 +626,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.entity.ai;
|
+package com.destroystokyo.paper.entity.ai;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.PathfinderGoal;
|
|
||||||
+import net.minecraft.server.PathfinderGoalSelector;
|
|
||||||
+import net.minecraft.server.PathfinderGoalWrapped;
|
|
||||||
+
|
|
||||||
+import java.util.Collection;
|
+import java.util.Collection;
|
||||||
+import java.util.EnumSet;
|
+import java.util.EnumSet;
|
||||||
+import java.util.HashMap;
|
+import java.util.HashMap;
|
||||||
|
@ -465,7 +634,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.Map;
|
+import java.util.Map;
|
||||||
+import java.util.Set;
|
+import java.util.Set;
|
||||||
+
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoal;
|
||||||
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoalSelector;
|
||||||
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoalWrapped;
|
||||||
+import org.bukkit.craftbukkit.entity.CraftMob;
|
+import org.bukkit.craftbukkit.entity.CraftMob;
|
||||||
+import org.bukkit.entity.Mob;
|
+import org.bukkit.entity.Mob;
|
||||||
+
|
+
|
||||||
|
@ -589,7 +760,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ CraftMob craftMob = (CraftMob) mob;
|
+ CraftMob craftMob = (CraftMob) mob;
|
||||||
+ Set<Goal<T>> goals = new HashSet<>();
|
+ Set<Goal<T>> goals = new HashSet<>();
|
||||||
+ for (GoalType internalType : GoalType.values()) {
|
+ for (GoalType internalType : GoalType.values()) {
|
||||||
+ if(internalType == type) {
|
+ if (internalType == type) {
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+ for (PathfinderGoalWrapped item : getHandle(craftMob, internalType).getTasks()) {
|
+ for (PathfinderGoalWrapped item : getHandle(craftMob, internalType).getTasks()) {
|
||||||
|
@ -683,10 +854,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.entity.ai;
|
+package com.destroystokyo.paper.entity.ai;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.PathfinderGoal;
|
|
||||||
+
|
|
||||||
+import java.util.EnumSet;
|
+import java.util.EnumSet;
|
||||||
+
|
+
|
||||||
|
+import net.minecraft.world.entity.ai.goal.PathfinderGoal;
|
||||||
+import org.bukkit.entity.Mob;
|
+import org.bukkit.entity.Mob;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
|
|
|
@ -13,8 +13,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+package com.destroystokyo.paper.network;
|
+package com.destroystokyo.paper.network;
|
||||||
+
|
+
|
||||||
+import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
+import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
|
||||||
+import net.minecraft.server.EntityPlayer;
|
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
+import org.bukkit.entity.Player;
|
+import org.bukkit.entity.Player;
|
||||||
+import org.bukkit.util.CachedServerIcon;
|
+import org.bukkit.util.CachedServerIcon;
|
||||||
+
|
+
|
||||||
|
@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.network;
|
+package com.destroystokyo.paper.network;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.NetworkManager;
|
+import net.minecraft.network.NetworkManager;
|
||||||
+
|
+
|
||||||
+class PaperStatusClient extends PaperNetworkClient implements StatusClient {
|
+class PaperStatusClient extends PaperNetworkClient implements StatusClient {
|
||||||
+
|
+
|
||||||
|
@ -75,10 +75,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.UUID;
|
+import java.util.UUID;
|
||||||
+import javax.annotation.Nonnull;
|
+import javax.annotation.Nonnull;
|
||||||
|
+import net.minecraft.network.NetworkManager;
|
||||||
|
+import net.minecraft.network.protocol.status.PacketStatusOutServerInfo;
|
||||||
|
+import net.minecraft.network.protocol.status.ServerPing;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.NetworkManager;
|
|
||||||
+import net.minecraft.network.protocol.game.PacketStatusOutServerInfo;
|
|
||||||
+import net.minecraft.server.ServerPing;
|
|
||||||
+
|
+
|
||||||
+public final class StandardPaperServerListPingEventImpl extends PaperServerListPingEventImpl {
|
+public final class StandardPaperServerListPingEventImpl extends PaperServerListPingEventImpl {
|
||||||
+
|
+
|
||||||
|
|
|
@ -28,6 +28,22 @@ diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.item.ItemElytra;
|
||||||
|
import net.minecraft.world.item.ItemProjectileWeapon;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.ItemSword;
|
||||||
|
+import net.minecraft.world.item.ItemWorldMap;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.item.crafting.IRecipe;
|
||||||
|
import net.minecraft.world.item.enchantment.EnchantmentManager;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.block.entity.TileEntitySign;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntityStructure;
|
||||||
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
import net.minecraft.world.level.block.state.pattern.ShapeDetectorBlock;
|
||||||
|
+import net.minecraft.world.level.saveddata.maps.WorldMap;
|
||||||
|
import net.minecraft.world.phys.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.phys.Vec3D;
|
||||||
|
import net.minecraft.world.scores.Scoreboard;
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,14 @@ diff --git a/src/main/java/net/minecraft/SystemUtils.java b/src/main/java/net/mi
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/SystemUtils.java
|
--- a/src/main/java/net/minecraft/SystemUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/SystemUtils.java
|
+++ b/src/main/java/net/minecraft/SystemUtils.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.stream.Stream;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.server.DispenserRegistry;
|
||||||
|
+import net.minecraft.server.ServerWorkerThread;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.datafix.DataConverterRegistry;
|
||||||
|
import net.minecraft.world.level.block.state.properties.IBlockState;
|
||||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class SystemUtils {
|
public class SystemUtils {
|
||||||
|
|
||||||
|
|
|
@ -349,6 +349,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayInCloseWindow;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
+import net.minecraft.sounds.SoundCategory;
|
||||||
|
+import net.minecraft.sounds.SoundEffect;
|
||||||
|
import net.minecraft.util.Unit;
|
||||||
|
import net.minecraft.world.EnumHand;
|
||||||
|
import net.minecraft.world.IInventory;
|
||||||
@@ -0,0 +0,0 @@ public class CraftEventFactory {
|
@@ -0,0 +0,0 @@ public class CraftEventFactory {
|
||||||
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
|
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||||
|
@ -391,7 +400,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ private static void populateFields(EntityLiving victim, EntityDeathEvent event) {
|
+ private static void populateFields(EntityLiving victim, EntityDeathEvent event) {
|
||||||
+ event.setReviveHealth(event.getEntity().getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue());
|
+ event.setReviveHealth(event.getEntity().getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue());
|
||||||
+ event.setShouldPlayDeathSound(!victim.silentDeath && !victim.isSilent());
|
+ event.setShouldPlayDeathSound(!victim.silentDeath && !victim.isSilent());
|
||||||
+ net.minecraft.server.SoundEffect soundEffect = victim.getDeathSoundEffect();
|
+ SoundEffect soundEffect = victim.getDeathSoundEffect();
|
||||||
+ 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.getSoundCategory().name()));
|
+ event.setDeathSoundCategory(org.bukkit.SoundCategory.valueOf(victim.getSoundCategory().name()));
|
||||||
+ event.setDeathSoundVolume(victim.getDeathSoundVolume());
|
+ event.setDeathSoundVolume(victim.getDeathSoundVolume());
|
||||||
|
@ -405,8 +414,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ double x = event.getEntity().getLocation().getX();
|
+ double x = event.getEntity().getLocation().getX();
|
||||||
+ double y = event.getEntity().getLocation().getY();
|
+ double y = event.getEntity().getLocation().getY();
|
||||||
+ double z = event.getEntity().getLocation().getZ();
|
+ double z = event.getEntity().getLocation().getZ();
|
||||||
+ net.minecraft.server.SoundEffect soundEffect = org.bukkit.craftbukkit.CraftSound.getSoundEffect(event.getDeathSound());
|
+ SoundEffect soundEffect = org.bukkit.craftbukkit.CraftSound.getSoundEffect(event.getDeathSound());
|
||||||
+ net.minecraft.server.SoundCategory soundCategory = net.minecraft.server.SoundCategory.valueOf(event.getDeathSoundCategory().name());
|
+ SoundCategory soundCategory = SoundCategory.valueOf(event.getDeathSoundCategory().name());
|
||||||
+ victim.world.playSound(source, x, y, z, soundEffect, soundCategory, event.getDeathSoundVolume(), event.getDeathSoundPitch());
|
+ victim.world.playSound(source, x, y, z, soundEffect, soundCategory, event.getDeathSoundVolume(), event.getDeathSoundPitch());
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -47,10 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package org.bukkit.craftbukkit.inventory;
|
+package org.bukkit.craftbukkit.inventory;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.IInventory;
|
+import net.minecraft.world.IInventory;
|
||||||
+
|
|
||||||
+import org.bukkit.inventory.AbstractHorseInventory;
|
|
||||||
+import org.bukkit.inventory.ItemStack;
|
|
||||||
+import org.bukkit.inventory.SaddledHorseInventory;
|
+import org.bukkit.inventory.SaddledHorseInventory;
|
||||||
+
|
+
|
||||||
+public class CraftSaddledInventory extends CraftInventoryAbstractHorse implements SaddledHorseInventory {
|
+public class CraftSaddledInventory extends CraftInventoryAbstractHorse implements SaddledHorseInventory {
|
||||||
|
|
|
@ -334,7 +334,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
+ if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
+ if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||||
// Paper start - Prevent tile entity and entity crashes
|
// Paper start - Prevent tile entity and entity crashes
|
||||||
String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ();
|
String msg = "TileEntity threw exception at " + tileentity.getWorld().getWorld().getName() + ":" + tileentity.getPosition().getX() + "," + tileentity.getPosition().getY() + "," + tileentity.getPosition().getZ();
|
||||||
System.err.println(msg);
|
System.err.println(msg);
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -21,6 +21,14 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.world.EnumHand;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.effect.MobEffect;
|
||||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||||
return getHandle().killer == null ? null : (Player) getHandle().killer.getBukkitEntity();
|
return getHandle().killer == null ? null : (Player) getHandle().killer.getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -28,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void setKiller(Player killer) {
|
+ public void setKiller(Player killer) {
|
||||||
+ net.minecraft.server.EntityPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
+ EntityPlayer entityPlayer = killer == null ? null : ((CraftPlayer) killer).getHandle();
|
||||||
+ getHandle().killer = entityPlayer;
|
+ getHandle().killer = entityPlayer;
|
||||||
+ getHandle().lastDamager = entityPlayer;
|
+ getHandle().lastDamager = entityPlayer;
|
||||||
+ getHandle().lastDamageByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity
|
+ getHandle().lastDamageByPlayerTime = entityPlayer == null ? 0 : 100; // 100 value taken from EntityLiving#damageEntity
|
||||||
|
|
|
@ -79,7 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
private static final Logger LOGGER = LogManager.getLogger();
|
private static final Logger LOGGER = LogManager.getLogger();
|
||||||
public final NetworkManager networkManager;
|
public final NetworkManager networkManager;
|
||||||
private final MinecraftServer minecraftServer;
|
private final MinecraftServer minecraftServer;
|
||||||
+ Runnable playerJoinReady; // Paper
|
+ public Runnable playerJoinReady; // Paper
|
||||||
public EntityPlayer player;
|
public EntityPlayer player;
|
||||||
private int e;
|
private int e;
|
||||||
private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER
|
private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER
|
||||||
|
@ -112,6 +112,23 @@ diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutEntityStatus;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutExperience;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutGameStateChange;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutHeldItemSlot;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutKickDisconnect;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutLogin;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutNamedSoundEffect;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutPlayerInfo;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.ScoreboardServer;
|
||||||
|
import net.minecraft.server.level.DemoPlayerInteractManager;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
+import net.minecraft.server.level.PlayerChunk;
|
||||||
|
+import net.minecraft.server.level.PlayerChunkMap;
|
||||||
|
import net.minecraft.server.level.PlayerInteractManager;
|
||||||
|
import net.minecraft.server.level.TicketType;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
private static final SimpleDateFormat g = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
|
||||||
private final MinecraftServer server;
|
private final MinecraftServer server;
|
||||||
|
@ -176,7 +193,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ });
|
+ });
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ EntityPlayer getActivePlayer(UUID uuid) {
|
+ public EntityPlayer getActivePlayer(UUID uuid) {
|
||||||
+ EntityPlayer player = this.getUUIDMap().get(uuid);
|
+ EntityPlayer player = this.getUUIDMap().get(uuid);
|
||||||
+ return player != null ? player : pendingPlayers.get(uuid);
|
+ return player != null ? player : pendingPlayers.get(uuid);
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -14,6 +14,14 @@ diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutViewDistance;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutWorldBorder;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.server.AdvancementDataPlayer;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.ScoreboardServer;
|
||||||
|
import net.minecraft.server.level.DemoPlayerInteractManager;
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
||||||
|
|
|
@ -3518,6 +3518,14 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutLightUpdate;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutMount;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutViewCentre;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.level.progress.WorldLoadListener;
|
||||||
|
import net.minecraft.util.CSVWriter;
|
||||||
|
import net.minecraft.util.EntitySlice;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
};
|
};
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -3788,7 +3796,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
public final NonNullList<ItemStack> armor;
|
public final NonNullList<ItemStack> armor;
|
||||||
public final NonNullList<ItemStack> extraSlots;
|
public final NonNullList<ItemStack> extraSlots;
|
||||||
- private final List<NonNullList<ItemStack>> f;
|
- private final List<NonNullList<ItemStack>> f;
|
||||||
+ private final List<NonNullList<ItemStack>> f;List<NonNullList<ItemStack>> getComponents() { return f; } // Paper - OBFHELPER
|
+ private final List<NonNullList<ItemStack>> f; public final List<NonNullList<ItemStack>> getComponents() { return f; } // Paper - OBFHELPER
|
||||||
public int itemInHandIndex;
|
public int itemInHandIndex;
|
||||||
public final EntityHuman player;
|
public final EntityHuman player;
|
||||||
private ItemStack carried;
|
private ItemStack carried;
|
||||||
|
@ -3985,6 +3993,18 @@ diff --git a/src/main/java/net/minecraft/world/level/IBlockAccess.java b/src/mai
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/IBlockAccess.java
|
--- a/src/main/java/net/minecraft/world/level/IBlockAccess.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/IBlockAccess.java
|
+++ b/src/main/java/net/minecraft/world/level/IBlockAccess.java
|
||||||
|
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
||||||
|
import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.EnumDirection;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
+import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntity;
|
||||||
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
import net.minecraft.world.level.material.Fluid;
|
||||||
|
+import net.minecraft.world.level.material.Material;
|
||||||
|
import net.minecraft.world.phys.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||||
|
import net.minecraft.world.phys.Vec3D;
|
||||||
@@ -0,0 +0,0 @@ public interface IBlockAccess {
|
@@ -0,0 +0,0 @@ public interface IBlockAccess {
|
||||||
TileEntity getTileEntity(BlockPosition blockposition);
|
TileEntity getTileEntity(BlockPosition blockposition);
|
||||||
|
|
||||||
|
|
|
@ -162,9 +162,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.gui;
|
+package com.destroystokyo.paper.gui;
|
||||||
+
|
+
|
||||||
|
+import net.minecraft.SystemUtils;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import net.minecraft.server.SystemUtils;
|
|
||||||
+import org.bukkit.Bukkit;
|
|
||||||
+
|
+
|
||||||
+import javax.swing.DefaultListCellRenderer;
|
+import javax.swing.DefaultListCellRenderer;
|
||||||
+import javax.swing.DefaultListSelectionModel;
|
+import javax.swing.DefaultListSelectionModel;
|
||||||
|
@ -177,7 +176,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.Vector;
|
+import java.util.Vector;
|
||||||
+
|
+
|
||||||
+public class RAMDetails extends JList<String> {
|
+public class RAMDetails extends JList<String> {
|
||||||
+ public static final DecimalFormat DECIMAL_FORMAT = SystemUtils.a(new DecimalFormat("########0.000"), (format)
|
+ public static final DecimalFormat DECIMAL_FORMAT = SystemUtils.peek(new DecimalFormat("########0.000"), (format)
|
||||||
+ -> format.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)));
|
+ -> format.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)));
|
||||||
+
|
+
|
||||||
+ private final MinecraftServer server;
|
+ private final MinecraftServer server;
|
||||||
|
@ -384,6 +383,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ timer.stop();
|
+ timer.stop();
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
|
diff --git a/src/main/java/net/minecraft/SystemUtils.java b/src/main/java/net/minecraft/SystemUtils.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/SystemUtils.java
|
||||||
|
+++ b/src/main/java/net/minecraft/SystemUtils.java
|
||||||
|
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||||
|
return supplier.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public static <T> T peek(T t0, Consumer<T> consumer) { return a(t0, consumer); } // Paper - OBFHELPER
|
||||||
|
public static <T> T a(T t0, Consumer<T> consumer) {
|
||||||
|
consumer.accept(t0);
|
||||||
|
return t0;
|
||||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
|
|
|
@ -150,6 +150,14 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.server.MCUtil;
|
||||||
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.progress.WorldLoadListener;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.profiling.GameProfilerFiller;
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
this.world.getMethodProfiler().enter("purge");
|
this.world.getMethodProfiler().enter("purge");
|
||||||
this.world.timings.doChunkMap.startTiming(); // Spigot
|
this.world.timings.doChunkMap.startTiming(); // Spigot
|
||||||
|
|
|
@ -13,9 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.entity;
|
+package com.destroystokyo.paper.entity;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.EntityInsentient;
|
+import net.minecraft.world.entity.EntityInsentient;
|
||||||
+import net.minecraft.server.PathEntity;
|
+import net.minecraft.world.level.pathfinder.PathEntity;
|
||||||
+import net.minecraft.server.PathPoint;
|
+import net.minecraft.world.level.pathfinder.PathPoint;
|
||||||
+import org.apache.commons.lang.Validate;
|
+import org.apache.commons.lang.Validate;
|
||||||
+import org.bukkit.Location;
|
+import org.bukkit.Location;
|
||||||
+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||||
|
|
|
@ -85,14 +85,21 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
|
||||||
@@ -0,0 +0,0 @@ import org.bukkit.Material;
|
@@ -0,0 +0,0 @@
|
||||||
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
+import net.minecraft.core.IRegistry;
|
||||||
|
+import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
|
+import net.minecraft.world.level.MobSpawnerData;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.CreatureSpawner;
|
import org.bukkit.block.CreatureSpawner;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
+// Paper start
|
+// Paper start
|
||||||
+import net.minecraft.server.IRegistry;
|
|
||||||
+import net.minecraft.server.MobSpawnerData;
|
|
||||||
+import net.minecraft.server.NBTTagCompound;
|
|
||||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||||
+import org.bukkit.inventory.ItemStack;
|
+import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -119,7 +126,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void setSpawnedItem(ItemStack itemStack) {
|
+ public void setSpawnedItem(ItemStack itemStack) {
|
||||||
+ Preconditions.checkArgument(itemStack != null && !itemStack.getType().isAir(), "spawners cannot spawn air");
|
+ Preconditions.checkArgument(itemStack != null && !itemStack.getType().isAir(), "spawners cannot spawn air");
|
||||||
+ net.minecraft.server.ItemStack item = CraftItemStack.asNMSCopy(itemStack);
|
+ net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(itemStack);
|
||||||
+ NBTTagCompound compound = new NBTTagCompound();
|
+ NBTTagCompound compound = new NBTTagCompound();
|
||||||
+ NBTTagCompound entity = new NBTTagCompound();
|
+ NBTTagCompound entity = new NBTTagCompound();
|
||||||
+ entity.setString("id", IRegistry.ENTITY_TYPE.getKey(EntityTypes.ITEM).toString());
|
+ entity.setString("id", IRegistry.ENTITY_TYPE.getKey(EntityTypes.ITEM).toString());
|
||||||
|
|
|
@ -182,6 +182,18 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutLightUpdate;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutMount;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutViewCentre;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutViewDistance;
|
||||||
|
import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.progress.WorldLoadListener;
|
||||||
|
+import net.minecraft.server.network.PlayerConnection;
|
||||||
|
import net.minecraft.util.CSVWriter;
|
||||||
|
import net.minecraft.util.EntitySlice;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
private boolean updatingChunksModified;
|
private boolean updatingChunksModified;
|
||||||
private final ChunkTaskQueueSorter p;
|
private final ChunkTaskQueueSorter p;
|
||||||
|
@ -492,7 +504,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper end - per player view distance
|
+ // Paper end - per player view distance
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addEntity(Entity entity) {
|
public void addEntity(Entity entity) { // Paper - protected -> public
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
private int tickPosition;
|
private int tickPosition;
|
||||||
public final Convertable.ConversionSession convertable;
|
public final Convertable.ConversionSession convertable;
|
||||||
public final UUID uuid;
|
public final UUID uuid;
|
||||||
+ boolean hasPhysicsEvent = true; // Paper
|
+ public boolean hasPhysicsEvent = true; // Paper
|
||||||
|
|
||||||
@Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
@Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||||
return this.chunkProvider.getChunkAt(x, z, false);
|
return this.chunkProvider.getChunkAt(x, z, false);
|
||||||
|
|
|
@ -67,25 +67,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.server.ticklist;
|
+package com.destroystokyo.paper.server.ticklist;
|
||||||
+
|
+
|
||||||
|
+import java.util.function.Function;
|
||||||
|
+import net.minecraft.CrashReport;
|
||||||
|
+import net.minecraft.CrashReportSystemDetails;
|
||||||
|
+import net.minecraft.ReportedException;
|
||||||
|
+import net.minecraft.core.BlockPosition;
|
||||||
|
+import net.minecraft.nbt.NBTTagList;
|
||||||
|
+import net.minecraft.resources.MinecraftKey;
|
||||||
+import net.minecraft.server.MCUtil;
|
+import net.minecraft.server.MCUtil;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
+import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||||
+import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
|
+import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
|
||||||
+import net.minecraft.server.BlockPosition;
|
|
||||||
+import net.minecraft.server.ChunkCoordIntPair;
|
|
||||||
+import net.minecraft.server.ChunkProviderServer;
|
|
||||||
+import net.minecraft.server.CrashReport;
|
|
||||||
+import net.minecraft.server.CrashReportSystemDetails;
|
|
||||||
+import net.minecraft.server.IBlockData;
|
|
||||||
+import net.minecraft.server.MinecraftKey;
|
|
||||||
+import net.minecraft.server.NBTTagList;
|
|
||||||
+import net.minecraft.server.NextTickListEntry;
|
|
||||||
+import net.minecraft.server.ReportedException;
|
|
||||||
+import net.minecraft.server.StructureBoundingBox;
|
|
||||||
+import net.minecraft.server.TickListPriority;
|
|
||||||
+import net.minecraft.server.TickListServer;
|
|
||||||
+import net.minecraft.server.WorldServer;
|
|
||||||
+import java.util.ArrayDeque;
|
+import java.util.ArrayDeque;
|
||||||
+import java.util.ArrayList;
|
+import java.util.ArrayList;
|
||||||
+import java.util.Collections;
|
+import java.util.Collections;
|
||||||
|
@ -93,8 +86,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.Iterator;
|
+import java.util.Iterator;
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.function.Consumer;
|
+import java.util.function.Consumer;
|
||||||
+import java.util.function.Function;
|
|
||||||
+import java.util.function.Predicate;
|
+import java.util.function.Predicate;
|
||||||
|
+import net.minecraft.server.level.ChunkProviderServer;
|
||||||
|
+import net.minecraft.server.level.WorldServer;
|
||||||
|
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
+import net.minecraft.world.level.NextTickListEntry;
|
||||||
|
+import net.minecraft.world.level.TickListPriority;
|
||||||
|
+import net.minecraft.world.level.TickListServer;
|
||||||
|
+import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
+import net.minecraft.world.level.levelgen.structure.StructureBoundingBox;
|
||||||
+
|
+
|
||||||
+public final class PaperTickList<T> extends TickListServer<T> { // extend to avoid breaking ABI
|
+public final class PaperTickList<T> extends TickListServer<T> { // extend to avoid breaking ABI
|
||||||
+
|
+
|
||||||
|
@ -334,7 +334,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ private boolean warnedAboutDesync;
|
+ private boolean warnedAboutDesync;
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ protected void nextTick() {
|
+ public void nextTick() {
|
||||||
+ ++this.currentTick;
|
+ ++this.currentTick;
|
||||||
+ if (this.currentTick != this.world.getTime()) {
|
+ if (this.currentTick != this.world.getTime()) {
|
||||||
+ if (!this.warnedAboutDesync) {
|
+ if (!this.warnedAboutDesync) {
|
||||||
|
@ -702,9 +702,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+package com.destroystokyo.paper.server.ticklist;
|
+package com.destroystokyo.paper.server.ticklist;
|
||||||
+
|
+
|
||||||
+import com.destroystokyo.paper.util.set.LinkedSortedSet;
|
+import com.destroystokyo.paper.util.set.LinkedSortedSet;
|
||||||
+import net.minecraft.server.NextTickListEntry;
|
|
||||||
+import net.minecraft.server.TickListPriority;
|
|
||||||
+import java.util.Comparator;
|
+import java.util.Comparator;
|
||||||
|
+import net.minecraft.world.level.NextTickListEntry;
|
||||||
|
+import net.minecraft.world.level.TickListPriority;
|
||||||
+
|
+
|
||||||
+// represents a set of entries to tick at a specified time
|
+// represents a set of entries to tick at a specified time
|
||||||
+public final class TickListServerInterval<T> {
|
+public final class TickListServerInterval<T> {
|
||||||
|
@ -904,6 +904,14 @@ diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.SystemUtils;
|
||||||
|
import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.level.progress.WorldLoadListener;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.profiling.GameProfilerFiller;
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -1101,7 +1109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ protected void nextTick() {}
|
+ public void nextTick() {}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
public void b() {
|
public void b() {
|
||||||
|
|
|
@ -326,7 +326,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
private short e;
|
private short e;
|
||||||
final DataPaletteBlock<IBlockData> blockIds; // Paper - package-private
|
final DataPaletteBlock<IBlockData> blockIds; // Paper - package-private
|
||||||
|
|
||||||
+ final com.destroystokyo.paper.util.maplist.IBlockDataList tickingList = new com.destroystokyo.paper.util.maplist.IBlockDataList(); // Paper
|
+ public final com.destroystokyo.paper.util.maplist.IBlockDataList tickingList = new com.destroystokyo.paper.util.maplist.IBlockDataList(); // Paper
|
||||||
+
|
+
|
||||||
// Paper start - Anti-Xray - Add parameters
|
// Paper start - Anti-Xray - Add parameters
|
||||||
@Deprecated public ChunkSection(int i) { this(i, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere
|
@Deprecated public ChunkSection(int i) { this(i, null, null, true); } // Notice for updates: Please make sure this constructor isn't used anywhere
|
||||||
|
|
|
@ -17,6 +17,22 @@ diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.server.ScoreboardServer;
|
||||||
|
import net.minecraft.server.level.DemoPlayerInteractManager;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.level.PlayerInteractManager;
|
||||||
|
+import net.minecraft.server.level.TicketType;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.server.network.PlayerConnection;
|
||||||
|
import net.minecraft.sounds.SoundCategory;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.effect.MobEffect;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.EnumGamemode;
|
||||||
|
import net.minecraft.world.level.GameRules;
|
||||||
|
import net.minecraft.world.level.World;
|
||||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||||
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -33,8 +49,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
private CraftEntity bukkitEntity;
|
private CraftEntity bukkitEntity;
|
||||||
|
|
||||||
PlayerChunkMap.EntityTracker tracker; // Paper
|
PlayerChunkMap.EntityTracker tracker; // Paper
|
||||||
+ boolean collisionLoadChunks = false; // Paper
|
+ public boolean collisionLoadChunks = false; // Paper
|
||||||
Throwable addedToWorldStack; // Paper - entity debug
|
public Throwable addedToWorldStack; // Paper - entity debug
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
if (bukkitEntity == null) {
|
if (bukkitEntity == null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/ICollisionAccess.java b/src/main/java/net/minecraft/world/level/ICollisionAccess.java
|
diff --git a/src/main/java/net/minecraft/world/level/ICollisionAccess.java b/src/main/java/net/minecraft/world/level/ICollisionAccess.java
|
||||||
|
|
|
@ -81,6 +81,14 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/IHopper.java b
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/IHopper.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/IHopper.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/IHopper.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/IHopper.java
|
||||||
|
@@ -0,0 +0,0 @@
|
||||||
|
package net.minecraft.world.level.block.entity;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
+import net.minecraft.core.BlockPosition;
|
||||||
|
import net.minecraft.world.IInventory;
|
||||||
|
import net.minecraft.world.level.World;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
@@ -0,0 +0,0 @@ public interface IHopper extends IInventory {
|
@@ -0,0 +0,0 @@ public interface IHopper extends IInventory {
|
||||||
return IHopper.c;
|
return IHopper.c;
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,6 +382,14 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureManager;
|
||||||
|
import net.minecraft.world.level.storage.Convertable;
|
||||||
|
+import net.minecraft.world.level.storage.WorldDataServer;
|
||||||
|
import net.minecraft.world.level.storage.WorldPersistentData;
|
||||||
|
import net.minecraft.world.phys.Vec3D;
|
||||||
|
import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet; // Paper
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -599,6 +607,14 @@ diff --git a/src/main/java/net/minecraft/world/level/lighting/LightEngineLayer.j
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/lighting/LightEngineLayer.java
|
--- a/src/main/java/net/minecraft/world/level/lighting/LightEngineLayer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/lighting/LightEngineLayer.java
|
+++ b/src/main/java/net/minecraft/world/level/lighting/LightEngineLayer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.EnumSkyBlock;
|
||||||
|
import net.minecraft.world.level.IBlockAccess;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
+import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
|
import net.minecraft.world.level.chunk.ILightAccess;
|
||||||
|
import net.minecraft.world.level.chunk.NibbleArray;
|
||||||
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
@@ -0,0 +0,0 @@ public abstract class LightEngineLayer<M extends LightEngineStorageArray<M>, S e
|
@@ -0,0 +0,0 @@ public abstract class LightEngineLayer<M extends LightEngineStorageArray<M>, S e
|
||||||
protected final EnumSkyBlock b;
|
protected final EnumSkyBlock b;
|
||||||
protected final S c;
|
protected final S c;
|
||||||
|
|
|
@ -31,6 +31,22 @@ diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/NetworkManager.java
|
--- a/src/main/java/net/minecraft/network/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/network/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/network/NetworkManager.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
import net.minecraft.network.protocol.EnumProtocolDirection;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutBoss;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutChat;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutKeepAlive;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutKickDisconnect;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutTabComplete;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutTitle;
|
||||||
|
import net.minecraft.server.CancelledPacketHandleException;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.network.LoginListener;
|
||||||
|
import net.minecraft.server.network.PlayerConnection;
|
||||||
|
import net.minecraft.util.LazyInitVar;
|
||||||
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
public int protocolVersion;
|
public int protocolVersion;
|
||||||
public java.net.InetSocketAddress virtualHost;
|
public java.net.InetSocketAddress virtualHost;
|
||||||
|
|
|
@ -43,6 +43,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
for (int i = 0; i < abyte.length; ++i) {
|
for (int i = 0; i < abyte.length; ++i) {
|
||||||
if (!bytebuf.isReadable()) {
|
if (!bytebuf.isReadable()) {
|
||||||
|
diff --git a/src/main/java/net/minecraft/network/protocol/Packet.java b/src/main/java/net/minecraft/network/protocol/Packet.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/network/protocol/Packet.java
|
||||||
|
+++ b/src/main/java/net/minecraft/network/protocol/Packet.java
|
||||||
|
@@ -0,0 +0,0 @@ package net.minecraft.network.protocol;
|
||||||
|
|
||||||
|
import io.netty.channel.ChannelFuture; // Paper
|
||||||
|
import java.io.IOException;
|
||||||
|
+import net.minecraft.network.NetworkManager;
|
||||||
|
import net.minecraft.network.PacketDataSerializer;
|
||||||
|
import net.minecraft.network.PacketListener;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
|
||||||
|
public interface Packet<T extends PacketListener> {
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/PlayerConnectionUtils.java b/src/main/java/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/PlayerConnectionUtils.java b/src/main/java/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
--- a/src/main/java/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
||||||
|
|
|
@ -21,6 +21,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
import net.minecraft.network.PacketDataSerializer;
|
||||||
|
import net.minecraft.network.protocol.Packet;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.world.level.EnumSkyBlock;
|
||||||
|
import net.minecraft.world.level.chunk.NibbleArray;
|
||||||
@@ -0,0 +0,0 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> {
|
@@ -0,0 +0,0 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> {
|
||||||
private List<byte[]> h;
|
private List<byte[]> h;
|
||||||
private boolean i;
|
private boolean i;
|
||||||
|
|
|
@ -120,7 +120,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ public final com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> pendingVisibleChunks = new com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk>(); // Paper - this is used if the visible chunks is updated while iterating only
|
+ public final com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> pendingVisibleChunks = new com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk>(); // Paper - this is used if the visible chunks is updated while iterating only
|
||||||
+ public transient com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> visibleChunksClone; // Paper - used for async access of visible chunks, clone and cache only when needed
|
+ public transient com.destroystokyo.paper.util.map.Long2ObjectLinkedOpenHashMapFastCopy<PlayerChunk> visibleChunksClone; // Paper - used for async access of visible chunks, clone and cache only when needed
|
||||||
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
|
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
|
||||||
final LongSet loadedChunks; // Paper - private -> package
|
public final LongSet loadedChunks; // Paper - private -> public
|
||||||
public final WorldServer world;
|
public final WorldServer world;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
|
|
||||||
|
|
|
@ -49,19 +49,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import java.util.Map;
|
+import java.util.Map;
|
||||||
+import java.util.concurrent.ThreadLocalRandom;
|
+import java.util.concurrent.ThreadLocalRandom;
|
||||||
+
|
+
|
||||||
|
+import net.minecraft.core.BlockPosition;
|
||||||
|
+import net.minecraft.world.item.ItemStack;
|
||||||
|
+import net.minecraft.world.item.Items;
|
||||||
|
+import net.minecraft.world.level.World;
|
||||||
|
+import net.minecraft.world.level.block.Block;
|
||||||
|
+import net.minecraft.world.level.block.BlockRedstoneWire;
|
||||||
|
+import net.minecraft.world.level.block.state.IBlockData;
|
||||||
+import org.bukkit.event.block.BlockRedstoneEvent;
|
+import org.bukkit.event.block.BlockRedstoneEvent;
|
||||||
+
|
+
|
||||||
+import com.google.common.collect.Lists;
|
+import com.google.common.collect.Lists;
|
||||||
+import com.google.common.collect.Maps;
|
+import com.google.common.collect.Maps;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.Block;
|
|
||||||
+import net.minecraft.server.BlockPosition;
|
|
||||||
+import net.minecraft.server.BlockRedstoneWire;
|
|
||||||
+import net.minecraft.server.IBlockData;
|
|
||||||
+import net.minecraft.server.Items;
|
|
||||||
+import net.minecraft.server.ItemStack;
|
|
||||||
+import net.minecraft.server.World;
|
|
||||||
+
|
|
||||||
+/**
|
+/**
|
||||||
+ * Used for the faster redstone algorithm.
|
+ * Used for the faster redstone algorithm.
|
||||||
+ * Original author: theosib
|
+ * Original author: theosib
|
||||||
|
|
|
@ -34,6 +34,14 @@ diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.DifficultyDamageScaler;
|
||||||
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
|
+import net.minecraft.world.entity.decoration.EntityArmorStand;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.crafting.CraftingManager;
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,14 @@ diff --git a/src/main/java/net/minecraft/world/level/block/BlockFire.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/BlockFire.java
|
--- a/src/main/java/net/minecraft/world/level/block/BlockFire.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockFire.java
|
+++ b/src/main/java/net/minecraft/world/level/block/BlockFire.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.core.EnumDirection;
|
||||||
|
import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.world.item.context.BlockActionContext;
|
||||||
|
+import net.minecraft.world.item.context.ItemActionContext;
|
||||||
|
import net.minecraft.world.level.GameRules;
|
||||||
|
import net.minecraft.world.level.GeneratorAccess;
|
||||||
|
import net.minecraft.world.level.IBlockAccess;
|
||||||
@@ -0,0 +0,0 @@ public class BlockFire extends BlockFireAbstract {
|
@@ -0,0 +0,0 @@ public class BlockFire extends BlockFireAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +46,14 @@ diff --git a/src/main/java/net/minecraft/world/level/block/BlockFireAbstract.jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/BlockFireAbstract.java
|
--- a/src/main/java/net/minecraft/world/level/block/BlockFireAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/BlockFireAbstract.java
|
+++ b/src/main/java/net/minecraft/world/level/block/BlockFireAbstract.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
|
import net.minecraft.world.item.context.BlockActionContext;
|
||||||
|
+import net.minecraft.world.item.context.ItemActionContext;
|
||||||
|
import net.minecraft.world.level.GeneratorAccess;
|
||||||
|
import net.minecraft.world.level.IBlockAccess;
|
||||||
|
import net.minecraft.world.level.World;
|
||||||
@@ -0,0 +0,0 @@ public abstract class BlockFireAbstract extends Block {
|
@@ -0,0 +0,0 @@ public abstract class BlockFireAbstract extends Block {
|
||||||
super.a(iblockdata, world, blockposition, entity);
|
super.a(iblockdata, world, blockposition, entity);
|
||||||
}
|
}
|
||||||
|
@ -62,6 +78,14 @@ diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
|
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
|
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.item.EnumColor;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.context.BlockActionContext;
|
||||||
|
+import net.minecraft.world.item.context.ItemActionContext;
|
||||||
|
import net.minecraft.world.level.BlockAccessAir;
|
||||||
|
import net.minecraft.world.level.GeneratorAccess;
|
||||||
|
import net.minecraft.world.level.IBlockAccess;
|
||||||
@@ -0,0 +0,0 @@ public abstract class BlockBase {
|
@@ -0,0 +0,0 @@ public abstract class BlockBase {
|
||||||
PacketDebug.a(world, blockposition);
|
PacketDebug.a(world, blockposition);
|
||||||
}
|
}
|
||||||
|
@ -79,6 +103,14 @@ diff --git a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
|
--- a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
|
+++ b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.tags.Tag;
|
||||||
|
import net.minecraft.tags.TagsBlock;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.world.entity.EntitySize;
|
||||||
|
+import net.minecraft.world.item.context.ItemActionContext;
|
||||||
|
import net.minecraft.world.level.GeneratorAccess;
|
||||||
|
import net.minecraft.world.level.block.BlockPortal;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
@@ -0,0 +0,0 @@ public class BlockPortalShape {
|
@@ -0,0 +0,0 @@ public class BlockPortalShape {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/EntityTypes.java b/src/mai
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityTypes.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.tags.Tag;
|
||||||
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
|
@ -26,6 +26,23 @@ diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/j
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.Set;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import net.minecraft.core.BaseBlockPosition;
|
||||||
|
import net.minecraft.core.BlockPosition;
|
||||||
|
+import net.minecraft.core.EnumDirection;
|
||||||
|
import net.minecraft.core.particles.Particles;
|
||||||
|
import net.minecraft.server.level.WorldServer;
|
||||||
|
import net.minecraft.sounds.SoundCategory;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.BlockFireAbstract;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.entity.TileEntity;
|
||||||
|
+import net.minecraft.world.level.block.piston.BlockPistonExtension;
|
||||||
|
+import net.minecraft.world.level.block.piston.TileEntityPiston;
|
||||||
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
import net.minecraft.world.level.material.Fluid;
|
||||||
|
import net.minecraft.world.level.storage.loot.LootTableInfo;
|
||||||
@@ -0,0 +0,0 @@ public class Explosion {
|
@@ -0,0 +0,0 @@ public class Explosion {
|
||||||
|
|
||||||
if (f > 0.0F && this.l.a(this, this.world, blockposition, iblockdata, f) && blockposition.getY() < 256 && blockposition.getY() >= 0) { // CraftBukkit - don't wrap explosions
|
if (f > 0.0F && this.l.a(this, this.world, blockposition, iblockdata, f) && blockposition.getY() < 256 && blockposition.getY() >= 0) { // CraftBukkit - don't wrap explosions
|
||||||
|
|
|
@ -116,14 +116,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import com.mojang.datafixers.util.Pair;
|
+import com.mojang.datafixers.util.Pair;
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2IntMap;
|
+import it.unimi.dsi.fastutil.longs.Long2IntMap;
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
|
+import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
|
||||||
+import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
|
||||||
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
+import net.minecraft.server.World;
|
|
||||||
+
|
+
|
||||||
+import java.util.ArrayList;
|
+import java.util.ArrayList;
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.Map;
|
+import java.util.Map;
|
||||||
+import java.util.WeakHashMap;
|
+import java.util.WeakHashMap;
|
||||||
|
+import net.minecraft.world.level.World;
|
||||||
+
|
+
|
||||||
+public class SyncLoadFinder {
|
+public class SyncLoadFinder {
|
||||||
+
|
+
|
||||||
|
|
|
@ -17,7 +17,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.core.BaseBlockPosition;
|
import net.minecraft.core.BaseBlockPosition;
|
||||||
@@ -0,0 +0,0 @@ import net.minecraft.world.level.levelgen.structure.StructureStart;
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
import net.minecraft.world.level.chunk.IStructureAccess;
|
||||||
|
import net.minecraft.world.level.levelgen.GeneratorSettings;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.StructureGenerator;
|
||||||
|
+import net.minecraft.world.level.levelgen.structure.StructurePiece;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||||
|
|
||||||
public class StructureManager {
|
public class StructureManager {
|
||||||
|
|
||||||
|
@ -80,6 +85,14 @@ diff --git a/src/main/java/net/minecraft/world/level/biome/BiomeBase.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/biome/BiomeBase.java
|
--- a/src/main/java/net/minecraft/world/level/biome/BiomeBase.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/biome/BiomeBase.java
|
+++ b/src/main/java/net/minecraft/world/level/biome/BiomeBase.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.levelgen.WorldGenStage;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.StructureGenerator;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.WorldGenFeatureConfigured;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.StructureBoundingBox;
|
||||||
|
+import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||||
|
import net.minecraft.world.level.levelgen.surfacebuilders.WorldGenSurfaceComposite;
|
||||||
|
import net.minecraft.world.level.levelgen.synth.NoiseGenerator3;
|
||||||
|
import net.minecraft.world.level.material.Fluid;
|
||||||
@@ -0,0 +0,0 @@ public final class BiomeBase {
|
@@ -0,0 +0,0 @@ public final class BiomeBase {
|
||||||
int l1 = j1 << 4;
|
int l1 = j1 << 4;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,14 @@ diff --git a/src/main/java/net/minecraft/world/inventory/Container.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/Container.java
|
--- a/src/main/java/net/minecraft/world/inventory/Container.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/Container.java
|
+++ b/src/main/java/net/minecraft/world/inventory/Container.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.CrashReportSystemDetails;
|
||||||
|
import net.minecraft.ReportedException;
|
||||||
|
import net.minecraft.core.IRegistry;
|
||||||
|
import net.minecraft.core.NonNullList;
|
||||||
|
+import net.minecraft.network.chat.ChatComponentText;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.world.IInventory;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Container {
|
@@ -0,0 +0,0 @@ public abstract class Container {
|
||||||
}
|
}
|
||||||
private IChatBaseComponent title;
|
private IChatBaseComponent title;
|
||||||
|
|
|
@ -9,6 +9,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.chat.ChatMessage;
|
||||||
|
import net.minecraft.network.chat.IChatBaseComponent;
|
||||||
|
import net.minecraft.network.chat.IChatMutableComponent;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutEntityVelocity;
|
||||||
|
+import net.minecraft.network.protocol.game.PacketPlayOutNamedSoundEffect;
|
||||||
|
import net.minecraft.network.syncher.DataWatcher;
|
||||||
|
import net.minecraft.network.syncher.DataWatcherObject;
|
||||||
|
import net.minecraft.network.syncher.DataWatcherRegistry;
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
int i = b0 + EnchantmentManager.b((EntityLiving) this);
|
int i = b0 + EnchantmentManager.b((EntityLiving) this);
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,14 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntity.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.World;
|
||||||
|
import net.minecraft.world.level.block.EnumBlockMirror;
|
||||||
|
import net.minecraft.world.level.block.EnumBlockRotation;
|
||||||
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
|
+import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.apache.logging.log4j.util.Supplier;
|
||||||
@@ -0,0 +0,0 @@ public abstract class TileEntity implements net.minecraft.server.KeyedObject { /
|
@@ -0,0 +0,0 @@ public abstract class TileEntity implements net.minecraft.server.KeyedObject { /
|
||||||
getMinecraftKey(); // Try to load if it doesn't exists.
|
getMinecraftKey(); // Try to load if it doesn't exists.
|
||||||
return tileEntityKeyString;
|
return tileEntityKeyString;
|
||||||
|
|
|
@ -552,9 +552,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package co.aikar.timings;
|
+package co.aikar.timings;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.World;
|
+import net.minecraft.server.level.WorldServer;
|
||||||
+import net.minecraft.server.WorldDataServer;
|
+import net.minecraft.world.level.World;
|
||||||
+import net.minecraft.server.WorldServer;
|
+import net.minecraft.world.level.storage.WorldDataServer;
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * Set of timers per world, to track world specific timings.
|
+ * Set of timers per world, to track world specific timings.
|
||||||
|
|
|
@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
// Refresh the current entity metadata
|
// Refresh the current entity metadata
|
||||||
- this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.getDataWatcher(), true));
|
- this.sendPacket(new PacketPlayOutEntityMetadata(entity.getId(), entity.getDataWatcher(), true));
|
||||||
+ // Paper start - update entity for all players
|
+ // Paper start - update entity for all players
|
||||||
+ PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entity.getId(), entity.datawatcher, true);
|
+ PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(entity.getId(), entity.getDataWatcher(), true);
|
||||||
+ if (entity.tracker != null) {
|
+ if (entity.tracker != null) {
|
||||||
+ entity.tracker.broadcast(packet);
|
+ entity.tracker.broadcast(packet);
|
||||||
+ } else {
|
+ } else {
|
||||||
|
|
|
@ -8,6 +8,14 @@ diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/ja
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.core.IRegistry;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
+import net.minecraft.nbt.NBTTagString;
|
||||||
|
import net.minecraft.network.chat.ChatComponentText;
|
||||||
|
import net.minecraft.network.chat.ChatComponentUtils;
|
||||||
|
import net.minecraft.network.chat.ChatHoverable;
|
||||||
@@ -0,0 +0,0 @@ public final class ItemStack {
|
@@ -0,0 +0,0 @@ public final class ItemStack {
|
||||||
list.sort((Comparator<? super NBTBase>) enchantSorter); // Paper
|
list.sort((Comparator<? super NBTBase>) enchantSorter); // Paper
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
|
|
|
@ -81,7 +81,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
+package com.destroystokyo.paper.console;
|
+package com.destroystokyo.paper.console;
|
||||||
+
|
+
|
||||||
+import net.minecraft.server.DedicatedServer;
|
+import net.minecraft.server.dedicated.DedicatedServer;
|
||||||
+import net.minecrell.terminalconsole.SimpleTerminalConsole;
|
+import net.minecrell.terminalconsole.SimpleTerminalConsole;
|
||||||
+import org.bukkit.craftbukkit.command.ConsoleCommandCompleter;
|
+import org.bukkit.craftbukkit.command.ConsoleCommandCompleter;
|
||||||
+import org.jline.reader.LineReader;
|
+import org.jline.reader.LineReader;
|
||||||
|
@ -380,11 +380,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
-import jline.console.completer.Completer;
|
-import jline.console.completer.Completer;
|
||||||
|
+import net.minecraft.server.dedicated.DedicatedServer;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.util.Waitable;
|
import org.bukkit.craftbukkit.util.Waitable;
|
||||||
+
|
+
|
||||||
+// Paper start - JLine update
|
+// Paper start - JLine update
|
||||||
+import net.minecraft.server.DedicatedServer; // Paper
|
|
||||||
+import org.jline.reader.Candidate;
|
+import org.jline.reader.Candidate;
|
||||||
+import org.jline.reader.Completer;
|
+import org.jline.reader.Completer;
|
||||||
+import org.jline.reader.LineReader;
|
+import org.jline.reader.LineReader;
|
||||||
|
|
|
@ -33,6 +33,14 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.PacketPlayOutMapChunk;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutMount;
|
||||||
|
import net.minecraft.network.protocol.game.PacketPlayOutViewCentre;
|
||||||
|
import net.minecraft.server.MCUtil;
|
||||||
|
+import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.progress.WorldLoadListener;
|
||||||
|
import net.minecraft.util.CSVWriter;
|
||||||
|
import net.minecraft.util.EntitySlice;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
|
|
||||||
// Paper start - distance maps
|
// Paper start - distance maps
|
||||||
|
@ -44,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+ // inlined EnumMap, TrackingRange.TrackingRangeType
|
+ // inlined EnumMap, TrackingRange.TrackingRangeType
|
||||||
+ static final org.spigotmc.TrackingRange.TrackingRangeType[] TRACKING_RANGE_TYPES = org.spigotmc.TrackingRange.TrackingRangeType.values();
|
+ static final org.spigotmc.TrackingRange.TrackingRangeType[] TRACKING_RANGE_TYPES = org.spigotmc.TrackingRange.TrackingRangeType.values();
|
||||||
+ final com.destroystokyo.paper.util.misc.PlayerAreaMap[] playerEntityTrackerTrackMaps;
|
+ public final com.destroystokyo.paper.util.misc.PlayerAreaMap[] playerEntityTrackerTrackMaps;
|
||||||
+ final int[] entityTrackerTrackRanges;
|
+ final int[] entityTrackerTrackRanges;
|
||||||
+
|
+
|
||||||
+ private int convertSpigotRangeToVanilla(final int vanilla) {
|
+ private int convertSpigotRangeToVanilla(final int vanilla) {
|
||||||
|
@ -311,6 +319,14 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.syncher.DataWatcherObject;
|
||||||
|
import net.minecraft.network.syncher.DataWatcherRegistry;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
+import net.minecraft.server.MCUtil;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.level.PlayerChunkMap;
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -318,13 +334,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper start - optimise entity tracking
|
+ // Paper start - optimise entity tracking
|
||||||
+ final org.spigotmc.TrackingRange.TrackingRangeType trackingRangeType = org.spigotmc.TrackingRange.getTrackingRangeType(this);
|
+ final org.spigotmc.TrackingRange.TrackingRangeType trackingRangeType = org.spigotmc.TrackingRange.getTrackingRangeType(this);
|
||||||
+
|
+
|
||||||
+ boolean isLegacyTrackingEntity = false;
|
+ public boolean isLegacyTrackingEntity = false;
|
||||||
+
|
+
|
||||||
+ public final void setLegacyTrackingEntity(final boolean isLegacyTrackingEntity) {
|
+ public final void setLegacyTrackingEntity(final boolean isLegacyTrackingEntity) {
|
||||||
+ this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
+ this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> getPlayersInTrackRange() {
|
+ public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> getPlayersInTrackRange() {
|
||||||
+ return ((WorldServer)this.world).getChunkProvider().playerChunkMap.playerEntityTrackerTrackMaps[this.trackingRangeType.ordinal()]
|
+ return ((WorldServer)this.world).getChunkProvider().playerChunkMap.playerEntityTrackerTrackMaps[this.trackingRangeType.ordinal()]
|
||||||
+ .getObjectsInRange(MCUtil.getCoordinateKey(this));
|
+ .getObjectsInRange(MCUtil.getCoordinateKey(this));
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -55,6 +55,25 @@ diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/World.java
|
--- a/src/main/java/net/minecraft/world/level/World.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/World.java
|
+++ b/src/main/java/net/minecraft/world/level/World.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.Packet;
|
||||||
|
import net.minecraft.resources.MinecraftKey;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
import net.minecraft.server.level.PlayerChunk;
|
||||||
|
import net.minecraft.sounds.SoundCategory;
|
||||||
|
import net.minecraft.sounds.SoundEffect;
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.saveddata.maps.WorldMap;
|
||||||
|
import net.minecraft.world.level.storage.WorldData;
|
||||||
|
import net.minecraft.world.level.storage.WorldDataMutable;
|
||||||
|
import net.minecraft.world.phys.AxisAlignedBB;
|
||||||
|
+import net.minecraft.world.phys.shapes.OperatorBoolean;
|
||||||
|
+import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
+import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||||
|
+import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||||
|
import net.minecraft.world.scores.Scoreboard;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,14 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.level.World;
|
||||||
|
import net.minecraft.world.level.chunk.Chunk;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkConverter;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
|
+import net.minecraft.world.level.chunk.ChunkSection;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
|
import net.minecraft.world.level.chunk.IChunkAccess;
|
||||||
|
import net.minecraft.world.level.chunk.ILightAccess;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
||||||
|
Date: Tue, 16 Mar 2021 11:25:11 +0100
|
||||||
|
Subject: [PATCH] fixup! Load chunks asynchronously for players.
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.core.NonNullList;
|
||||||
|
import net.minecraft.core.SectionPosition;
|
||||||
|
import net.minecraft.nbt.DynamicOpsNBT;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
+import net.minecraft.network.NetworkManager;
|
||||||
|
import net.minecraft.network.chat.ChatComponentText;
|
||||||
|
import net.minecraft.network.chat.ChatHoverable;
|
||||||
|
import net.minecraft.network.chat.ChatMessage;
|
|
@ -49,14 +49,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
+import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
||||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||||
+import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
|
+import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
|
||||||
+import net.minecraft.server.ChunkCoordIntPair;
|
|
||||||
+import net.minecraft.server.EntityPlayer;
|
|
||||||
+import net.minecraft.server.SectionPosition;
|
|
||||||
+import org.spigotmc.AsyncCatcher;
|
|
||||||
+import java.util.HashMap;
|
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.Map;
|
+import java.util.Map;
|
||||||
+import java.util.Set;
|
+import net.minecraft.core.SectionPosition;
|
||||||
|
+import net.minecraft.server.level.EntityPlayer;
|
||||||
|
+import net.minecraft.world.level.ChunkCoordIntPair;
|
||||||
|
+import org.spigotmc.AsyncCatcher;
|
||||||
|
+import java.util.HashMap;
|
||||||
+
|
+
|
||||||
+/** @author Spottedleaf */
|
+/** @author Spottedleaf */
|
||||||
+public final class PlayerMobDistanceMap {
|
+public final class PlayerMobDistanceMap {
|
||||||
|
@ -576,6 +575,14 @@ diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/ma
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.world.effect.MobEffects;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EntityInsentient;
|
||||||
|
import net.minecraft.world.entity.EntityLiving;
|
||||||
|
+import net.minecraft.world.entity.EnumCreatureType;
|
||||||
|
import net.minecraft.world.entity.EnumMainHand;
|
||||||
|
import net.minecraft.world.entity.IEntityAngerable;
|
||||||
|
import net.minecraft.world.entity.animal.horse.EntityHorseAbstract;
|
||||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||||
public boolean queueHealthUpdatePacket = false;
|
public boolean queueHealthUpdatePacket = false;
|
||||||
public net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth queuedHealthUpdatePacket;
|
public net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth queuedHealthUpdatePacket;
|
||||||
|
@ -608,6 +615,14 @@ diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
|
@@ -0,0 +0,0 @@ import net.minecraft.util.thread.ThreadedMailbox;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.EntityInsentient;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
|
+import net.minecraft.world.entity.EnumCreatureType;
|
||||||
|
import net.minecraft.world.entity.ai.village.poi.VillagePlace;
|
||||||
|
import net.minecraft.world.entity.boss.EntityComplexPart;
|
||||||
|
import net.minecraft.world.entity.player.EntityHuman;
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
public final Int2ObjectMap<PlayerChunkMap.EntityTracker> trackedEntities;
|
public final Int2ObjectMap<PlayerChunkMap.EntityTracker> trackedEntities;
|
||||||
private final Long2ByteMap z;
|
private final Long2ByteMap z;
|
||||||
|
|
|
@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+
|
+
|
||||||
+ // Paper - start
|
+ // Paper - start
|
||||||
+ public void registerAttribute(AttributeBase attributeBase) {
|
+ public void registerAttribute(AttributeBase attributeBase) {
|
||||||
+ net.minecraft.server.AttributeModifiable attributeModifiable = new net.minecraft.server.AttributeModifiable(attributeBase, net.minecraft.server.AttributeModifiable::getAttribute);
|
+ AttributeModifiable attributeModifiable = new AttributeModifiable(attributeBase, AttributeModifiable::getAttribute);
|
||||||
+ attributeMap.put(attributeBase, attributeModifiable);
|
+ attributeMap.put(attributeBase, attributeModifiable);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper - end
|
+ // Paper - end
|
||||||
|
|
Loading…
Reference in a new issue