aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0543-Remove-armour-stand-double-add-to-world.patch
blob: 835c6e761bd1f2fe5bd47a9a34d10fe1abc46b97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mariell Hoversholm <proximyst@proximyst.com>
Date: Fri, 14 Aug 2020 23:59:26 +0200
Subject: [PATCH] Remove armour stand double add to world


diff --git a/src/main/java/net/minecraft/world/item/ItemArmorStand.java b/src/main/java/net/minecraft/world/item/ItemArmorStand.java
index dd0dc2a321f2f99cbf1060e47deec0f690d6b948..cd46df5485ebfd597ea72360a27872d46174ee19 100644
--- a/src/main/java/net/minecraft/world/item/ItemArmorStand.java
+++ b/src/main/java/net/minecraft/world/item/ItemArmorStand.java
@@ -53,7 +53,7 @@ public class ItemArmorStand extends Item {
                         return EnumInteractionResult.FAIL;
                     }
 
-                    worldserver.addAllEntities(entityarmorstand);
+                    // Paper - moved down
                     float f = (float) MathHelper.d((MathHelper.g(itemactioncontext.h() - 180.0F) + 22.5F) / 45.0F) * 45.0F;
 
                     entityarmorstand.setPositionRotation(entityarmorstand.locX(), entityarmorstand.locY(), entityarmorstand.locZ(), f, 0.0F);
@@ -63,7 +63,7 @@ public class ItemArmorStand extends Item {
                         return EnumInteractionResult.FAIL;
                     }
                     // CraftBukkit end
-                    world.addEntity(entityarmorstand);
+                    worldserver.addAllEntities(entityarmorstand); // Paper - moved down
                     world.playSound((EntityHuman) null, entityarmorstand.locX(), entityarmorstand.locY(), entityarmorstand.locZ(), SoundEffects.ENTITY_ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F);
                 }