Fix VanillaConnectionNetworkFilter sending out invalid entity properties packets without an entity ID (#7560)

This commit is contained in:
Take Weiland authored and GitHub committed 2020-12-28 13:34:31 -08:00
1 parent b222b23557
commit b86b56260d
2 files changed
+3 -1

No files matched your search

@@ -20,6 +20,7 @@
package net.minecraftforge.network;
import java.util.AbstractMap;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
@@ -84,7 +85,7 @@ public class VanillaConnectionNetworkFilter extends MessageToMessageEncoder<IPac
@Nonnull
private static SEntityPropertiesPacket filterEntityProperties(SEntityPropertiesPacket msg)
{
SEntityPropertiesPacket newPacket = new SEntityPropertiesPacket();
SEntityPropertiesPacket newPacket = new SEntityPropertiesPacket(msg.getEntityId(), Collections.emptyList());
msg.getSnapshots().stream()
.filter(snapshot -> {
ResourceLocation key = ForgeRegistries.ATTRIBUTES.getKey(snapshot.func_240834_a_());