3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 20:40:07 +01:00
Paper/Spigot-Server-Patches/0265-MC-111480-Start-Entity-ID-s-at-1.patch
Spottedleaf 19de9af63c 1.15.2 update (#2887)
Functional GUI fix added by billygalbreath
2020-01-21 20:02:07 -06:00

25 Zeilen
1.1 KiB
Diff

From 00c25be7c84bad842cc900163723e1c5929f436d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 29 Jul 2018 22:58:47 -0400
Subject: [PATCH] MC-111480: Start Entity ID's at 1
DataWatchers that store Entity ID's treat 0 as special,
and can break things such as Elytra Fireworks.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ca794328a..845993bb4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -93,7 +93,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
// CraftBukkit end
protected static final Logger LOGGER = LogManager.getLogger();
- private static final AtomicInteger entityCount = new AtomicInteger();
+ private static final AtomicInteger entityCount = new AtomicInteger(1); // paper - start entity count from 1
private static final List<ItemStack> c = Collections.emptyList();
private static final AxisAlignedBB d = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
private static double e = 1.0D;
--
2.25.0.windows.1