Moar 1.19 fixes (#7884)
This commit is contained in:
parent
55d7f562b8
commit
b1f5e70075
|
@ -18,19 +18,10 @@ For consistency, the old API methods now forward to use the
|
|||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 7f778e037c1821cc45236bf2a95c28243d0ec126..751c23e3f12b44667c0ae36c0712e498d73ab16e 100644
|
||||
index 7f778e037c1821cc45236bf2a95c28243d0ec126..758f0a620551838e32d5c68f7ee755f7ea374a46 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -12,6 +12,8 @@ import java.text.DecimalFormatSymbols;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
+import java.util.Collections;
|
||||
+import java.util.Comparator;
|
||||
import java.util.Locale;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
@@ -151,6 +153,23 @@ public final class ItemStack {
|
||||
@@ -151,6 +151,23 @@ public final class ItemStack {
|
||||
return this.getItem().getTooltipImage(this);
|
||||
}
|
||||
|
||||
|
@ -46,7 +37,7 @@ index 7f778e037c1821cc45236bf2a95c28243d0ec126..751c23e3f12b44667c0ae36c0712e498
|
|||
+ }
|
||||
+ try {
|
||||
+ //noinspection unchecked
|
||||
+ list.sort((Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
||||
+ list.sort((java.util.Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
||||
+ } catch (Exception ignored) {}
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -54,7 +45,7 @@ index 7f778e037c1821cc45236bf2a95c28243d0ec126..751c23e3f12b44667c0ae36c0712e498
|
|||
public ItemStack(ItemLike item) {
|
||||
this(item, 1);
|
||||
}
|
||||
@@ -202,6 +221,7 @@ public final class ItemStack {
|
||||
@@ -202,6 +219,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start - make defensive copy as this data may be coming from the save thread
|
||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
||||
// CraftBukkit end
|
||||
|
@ -62,7 +53,7 @@ index 7f778e037c1821cc45236bf2a95c28243d0ec126..751c23e3f12b44667c0ae36c0712e498
|
|||
this.getItem().verifyTagAfterLoad(this.tag);
|
||||
}
|
||||
|
||||
@@ -772,6 +792,7 @@ public final class ItemStack {
|
||||
@@ -772,6 +790,7 @@ public final class ItemStack {
|
||||
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
|
@ -70,7 +61,7 @@ index 7f778e037c1821cc45236bf2a95c28243d0ec126..751c23e3f12b44667c0ae36c0712e498
|
|||
if (this.getItem().canBeDepleted()) {
|
||||
this.setDamageValue(this.getDamageValue());
|
||||
}
|
||||
@@ -1061,6 +1082,7 @@ public final class ItemStack {
|
||||
@@ -1061,6 +1080,7 @@ public final class ItemStack {
|
||||
ListTag nbttaglist = this.tag.getList("Enchantments", 10);
|
||||
|
||||
nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level));
|
||||
|
|
|
@ -6,18 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
|
|||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e6917848029b1686e4e3a1a0eadac85eda92518d..3b998ca5230dc03a7faf2b0d1d1731b442337346 100644
|
||||
index e6917848029b1686e4e3a1a0eadac85eda92518d..91a5b46e5a7459494a49a85ba93dc0ced146b717 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -105,6 +105,7 @@ import net.minecraft.world.level.entity.EntityInLevelCallback;
|
||||
import net.minecraft.world.level.gameevent.DynamicGameEventListener;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
+import net.minecraft.world.level.levelgen.PositionalRandomFactory;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.material.PushReaction;
|
||||
@@ -158,6 +159,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -158,6 +158,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
|
||||
|
@ -42,7 +34,7 @@ index e6917848029b1686e4e3a1a0eadac85eda92518d..3b998ca5230dc03a7faf2b0d1d1731b4
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public PositionalRandomFactory forkPositional() {
|
||||
+ public net.minecraft.world.level.levelgen.PositionalRandomFactory forkPositional() {
|
||||
+ return new net.minecraft.world.level.levelgen.LegacyRandomSource.LegacyPositionalRandomFactory(this.nextLong());
|
||||
+ }
|
||||
+
|
||||
|
@ -56,7 +48,7 @@ index e6917848029b1686e4e3a1a0eadac85eda92518d..3b998ca5230dc03a7faf2b0d1d1731b4
|
|||
private CraftEntity bukkitEntity;
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
@@ -345,7 +378,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -345,7 +377,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bb = Entity.INITIAL_AABB;
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.nextStep = 1.0F;
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
|||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f037503a68f2b7b7c76b6ac7243dde2bf734afbd..68a4fa890250f6c54367cbe319dd9485c988bbb7 100644
|
||||
index 1a5ccea7daca76b7c5524c92ce431cea82c8b500..9bc6343887e0078c9778bffb24cd130e3ff53423 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1354,6 +1354,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -56,23 +56,15 @@ index d40e791529911ca81398ac267a819415da91502a..03fde6e47c4a347c62fe9b4a3351769a
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
index a90f6cc0d8c0f6d115e59d07b1b4c9b45fe0ad1e..68de0aa2c755d07389b3b8052d33aba2583adb14 100644
|
||||
index a90f6cc0d8c0f6d115e59d07b1b4c9b45fe0ad1e..fa97966d39f01301a8ba976c02dc697e0a74bfb1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java
|
||||
@@ -4,6 +4,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -93,7 +94,7 @@ public class DoublePlantBlock extends BushBlock {
|
||||
@@ -93,7 +93,7 @@ public class DoublePlantBlock extends BushBlock {
|
||||
|
||||
protected static void preventCreativeDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) {
|
||||
// CraftBukkit start
|
||||
- if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) {
|
||||
+ if (((ServerLevel)world).hasPhysicsEvent && org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) { // Paper
|
||||
+ if (((net.minecraft.server.level.ServerLevel)world).hasPhysicsEvent && org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) { // Paper
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
|
|
@ -25,32 +25,16 @@ index 39343854ea106aaa2c1c9f490cbdae28eb2550e6..5ee25084459f4cfcc8a95001a9d480e4
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 24456bbf2cd9f1878cf545e8d164ff524c321a4c..22291d7b8d9294bed1afdaed88040e06120b22e0 100644
|
||||
index 24456bbf2cd9f1878cf545e8d164ff524c321a4c..fdda98cb38ec96d0189931c41257cc01966373d5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -92,6 +92,7 @@ import net.minecraft.world.item.ElytraItem;
|
||||
import net.minecraft.world.item.ItemCooldowns;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
+import net.minecraft.world.item.MapItem; // Paper
|
||||
import net.minecraft.world.item.ProjectileWeaponItem;
|
||||
import net.minecraft.world.item.SwordItem;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
@@ -110,6 +111,7 @@ import net.minecraft.world.level.block.entity.SignBlockEntity;
|
||||
import net.minecraft.world.level.block.entity.StructureBlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.pattern.BlockInWorld;
|
||||
+import net.minecraft.world.level.saveddata.maps.MapItemSavedData; // Paper
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraft.world.scores.PlayerTeam;
|
||||
@@ -762,6 +764,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -762,6 +762,14 @@ public abstract class Player extends LivingEntity {
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Paper start - remove player from map on drop
|
||||
+ if (itemstack.getItem() == Items.FILLED_MAP) {
|
||||
+ MapItemSavedData worldmap = MapItem.getSavedData(itemstack, this.level);
|
||||
+ net.minecraft.world.level.saveddata.maps.MapItemSavedData worldmap = net.minecraft.world.item.MapItem.getSavedData(itemstack, this.level);
|
||||
+ if (worldmap != null) {
|
||||
+ worldmap.tickCarriedBy(this, itemstack);
|
||||
+ }
|
||||
|
|
|
@ -516,10 +516,10 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3b998ca5230dc03a7faf2b0d1d1731b442337346..1c74d8f3b432afb9bcc71d87d86cb977d30ecbb7 100644
|
||||
index 91a5b46e5a7459494a49a85ba93dc0ced146b717..86bdbd2d08f8ad5561597b95295cbfc68522a0bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -191,6 +191,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -190,6 +190,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
|
|||
Remove hashMap lookup every check, simplify code to remove ternary
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 751c23e3f12b44667c0ae36c0712e498d73ab16e..a2426b71830d5c39fff04cedaa7569abe332f92a 100644
|
||||
index 758f0a620551838e32d5c68f7ee755f7ea374a46..e7dbcacff58ce4b48f315eae80878c136b740416 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -247,7 +247,7 @@ public final class ItemStack {
|
||||
@@ -245,7 +245,7 @@ public final class ItemStack {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1c74d8f3b432afb9bcc71d87d86cb977d30ecbb7..63a6ac09569729d8f9810f339db76d55b1440a0f 100644
|
||||
index 86bdbd2d08f8ad5561597b95295cbfc68522a0bc..d729d0ab7168246af901513e41334176a1f95861 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2282,6 +2282,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2281,6 +2281,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
||||
|
|
|
@ -27,10 +27,10 @@ index 8451982ba4fc9522f2d77f68fc63a0e12558955f..ee8ce0e5bdb0acb7d6ef3439a388e108
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 63a6ac09569729d8f9810f339db76d55b1440a0f..8af99a4b7a1e834782dd7dd9ca53263f9e90e6d0 100644
|
||||
index d729d0ab7168246af901513e41334176a1f95861..abfa26bf132dd2d0ef2979bac92eff87c11dd5cd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -338,6 +338,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -337,6 +337,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
|
|
|
@ -44,10 +44,10 @@ index 955985193a1713a6a938c6b8879a85fd329a89ab..b50ca694f827b60ab6ae4b91772774b6
|
|||
case RELEASE_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(false);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 22291d7b8d9294bed1afdaed88040e06120b22e0..d83e9df66a3ff86ea1ef78f22da9bc7dbcb5e19a 100644
|
||||
index fdda98cb38ec96d0189931c41257cc01966373d5..0df33131bae2b6651eff4b5b34b3714625562b69 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -589,7 +589,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -587,7 +587,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index d83e9df66a3ff86ea1ef78f22da9bc7dbcb5e19a..b876bbb08c868bc6984a395b84b0c0aaf1666912 100644
|
||||
index 0df33131bae2b6651eff4b5b34b3714625562b69..6e34a16ab02e733130a897bc9f8f2c1ffb090b46 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2028,20 +2028,44 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2026,20 +2026,44 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8af99a4b7a1e834782dd7dd9ca53263f9e90e6d0..44bcf4477ab7b6ee231a774fb2e03544af9305c3 100644
|
||||
index abfa26bf132dd2d0ef2979bac92eff87c11dd5cd..106ff6a91c557d08305250f24f82dc84e8e4b79a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -339,6 +339,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -338,6 +338,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// Spigot end
|
||||
// Paper start
|
||||
protected int numCollisions = 0; // Paper
|
||||
|
@ -16,7 +16,7 @@ index 8af99a4b7a1e834782dd7dd9ca53263f9e90e6d0..44bcf4477ab7b6ee231a774fb2e03544
|
|||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
@@ -1919,6 +1920,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1918,6 +1919,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ index 8af99a4b7a1e834782dd7dd9ca53263f9e90e6d0..44bcf4477ab7b6ee231a774fb2e03544
|
|||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2056,6 +2061,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2055,6 +2060,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.originWorld = originWorld;
|
||||
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index b876bbb08c868bc6984a395b84b0c0aaf1666912..30ffb7b02bef4d4c5fe54c4306539b12fed73627 100644
|
||||
index 6e34a16ab02e733130a897bc9f8f2c1ffb090b46..c3c95d825af9e8f84d62a469189535f015d228a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1247,7 +1247,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1245,7 +1245,7 @@ public abstract class Player extends LivingEntity {
|
||||
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
|
||||
|
||||
if (this.isSprinting() && flag) {
|
||||
|
@ -18,7 +18,7 @@ index b876bbb08c868bc6984a395b84b0c0aaf1666912..30ffb7b02bef4d4c5fe54c4306539b12
|
|||
++i;
|
||||
flag1 = true;
|
||||
}
|
||||
@@ -1322,7 +1322,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1320,7 +1320,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ index b876bbb08c868bc6984a395b84b0c0aaf1666912..30ffb7b02bef4d4c5fe54c4306539b12
|
|||
this.sweepAttack();
|
||||
}
|
||||
|
||||
@@ -1350,15 +1350,15 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1348,15 +1348,15 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
|
@ -46,7 +46,7 @@ index b876bbb08c868bc6984a395b84b0c0aaf1666912..30ffb7b02bef4d4c5fe54c4306539b12
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1410,7 +1410,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1408,7 +1408,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||
} else {
|
||||
|
@ -55,7 +55,7 @@ index b876bbb08c868bc6984a395b84b0c0aaf1666912..30ffb7b02bef4d4c5fe54c4306539b12
|
|||
if (flag4) {
|
||||
target.clearFire();
|
||||
}
|
||||
@@ -1863,6 +1863,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1861,6 +1861,14 @@ public abstract class Player extends LivingEntity {
|
||||
public int getXpNeededForNextLevel() {
|
||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ index 99ce64e4d01b58d887506841451e561c2796c413..665b7f4cddfef1631ba2fad6eebeb193
|
|||
private void allChunksAreSlimeChunks() {
|
||||
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 30ffb7b02bef4d4c5fe54c4306539b12fed73627..da304cae8734b44f559df0161f6769e2fcdf555f 100644
|
||||
index c3c95d825af9e8f84d62a469189535f015d228a4..863f805dfce2ffcde9d724012895c5f5cda0229f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1254,6 +1254,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1252,6 +1252,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ index 665b7f4cddfef1631ba2fad6eebeb19392cf8759..7dbd03897bf98ef19509972fb8d09aa0
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index da304cae8734b44f559df0161f6769e2fcdf555f..4935450ff2023779912853e16ad6c6f93fdcf1ef 100644
|
||||
index 863f805dfce2ffcde9d724012895c5f5cda0229f..c92bdcc43c008bd41ef5bea8fbce4ec6720147c6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1303,7 +1303,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1301,7 +1301,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||
|
|
|
@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
|
|||
Plugins can skip selection of certain arrows and control which is used.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 4935450ff2023779912853e16ad6c6f93fdcf1ef..796f248d03e73be8adc289bf57093fa15dbf48e5 100644
|
||||
index c92bdcc43c008bd41ef5bea8fbce4ec6720147c6..e48995a975a8540eb93df76f3e1825cc9762c214 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2246,6 +2246,17 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2244,6 +2244,17 @@ public abstract class Player extends LivingEntity {
|
||||
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ index 4935450ff2023779912853e16ad6c6f93fdcf1ef..796f248d03e73be8adc289bf57093fa1
|
|||
@Override
|
||||
public ItemStack getProjectile(ItemStack stack) {
|
||||
if (!(stack.getItem() instanceof ProjectileWeaponItem)) {
|
||||
@@ -2262,7 +2273,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2260,7 +2271,7 @@ public abstract class Player extends LivingEntity {
|
||||
for (int i = 0; i < this.inventory.getContainerSize(); ++i) {
|
||||
ItemStack itemstack2 = this.inventory.getItem(i);
|
||||
|
||||
|
|
|
@ -82,10 +82,10 @@ index 3380b95e0eff5a6b1b683b8233b8991eb817b638..de8485df1c23e903ff0721fdb682b98d
|
|||
serverLevel.playSound((Player)null, goat, this.getImpactSound.apply(goat), SoundSource.HOSTILE, 1.0F, 1.0F);
|
||||
} else if (this.hasRammedHornBreakingBlock(serverLevel, goat)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 796f248d03e73be8adc289bf57093fa15dbf48e5..a721a1e1eb1d604eec4e64ebcc6c50b01c522c66 100644
|
||||
index e48995a975a8540eb93df76f3e1825cc9762c214..1b0a86441fcef191a7c3a8eb2def7e09f1b3ce06 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1297,7 +1297,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1295,7 +1295,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
if (target instanceof LivingEntity) {
|
||||
|
@ -94,7 +94,7 @@ index 796f248d03e73be8adc289bf57093fa15dbf48e5..a721a1e1eb1d604eec4e64ebcc6c50b0
|
|||
} else {
|
||||
target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1319,7 +1319,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
// CraftBukkit start - Only apply knockback if the damage hits
|
||||
if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {
|
||||
|
|
|
@ -118,10 +118,10 @@ index fe1636a73f1af09314a200b99c196984d09a4b4a..d35de56c2110c8dcdf6104010f2edb01
|
|||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName())));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index a721a1e1eb1d604eec4e64ebcc6c50b01c522c66..d44d472326d70fe60c5c975109aa7dc5f1971b5d 100644
|
||||
index 1b0a86441fcef191a7c3a8eb2def7e09f1b3ce06..ce34b94fa1d8d33cc0492841e1cbfb59be7600f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -272,7 +272,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -270,7 +270,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.updateIsUnderwater();
|
||||
super.tick();
|
||||
if (!this.level.isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) {
|
||||
|
@ -130,7 +130,7 @@ index a721a1e1eb1d604eec4e64ebcc6c50b01c522c66..d44d472326d70fe60c5c975109aa7dc5
|
|||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -496,6 +496,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -494,6 +494,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
|
|||
UUID, ticks lived, valid, dead
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 44bcf4477ab7b6ee231a774fb2e03544af9305c3..119e9e645ec8d9a730e84e29e8c045acd4d13785 100644
|
||||
index 106ff6a91c557d08305250f24f82dc84e8e4b79a..d09251502261764fdbb05facb6ce9a8d465ca3a9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2865,7 +2865,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2864,7 +2864,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public String toString() {
|
||||
String s = this.level == null ? "~NULL~" : this.level.toString();
|
||||
|
||||
|
|
|
@ -72,10 +72,10 @@ index efd06327b3cbe15d6a4c8b2f1082bc43798de311..8c00f5d064106cca5722bdd41287ba4e
|
|||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 119e9e645ec8d9a730e84e29e8c045acd4d13785..a279b7473a4e3397898707bf232c7866aacee9d1 100644
|
||||
index d09251502261764fdbb05facb6ce9a8d465ca3a9..737f941bee26abfc73304d362913c552c0d3552b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -194,6 +194,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -193,6 +193,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index a2426b71830d5c39fff04cedaa7569abe332f92a..59723d34be0517d3d747598f275f4f2829c258a3 100644
|
||||
index e7dbcacff58ce4b48f315eae80878c136b740416..cc908aeba2edd49a1282e84a28f68801581af77d 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -362,6 +362,7 @@ public final class ItemStack {
|
||||
@@ -360,6 +360,7 @@ public final class ItemStack {
|
||||
enuminteractionresult = InteractionResult.FAIL; // cancel placement
|
||||
// PAIL: Remove this when MC-99075 fixed
|
||||
placeEvent.getPlayer().updateInventory();
|
||||
|
|
|
@ -41,10 +41,10 @@ index 222452a5549e29ef43d183390cc41783aeb8f3e9..3e50915041041486dc6dd939609bcd26
|
|||
|
||||
if (entity1 != entity && this.connection != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a279b7473a4e3397898707bf232c7866aacee9d1..18fe107cee949495d2eb7525526d96390c04b0d6 100644
|
||||
index 737f941bee26abfc73304d362913c552c0d3552b..848a9b1650c222f92b4ba7fba972f21fde9b3498 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2278,11 +2278,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2277,11 +2277,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void removeVehicle() {
|
||||
|
@ -62,7 +62,7 @@ index a279b7473a4e3397898707bf232c7866aacee9d1..18fe107cee949495d2eb7525526d9639
|
|||
}
|
||||
|
||||
}
|
||||
@@ -2345,7 +2350,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2344,7 +2349,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ index a279b7473a4e3397898707bf232c7866aacee9d1..18fe107cee949495d2eb7525526d9639
|
|||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2355,7 +2363,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2354,7 +2362,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) this.getBukkitEntity(),
|
||||
|
@ -83,7 +83,7 @@ index a279b7473a4e3397898707bf232c7866aacee9d1..18fe107cee949495d2eb7525526d9639
|
|||
);
|
||||
// Suppress during worldgen
|
||||
if (this.valid) {
|
||||
@@ -2369,7 +2377,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2368,7 +2376,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
|
@ -114,10 +114,10 @@ index 370ec54f5c6741e7c9f3630e7f42ea7d7a7d1423..3ea28ff50d409d1d234d17f62207b058
|
|||
this.dismountVehicle(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index d44d472326d70fe60c5c975109aa7dc5f1971b5d..9b8c73b06850e40f69b70bdb6c8a3a86d678b645 100644
|
||||
index ce34b94fa1d8d33cc0492841e1cbfb59be7600f4..bac822f72cf8b2c6858343cf80a59284b9118ab6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1161,7 +1161,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1159,7 +1159,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void removeVehicle() {
|
||||
|
|
|
@ -35,7 +35,7 @@ index 056d89f0a8f94e2be94a773068cf2cf52556ce5a..604ce3bcec48f63292020220e4636595
|
|||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 18fe107cee949495d2eb7525526d96390c04b0d6..6f426a028e9158bf6ff554d9b9e1f0d097505ecf 100644
|
||||
index 848a9b1650c222f92b4ba7fba972f21fde9b3498..2bbfd0364af2ad49ffdfa0eeb124eed6278efade 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -73,6 +73,8 @@ import net.minecraft.world.InteractionHand;
|
||||
|
@ -47,7 +47,7 @@ index 18fe107cee949495d2eb7525526d96390c04b0d6..6f426a028e9158bf6ff554d9b9e1f0d0
|
|||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.vehicle.Boat;
|
||||
@@ -190,6 +192,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -189,6 +191,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
|
@ -55,7 +55,7 @@ index 18fe107cee949495d2eb7525526d96390c04b0d6..6f426a028e9158bf6ff554d9b9e1f0d0
|
|||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
@@ -1922,6 +1925,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1921,6 +1924,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ index 18fe107cee949495d2eb7525526d96390c04b0d6..6f426a028e9158bf6ff554d9b9e1f0d0
|
|||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -2065,6 +2071,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2064,6 +2070,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
|
|
@ -35,7 +35,7 @@ index ce892ab0a2f5c648c1e6f4b3d4332102ae7b8be2..4e90cc3970c77d8a488ac8bbcbaacf78
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 03a8b247aa1045a70e559e4cda8350a2b7bc5ed4..71bed00743ec7ef026a59fc84f8e9153a32e269a 100644
|
||||
index ed8d4ee72f179a55c12e83dfc691a57984d1c592..8bb4657523acef60df297cc4ebae292eb6a79591 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1409,6 +1409,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
@ -47,10 +47,10 @@ index 03a8b247aa1045a70e559e4cda8350a2b7bc5ed4..71bed00743ec7ef026a59fc84f8e9153
|
|||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 59723d34be0517d3d747598f275f4f2829c258a3..db8db2ab4c81cbf6eb4f21b8916e487c4e2d51fb 100644
|
||||
index cc908aeba2edd49a1282e84a28f68801581af77d..5d7e07a9612dc8e62b5843b3c805f6423d5304f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -627,11 +627,12 @@ public final class ItemStack {
|
||||
@@ -625,11 +625,12 @@ public final class ItemStack {
|
||||
return this.getItem().interactLivingEntity(this, user, entity, hand);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,10 +108,10 @@ index 06d4c948241f121f4ccafe869b3e37c8a6279622..1d036031889a41134b5c475c18a85c5b
|
|||
} else {
|
||||
passenger.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6f426a028e9158bf6ff554d9b9e1f0d097505ecf..dff627579f775dbe0a6323ffa60d9a65299b121a 100644
|
||||
index 2bbfd0364af2ad49ffdfa0eeb124eed6278efade..a5366974f4252dabb26e89273103008115a94a72 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -343,6 +343,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -342,6 +342,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
|
@ -120,7 +120,7 @@ index 6f426a028e9158bf6ff554d9b9e1f0d097505ecf..dff627579f775dbe0a6323ffa60d9a65
|
|||
protected int numCollisions = 0; // Paper
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
@javax.annotation.Nullable
|
||||
@@ -816,6 +818,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -815,6 +817,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
this.wasOnFire = this.isOnFire();
|
||||
if (movementType == MoverType.PISTON) {
|
||||
|
@ -129,7 +129,7 @@ index 6f426a028e9158bf6ff554d9b9e1f0d097505ecf..dff627579f775dbe0a6323ffa60d9a65
|
|||
movement = this.limitPistonMovement(movement);
|
||||
if (movement.equals(Vec3.ZERO)) {
|
||||
return;
|
||||
@@ -828,6 +832,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -827,6 +831,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.setDeltaMovement(Vec3.ZERO);
|
||||
}
|
||||
|
|
|
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
|
|||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dff627579f775dbe0a6323ffa60d9a65299b121a..a0a5c5b4e5a684f5ead6ad021966723c11d49547 100644
|
||||
index a5366974f4252dabb26e89273103008115a94a72..3747415098127bb5700fa6e019635a345732557b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3072,6 +3072,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3071,6 +3071,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (flag1) {
|
||||
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||
} else {
|
||||
|
|
|
@ -21,10 +21,10 @@ index a9b3442a49dc359959496d1f6adadefa76bfc863..62dfb6afe204c078f579a3dae944d935
|
|||
private void lightQueueSize() {
|
||||
lightQueueSize = getInt("light-queue-size", lightQueueSize);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a0a5c5b4e5a684f5ead6ad021966723c11d49547..ea522476dff5408e1b7e488c4460406409d140ca 100644
|
||||
index 3747415098127bb5700fa6e019635a345732557b..0d930c195cb898b5649b49e74425b53693ea87c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -345,6 +345,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -344,6 +344,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// Paper start
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE; // Paper
|
||||
public boolean isTemporarilyActive = false; // Paper
|
||||
|
@ -32,7 +32,7 @@ index a0a5c5b4e5a684f5ead6ad021966723c11d49547..ea522476dff5408e1b7e488c44604064
|
|||
protected int numCollisions = 0; // Paper
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
@javax.annotation.Nullable
|
||||
@@ -1943,6 +1944,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1942,6 +1943,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbt.putBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ index a0a5c5b4e5a684f5ead6ad021966723c11d49547..ea522476dff5408e1b7e488c44604064
|
|||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2082,6 +2086,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2081,6 +2085,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
|
|
@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
|
|||
due to 1.15's new queue but processed while dead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 9b8c73b06850e40f69b70bdb6c8a3a86d678b645..b9eb4d650272566cae6b2239f381da7761bcc986 100644
|
||||
index bac822f72cf8b2c6858343cf80a59284b9118ab6..a8b122503a5e46242706b6f654b8fc259bf7321c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1173,7 +1173,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1171,7 +1171,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected boolean isImmobile() {
|
||||
|
|
|
@ -26,10 +26,10 @@ index a2071ea91515c5ddd2318cc4918328d20dec224e..dcdf25a8111410d54adc2e758775efcc
|
|||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ea522476dff5408e1b7e488c4460406409d140ca..0e36422d3bf2261ee792774b17cfbeadd05f2b1d 100644
|
||||
index 0d930c195cb898b5649b49e74425b53693ea87c1..8833e6161f1dc5eb524d0eee7a3ce120a5584782 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -195,6 +195,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -194,6 +194,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
|
|
|
@ -7,10 +7,10 @@ The code following this has better support for null worlds to move
|
|||
them back to the world spawn.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0e36422d3bf2261ee792774b17cfbeadd05f2b1d..60ef82b7811fbb3e579b2f1321ed065404dafeda 100644
|
||||
index 8833e6161f1dc5eb524d0eee7a3ce120a5584782..7dd4c0bc2fb874a94970ddbf86f998948ee72796 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2059,9 +2059,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2058,9 +2058,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
bworld = server.getWorld(worldName);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
|||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 60ef82b7811fbb3e579b2f1321ed065404dafeda..1413acf7029fd690fbdb50c80037d040ef24e24f 100644
|
||||
index 7dd4c0bc2fb874a94970ddbf86f998948ee72796..89471c12b3d251848ad57e975c27673f756a5133 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2189,11 +2189,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2188,11 +2188,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
|
@ -34,7 +34,7 @@ index 60ef82b7811fbb3e579b2f1321ed065404dafeda..1413acf7029fd690fbdb50c80037d040
|
|||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -2957,6 +2958,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2956,6 +2957,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, BlockPos location) {
|
||||
// CraftBukkit end
|
||||
|
@ -47,7 +47,7 @@ index 60ef82b7811fbb3e579b2f1321ed065404dafeda..1413acf7029fd690fbdb50c80037d040
|
|||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||
this.level.getProfiler().push("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -2983,6 +2990,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2982,6 +2989,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit end
|
||||
|
||||
this.level.getProfiler().popPush("reloading");
|
||||
|
@ -59,7 +59,7 @@ index 60ef82b7811fbb3e579b2f1321ed065404dafeda..1413acf7029fd690fbdb50c80037d040
|
|||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -2996,10 +3008,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2995,10 +3007,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
|
@ -70,7 +70,7 @@ index 60ef82b7811fbb3e579b2f1321ed065404dafeda..1413acf7029fd690fbdb50c80037d040
|
|||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -3121,7 +3129,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3120,7 +3128,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
|
|
|
@ -280,7 +280,7 @@ index 464a00542756437d8c3dccc1a85ae51cfdb588d2..95dbf60604d86666a359c0d861ef3eb8
|
|||
return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1413acf7029fd690fbdb50c80037d040ef24e24f..bbd94142c3519bc8a6602a31699a7132119e395c 100644
|
||||
index 89471c12b3d251848ad57e975c27673f756a5133..a92e716a295bf575c3ec47387c008fda8d6c6b77 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -56,6 +56,7 @@ import net.minecraft.network.syncher.EntityDataSerializers;
|
||||
|
@ -291,7 +291,7 @@ index 1413acf7029fd690fbdb50c80037d040ef24e24f..bbd94142c3519bc8a6602a31699a7132
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
@@ -383,6 +384,39 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -382,6 +383,39 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index bbd94142c3519bc8a6602a31699a7132119e395c..36fa5864edb6da34ba005487fd62255421d6190f 100644
|
||||
index a92e716a295bf575c3ec47387c008fda8d6c6b77..99ca6777dbdbef9c3955614ec05ce354ff4b14d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -621,8 +621,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -620,8 +620,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void setPos(double x, double y, double z) {
|
||||
|
@ -19,7 +19,7 @@ index bbd94142c3519bc8a6602a31699a7132119e395c..36fa5864edb6da34ba005487fd622554
|
|||
}
|
||||
|
||||
protected AABB makeBoundingBox() {
|
||||
@@ -3834,6 +3834,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3833,6 +3833,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public final void setPosRaw(double x, double y, double z) {
|
||||
|
@ -31,7 +31,7 @@ index bbd94142c3519bc8a6602a31699a7132119e395c..36fa5864edb6da34ba005487fd622554
|
|||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
this.position = new Vec3(x, y, z);
|
||||
int i = Mth.floor(x);
|
||||
@@ -3851,6 +3856,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3850,6 +3855,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.levelCallback.onMove();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add entity liquid API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 36fa5864edb6da34ba005487fd62255421d6190f..54983139e0b2e7fab96e5bf2be31fec2c1776f0b 100644
|
||||
index 99ca6777dbdbef9c3955614ec05ce354ff4b14d0..c91a81a26bb85041ac6f93de93ca4d7ba2513f39 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1408,7 +1408,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1407,7 +1407,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.isInWater() || this.isInRain();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ Subject: [PATCH] Update itemstack legacy name and lore
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index db8db2ab4c81cbf6eb4f21b8916e487c4e2d51fb..8df392c0c607e4775debdac97ad564ddcbaf0607 100644
|
||||
index 5d7e07a9612dc8e62b5843b3c805f6423d5304f2..8400f6fc96efecf0ea77f2e163b589ec375272cd 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -168,6 +168,44 @@ public final class ItemStack {
|
||||
list.sort((Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
||||
@@ -166,6 +166,44 @@ public final class ItemStack {
|
||||
list.sort((java.util.Comparator<? super net.minecraft.nbt.Tag>) enchantSorter); // Paper
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
+
|
||||
|
@ -53,7 +53,7 @@ index db8db2ab4c81cbf6eb4f21b8916e487c4e2d51fb..8df392c0c607e4775debdac97ad564dd
|
|||
// Paper end
|
||||
|
||||
public ItemStack(ItemLike item) {
|
||||
@@ -222,6 +260,7 @@ public final class ItemStack {
|
||||
@@ -220,6 +258,7 @@ public final class ItemStack {
|
||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
||||
// CraftBukkit end
|
||||
this.processEnchantOrder(this.tag); // Paper
|
||||
|
|
|
@ -1135,10 +1135,10 @@ index f9fbbd0130c1d3e2ed51f0c79d275c6861aec4fd..28ef198d96e78fb51125519f3707545f
|
|||
if (updatingChunk != null) {
|
||||
return updatingChunk.getEntityTickingChunkFuture();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 54983139e0b2e7fab96e5bf2be31fec2c1776f0b..911dd8bf57b767e658bd9fce87616e07693d2639 100644
|
||||
index c91a81a26bb85041ac6f93de93ca4d7ba2513f39..3590c6de96e741d656654b228a59efc43a79cde2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -252,7 +252,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -251,7 +251,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
private BlockPos blockPosition;
|
||||
private ChunkPos chunkPosition;
|
||||
private Vec3 deltaMovement;
|
||||
|
@ -1194,7 +1194,7 @@ index 62aef8853b168d6330fb3fe357dfb8de310cc37f..d84db6b9cbabd7979c391fa7d1ae1f55
|
|||
net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null);
|
||||
if (chunk != null) addTicket(x, z); // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 9747023b0102c055e56b5a8434d3e003d1ed1059..eb6834639a434fd7938b071243fb64ab2205593f 100644
|
||||
index f5ccd52b40bccc478c83d9393adf8622fc101aa2..463e8e1604860dd23ab154936a954bc5f4595050 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1028,6 +1028,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index bdd2e7e723e1f90bf2b7f6067f6b2f2855c2065f..0f55d212ccab8f82d60688b270115650bb959acc 100644
|
||||
index 8400f6fc96efecf0ea77f2e163b589ec375272cd..494a39cfafa5a632ccb61b196b0ec4e5772aa180 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -433,7 +433,7 @@ public final class ItemStack {
|
||||
@@ -431,7 +431,7 @@ public final class ItemStack {
|
||||
net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition);
|
||||
|
||||
if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
|
||||
|
|
|
@ -31,10 +31,10 @@ index 5c00238e29cfd6ed107e3bf988a9ac2e55e55361..85841a93e17e685bb7d676995891d27c
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 911dd8bf57b767e658bd9fce87616e07693d2639..641af6203a30b4614176bfc3fc4a1bf1b9143360 100644
|
||||
index 3590c6de96e741d656654b228a59efc43a79cde2..ee5f3e0adc86660b7f8eacf761a9b2cf0e019394 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -158,6 +158,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -157,6 +157,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
|
@ -42,7 +42,7 @@ index 911dd8bf57b767e658bd9fce87616e07693d2639..641af6203a30b4614176bfc3fc4a1bf1
|
|||
static boolean isLevelAtLeast(CompoundTag tag, int level) {
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
@@ -1615,6 +1616,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1614,6 +1615,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void moveTo(double x, double y, double z, float yaw, float pitch) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 641af6203a30b4614176bfc3fc4a1bf1b9143360..4b9b86e96783f070739dcb0aa80cdfaf66b16dfd 100644
|
||||
index ee5f3e0adc86660b7f8eacf761a9b2cf0e019394..b649331eb5e1a94d4d9c4bc16f17c7abdf25e417 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4037,4 +4037,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4036,4 +4036,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
void accept(Entity entity, double x, double y, double z);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4b9b86e96783f070739dcb0aa80cdfaf66b16dfd..367f5d5a6310a2feb1b28b15d130c0f61106f57b 100644
|
||||
index b649331eb5e1a94d4d9c4bc16f17c7abdf25e417..abff005638997cc991bc7e7c5fd98c91d8f076cf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -58,6 +58,7 @@ import net.minecraft.resources.ResourceKey;
|
||||
|
@ -16,7 +16,7 @@ index 4b9b86e96783f070739dcb0aa80cdfaf66b16dfd..367f5d5a6310a2feb1b28b15d130c0f6
|
|||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.TicketType;
|
||||
@@ -4042,5 +4043,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -4041,5 +4042,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public static int nextEntityId() {
|
||||
return ENTITY_COUNTER.incrementAndGet();
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ index 9147b408b35b7d15ced3749e34706087d2cdffd8..340e610b6af2dab7d916c530d3cce9aa
|
|||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 367f5d5a6310a2feb1b28b15d130c0f61106f57b..202eca5204ab5eea2d63a1900046e3e15d45f97f 100644
|
||||
index abff005638997cc991bc7e7c5fd98c91d8f076cf..a260eeed180b43bb0b13e3192682822a4fde624c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1796,6 +1796,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1795,6 +1795,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public boolean isPushable() {
|
||||
|
|
|
@ -28,10 +28,10 @@ index 96fd9803810db0f8a4b25e070a56da05862e1e4e..2b3e034d6cddbe5c94f2be856833680d
|
|||
public int wanderingTraderSpawnDayTicks = 24000;
|
||||
public int wanderingTraderSpawnChanceFailureIncrement = 25;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 202eca5204ab5eea2d63a1900046e3e15d45f97f..7d699878267293a6bb3183c218662144706f4abe 100644
|
||||
index a260eeed180b43bb0b13e3192682822a4fde624c..5f5c6b2bf1c3056965ea343a1444e1be753d819f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1679,6 +1679,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1678,6 +1678,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public void push(Entity entity) {
|
||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||
if (!entity.noPhysics && !this.noPhysics) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added PlayerDeepSleepEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index b9eb4d650272566cae6b2239f381da7761bcc986..b8077f26c8705b78ff7bd91a15bf6deac922b85b 100644
|
||||
index a8b122503a5e46242706b6f654b8fc259bf7321c..ef920c0596a50c6bbe0e5b05df2fe3c700d05e83 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -255,6 +255,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -253,6 +253,11 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (this.isSleeping()) {
|
||||
++this.sleepCounter;
|
||||
|
|
|
@ -11,10 +11,10 @@ Move the tick logic into the post tick, where portaling was
|
|||
designed to happen in the first place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7d699878267293a6bb3183c218662144706f4abe..27846c6b42602a6e23031f79b05ae832c6a76061 100644
|
||||
index 5f5c6b2bf1c3056965ea343a1444e1be753d819f..b5340dc3c41ac10637794422b974d69a8a70c23b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -418,6 +418,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -417,6 +417,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
|
||||
}
|
||||
// Paper end - optimise entity tracking
|
||||
|
@ -51,7 +51,7 @@ index 7d699878267293a6bb3183c218662144706f4abe..27846c6b42602a6e23031f79b05ae832
|
|||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -2583,6 +2613,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2582,6 +2612,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
this.processPortalCooldown();
|
||||
|
|
|
@ -18,10 +18,10 @@ index d78de27793ffca39a256accecd5033860ac23d1d..641bfb20197e6885c019aa825ff06980
|
|||
|
||||
this.awardStat(Stats.DROP);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index b8077f26c8705b78ff7bd91a15bf6deac922b85b..8d8ecdbb8447a2d19cf380ae1f35291c3adf3300 100644
|
||||
index ef920c0596a50c6bbe0e5b05df2fe3c700d05e83..3ef7815063d3dce4044710e685a01b8f02f7c005 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -724,6 +724,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -722,6 +722,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
double d0 = this.getEyeY() - 0.30000001192092896D;
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Added EntityDamageItemEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 2f06f33a495f94e3bf8ab755db6320fab04bd767..d1938cf3e56c3a4fd8623349038d5f38dd3ea472 100644
|
||||
index 494a39cfafa5a632ccb61b196b0ec4e5772aa180..c8943bbd72d7ea12298af710d465983cdaa394e8 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -549,7 +549,7 @@ public final class ItemStack {
|
||||
@@ -547,7 +547,7 @@ public final class ItemStack {
|
||||
return this.getItem().getMaxDamage();
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ index 2f06f33a495f94e3bf8ab755db6320fab04bd767..d1938cf3e56c3a4fd8623349038d5f38
|
|||
if (!this.isDamageableItem()) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -567,8 +567,8 @@ public final class ItemStack {
|
||||
@@ -565,8 +565,8 @@ public final class ItemStack {
|
||||
|
||||
amount -= k;
|
||||
// CraftBukkit start
|
||||
|
@ -28,7 +28,7 @@ index 2f06f33a495f94e3bf8ab755db6320fab04bd767..d1938cf3e56c3a4fd8623349038d5f38
|
|||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (amount != event.getDamage() || event.isCancelled()) {
|
||||
@@ -579,6 +579,14 @@ public final class ItemStack {
|
||||
@@ -577,6 +577,14 @@ public final class ItemStack {
|
||||
}
|
||||
|
||||
amount = event.getDamage();
|
||||
|
@ -43,7 +43,7 @@ index 2f06f33a495f94e3bf8ab755db6320fab04bd767..d1938cf3e56c3a4fd8623349038d5f38
|
|||
}
|
||||
// CraftBukkit end
|
||||
if (amount <= 0) {
|
||||
@@ -586,8 +594,8 @@ public final class ItemStack {
|
||||
@@ -584,8 +592,8 @@ public final class ItemStack {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ index 2f06f33a495f94e3bf8ab755db6320fab04bd767..d1938cf3e56c3a4fd8623349038d5f38
|
|||
}
|
||||
|
||||
j = this.getDamageValue() + amount;
|
||||
@@ -599,7 +607,7 @@ public final class ItemStack {
|
||||
@@ -597,7 +605,7 @@ public final class ItemStack {
|
||||
public <T extends LivingEntity> void hurtAndBreak(int amount, T entity, Consumer<T> breakCallback) {
|
||||
if (!entity.level.isClientSide && (!(entity instanceof net.minecraft.world.entity.player.Player) || !((net.minecraft.world.entity.player.Player) entity).getAbilities().instabuild)) {
|
||||
if (this.isDamageableItem()) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 27846c6b42602a6e23031f79b05ae832c6a76061..cef2315a03ec30889e8f73648749e45268d88203 100644
|
||||
index b5340dc3c41ac10637794422b974d69a8a70c23b..4dae2acdcc26a5513efe8df6b1904c7c85b08675 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3559,26 +3559,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3558,26 +3558,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
private Stream<Entity> getIndirectPassengersStream() {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cef2315a03ec30889e8f73648749e45268d88203..eaeb863a77b1a6f5430ec21806419abff21989df 100644
|
||||
index 4dae2acdcc26a5513efe8df6b1904c7c85b08675..80be82855b06fa98602775027906f4b77076be35 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3060,6 +3060,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3059,6 +3059,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
worldserver = shapedetectorshape.world;
|
||||
|
@ -32,7 +32,7 @@ index cef2315a03ec30889e8f73648749e45268d88203..eaeb863a77b1a6f5430ec21806419abf
|
|||
if (worldserver == this.level) {
|
||||
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
|
||||
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
|
||||
@@ -3079,8 +3096,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3078,8 +3095,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
if (entity != null) {
|
||||
entity.restoreFrom(this);
|
||||
|
|
|
@ -29,10 +29,10 @@ index 752f9f11227a47b7bed675b93e95af89c6732f63..67bce77093dcc126098731047447da20
|
|||
public static DamageSource sting(LivingEntity attacker) {
|
||||
return new EntityDamageSource("sting", attacker);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 8d8ecdbb8447a2d19cf380ae1f35291c3adf3300..c8b87d5f7af7f19968007cbc18359f0af33040a5 100644
|
||||
index 3ef7815063d3dce4044710e685a01b8f02f7c005..25408bec63bbc8ff44882f7491e81eb1f91058ee 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1275,7 +1275,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1273,7 +1273,7 @@ public abstract class Player extends LivingEntity {
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ index 8d8ecdbb8447a2d19cf380ae1f35291c3adf3300..c8b87d5f7af7f19968007cbc18359f0a
|
|||
|
||||
flag2 = flag2 && !level.paperConfig.disablePlayerCrits; // Paper
|
||||
flag2 = flag2 && !this.isSprinting();
|
||||
@@ -1315,7 +1315,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1313,7 +1313,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
Vec3 vec3d = target.getDeltaMovement();
|
||||
|
@ -50,7 +50,7 @@ index 8d8ecdbb8447a2d19cf380ae1f35291c3adf3300..c8b87d5f7af7f19968007cbc18359f0a
|
|||
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
@@ -1343,7 +1343,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1341,7 +1341,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
// CraftBukkit start - Only apply knockback if the damage hits
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index eaeb863a77b1a6f5430ec21806419abff21989df..3a4ea867f8d8013813ff4aceb7cc54ff9d9116c2 100644
|
||||
index 80be82855b06fa98602775027906f4b77076be35..4cab4400345a9ce3e1c6ae0fa4288d86c53e1704 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1885,6 +1885,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1884,6 +1884,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ index a39a387a744ec1f63c06fc05b431983a6e8bf70a..866e4aa0080363976861fcbfe6aedc38
|
|||
public void doCloseContainer() {
|
||||
this.containerMenu.removed(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index c8b87d5f7af7f19968007cbc18359f0af33040a5..520150814d5ceaba80c34b0f4ea0bb7abe4e8269 100644
|
||||
index 25408bec63bbc8ff44882f7491e81eb1f91058ee..2987d675af3b778d20be66e2ac2cddf6b4957d1d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -507,6 +507,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -505,6 +505,11 @@ public abstract class Player extends LivingEntity {
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
// Paper end
|
||||
|
|
|
@ -953,10 +953,10 @@ index ba3023c7dd5b3bcf66f829fe5dc9757f96d16b45..05ff7bcc79e617904903cf082f6687d2
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3a4ea867f8d8013813ff4aceb7cc54ff9d9116c2..3f163aac6d5074e8952f48176481403834f20ae0 100644
|
||||
index 4cab4400345a9ce3e1c6ae0fa4288d86c53e1704..038a7d0a1f5e38e630b3b39268454f095f0512e7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -449,6 +449,56 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -448,6 +448,56 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Paper end - make end portalling safe
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ index 3a4ea867f8d8013813ff4aceb7cc54ff9d9116c2..3f163aac6d5074e8952f481764814038
|
|||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
this.passengers = ImmutableList.of();
|
||||
@@ -2320,11 +2370,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2319,11 +2369,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,10 +123,10 @@ index 07f5c61fc3da270215133d2d0240e96f701a6216..4566c7b0cd5551f2e348e532911e77c6
|
|||
|
||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3f163aac6d5074e8952f48176481403834f20ae0..406cf22d8b8ad4f3a19ce8091c290f22be05e6bb 100644
|
||||
index 038a7d0a1f5e38e630b3b39268454f095f0512e7..47523429d105403afa1546c9bf9cba85fc3087ea 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -930,7 +930,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -929,7 +929,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.onGround;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ index 3f163aac6d5074e8952f48176481403834f20ae0..406cf22d8b8ad4f3a19ce8091c290f22
|
|||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -1103,6 +1138,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1102,6 +1137,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ index 3f163aac6d5074e8952f48176481403834f20ae0..406cf22d8b8ad4f3a19ce8091c290f22
|
|||
}
|
||||
|
||||
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
||||
@@ -3911,7 +3953,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3910,7 +3952,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void setDeltaMovement(Vec3 velocity) {
|
||||
|
@ -193,7 +193,7 @@ index 3f163aac6d5074e8952f48176481403834f20ae0..406cf22d8b8ad4f3a19ce8091c290f22
|
|||
}
|
||||
|
||||
public void setDeltaMovement(double x, double y, double z) {
|
||||
@@ -3977,7 +4021,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3976,7 +4020,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
|
||||
// Paper end
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
|
|
|
@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw.
|
|||
This issue only applies to players.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 406cf22d8b8ad4f3a19ce8091c290f22be05e6bb..d5c715f436afe3adbe63cc6958318a50fbd2b87e 100644
|
||||
index 47523429d105403afa1546c9bf9cba85fc3087ea..1427002e8433359d4fda2a11ae13d88c3f0b050f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1713,6 +1713,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1712,6 +1712,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
|
||||
this.yRotO = this.getYRot();
|
||||
this.xRotO = this.getXRot();
|
||||
|
@ -19,7 +19,7 @@ index 406cf22d8b8ad4f3a19ce8091c290f22be05e6bb..d5c715f436afe3adbe63cc6958318a50
|
|||
}
|
||||
|
||||
public void absMoveTo(double x, double y, double z) {
|
||||
@@ -1751,6 +1752,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1750,6 +1751,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.setXRot(pitch);
|
||||
this.setOldPosAndRot();
|
||||
this.reapplyPosition();
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] don't attempt to teleport dead entities
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d5c715f436afe3adbe63cc6958318a50fbd2b87e..757abf11362fa9e402dd6dd44c3bfc0ad74c5021 100644
|
||||
index 1427002e8433359d4fda2a11ae13d88c3f0b050f..e30f87b4a8bd75b1be517dda362e7c35cf04b88b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -738,7 +738,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -737,7 +737,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit start
|
||||
public void postTick() {
|
||||
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
||||
|
|
|
@ -1215,10 +1215,10 @@ index 082a16f49c07faadce68fc118b2fff859da422d0..ac9ee7f574f9b6c5e9c9368e54928e47
|
|||
}
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 757abf11362fa9e402dd6dd44c3bfc0ad74c5021..2661a635b99fa55b79802bb1e71797362f6dfa7c 100644
|
||||
index e30f87b4a8bd75b1be517dda362e7c35cf04b88b..af919459ebc8ef08a1016e140a8ef3432a0efb0c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1119,9 +1119,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1118,9 +1118,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
float f2 = this.getBlockSpeedFactor();
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply((double) f2, 1.0D, (double) f2));
|
||||
|
@ -1266,7 +1266,7 @@ index 757abf11362fa9e402dd6dd44c3bfc0ad74c5021..2661a635b99fa55b79802bb1e7179736
|
|||
if (this.remainingFireTicks <= 0) {
|
||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||
}
|
||||
@@ -1265,32 +1300,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1264,32 +1299,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
private Vec3 collide(Vec3 movement) {
|
||||
|
@ -1366,7 +1366,7 @@ index 757abf11362fa9e402dd6dd44c3bfc0ad74c5021..2661a635b99fa55b79802bb1e7179736
|
|||
}
|
||||
|
||||
public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List<VoxelShape> collisions) {
|
||||
@@ -2402,11 +2483,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2401,11 +2482,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
float f = this.dimensions.width * 0.8F;
|
||||
AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f);
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2661a635b99fa55b79802bb1e71797362f6dfa7c..526c564ebbf44421af8595d14bbbadc0de02c081 100644
|
||||
index af919459ebc8ef08a1016e140a8ef3432a0efb0c..273114f3a89e7ef861e988eb1db8ecc0c9a97436 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3224,6 +3224,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3223,6 +3223,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void restoreFrom(Entity original) {
|
||||
|
@ -22,7 +22,7 @@ index 2661a635b99fa55b79802bb1e71797362f6dfa7c..526c564ebbf44421af8595d14bbbadc0
|
|||
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
|
||||
|
||||
nbttagcompound.remove("Dimension");
|
||||
@@ -3305,10 +3312,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3304,10 +3311,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit
|
||||
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ index bdc6a7e6a9fcd467f653d53afd7ca2e33776fb06..e82bf53e1d31a5dd81713fe858d1e5d7
|
|||
+ // Paper start - Replace rules for Height in Swamp Biome
|
||||
+ final double maxHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMaxSpawnHeightInSwamp;
|
||||
+ final double minHeightSwamp = world.getMinecraftWorld().paperConfig.slimeMinSpawnHeightInSwamp;
|
||||
+ if (world.getBiome(pos).is(Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
|
||||
+ if (world.getBiome(pos).is(net.minecraft.world.level.biome.Biomes.SWAMP) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) {
|
||||
+ // Paper end
|
||||
return checkMobSpawnRules(type, world, spawnReason, pos, random);
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Freeze Tick Lock API
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 526c564ebbf44421af8595d14bbbadc0de02c081..fc03e5ddc126a57d4ca9f158b7d0f67401e1ca4b 100644
|
||||
index 273114f3a89e7ef861e988eb1db8ecc0c9a97436..0d327667f6cb1ad2adf993b14883b7967049aa02 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -356,6 +356,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -355,6 +355,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
private UUID originWorld;
|
||||
|
@ -16,7 +16,7 @@ index 526c564ebbf44421af8595d14bbbadc0de02c081..fc03e5ddc126a57d4ca9f158b7d0f674
|
|||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -784,7 +785,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -783,7 +784,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.setRemainingFireTicks(this.remainingFireTicks - 1);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ index 526c564ebbf44421af8595d14bbbadc0de02c081..fc03e5ddc126a57d4ca9f158b7d0f674
|
|||
this.setTicksFrozen(0);
|
||||
this.level.levelEvent((Player) null, 1009, this.blockPosition, 1);
|
||||
}
|
||||
@@ -2211,6 +2212,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2210,6 +2211,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (fromNetherPortal) {
|
||||
nbt.putBoolean("Paper.FromNetherPortal", true);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ index 526c564ebbf44421af8595d14bbbadc0de02c081..fc03e5ddc126a57d4ca9f158b7d0f674
|
|||
// Paper end
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2373,6 +2377,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2372,6 +2376,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (spawnReason == null) {
|
||||
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ new file mode 100644
|
|||
index 0000000000000000000000000000000000000000..ed3d488c6581df5eac425d9cccb8e741a52e91d5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/commands/FeedbackForwardingSender.java
|
||||
@@ -0,0 +1,112 @@
|
||||
@@ -0,0 +1,111 @@
|
||||
+package io.papermc.paper.commands;
|
||||
+
|
||||
+import io.papermc.paper.adventure.PaperAdventure;
|
||||
|
@ -21,7 +21,6 @@ index 0000000000000000000000000000000000000000..ed3d488c6581df5eac425d9cccb8e741
|
|||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+import net.minecraft.commands.CommandSource;
|
||||
+import net.minecraft.commands.CommandSourceStack;
|
||||
+import net.minecraft.network.chat.TextComponent;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
+import net.minecraft.world.phys.Vec2;
|
||||
+import net.minecraft.world.phys.Vec3;
|
||||
|
@ -89,7 +88,7 @@ index 0000000000000000000000000000000000000000..ed3d488c6581df5eac425d9cccb8e741
|
|||
+ overworld,
|
||||
+ 4,
|
||||
+ this.getName(),
|
||||
+ new TextComponent(this.getName()),
|
||||
+ net.minecraft.network.chat.Component.literal(this.getName()),
|
||||
+ this.server.getServer(),
|
||||
+ null
|
||||
+ );
|
||||
|
@ -97,8 +96,8 @@ index 0000000000000000000000000000000000000000..ed3d488c6581df5eac425d9cccb8e741
|
|||
+
|
||||
+ private record Source(FeedbackForwardingSender sender) implements CommandSource {
|
||||
+ @Override
|
||||
+ public void sendMessage(final net.minecraft.network.chat.Component message, final UUID sender) {
|
||||
+ this.sender.sendMessage(Identity.identity(sender), PaperAdventure.asAdventure(message));
|
||||
+ public void sendSystemMessage(final net.minecraft.network.chat.Component message) {
|
||||
+ this.sender.sendMessage(Identity.nil(), PaperAdventure.asAdventure(message));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
|
|
@ -20,10 +20,10 @@ index 00d31df5ba7e147b4b969a89cfc2b5088a988169..62d6c5b7590ff4faef5d8c7a8be03155
|
|||
}
|
||||
return InteractionResult.FAIL;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 1f28b9adeb234496f80416fd416a86a0e6437a36..acd80da6e249f83ccd96c3bd24c3b75d9084fc91 100644
|
||||
index c8943bbd72d7ea12298af710d465983cdaa394e8..30b307076e61c183acd5a1d900043b09f54734fc 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -339,7 +339,7 @@ public final class ItemStack {
|
||||
@@ -337,7 +337,7 @@ public final class ItemStack {
|
||||
int oldCount = this.getCount();
|
||||
ServerLevel world = (ServerLevel) itemactioncontext.getLevel();
|
||||
|
||||
|
@ -32,7 +32,7 @@ index 1f28b9adeb234496f80416fd416a86a0e6437a36..acd80da6e249f83ccd96c3bd24c3b75d
|
|||
world.captureBlockStates = true;
|
||||
// special case bonemeal
|
||||
if (this.getItem() == Items.BONE_MEAL) {
|
||||
@@ -393,7 +393,7 @@ public final class ItemStack {
|
||||
@@ -391,7 +391,7 @@ public final class ItemStack {
|
||||
world.capturedBlockStates.clear();
|
||||
if (blocks.size() > 1) {
|
||||
placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
|
|
|
@ -55,7 +55,7 @@ index 1d9fc45d3fcf8a704f9bb286daa13ba027215f0a..3795f867ff439a3bce293aa6ad3754a1
|
|||
+ // Paper start
|
||||
+ case org.bukkit.Tag.REGISTRY_GAME_EVENTS -> {
|
||||
+ Preconditions.checkArgument(clazz == org.bukkit.GameEvent.class, "Game Event namespace must have GameEvent type");
|
||||
+ TagKey<GameEvent> gameEventTagKey = TagKey.create(Registry.GAME_EVENT_REGISTRY, key);
|
||||
+ TagKey<net.minecraft.world.level.gameevent.GameEvent> gameEventTagKey = TagKey.create(Registry.GAME_EVENT_REGISTRY, key);
|
||||
+ if (Registry.GAME_EVENT.isKnownTagName(gameEventTagKey)) {
|
||||
+ return (org.bukkit.Tag<T>) new io.papermc.paper.CraftGameEventTag(Registry.GAME_EVENT, gameEventTagKey);
|
||||
+ }
|
||||
|
|
Loading…
Reference in New Issue