Update to 1.18.2

Co-authored-by: sciwhiz12 <[email protected]>
Co-authored-by: Marc Hermans <[email protected]>
Co-authored-by: LexManos <[email protected]>
Co-authored-by: Curle <[email protected]>
Signed-off-by: SizableShrimp <[email protected]>
This commit is contained in:
authored and LexManos committed 2022-03-01 14:16:46 -08:00
1 parent 34291c1fb2
commit 425eff39ff
234 files changed
+2175 -3226

No files matched your search

@@ -24,7 +24,7 @@ import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket;
import net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagCollection;
import net.minecraft.tags.TagNetworkSerialization;
import net.minecraftforge.common.ForgeTagHandler;
import net.minecraftforge.network.NetworkHooks;
import net.minecraftforge.registries.ForgeRegistries;
@@ -99,7 +99,7 @@ public class VanillaConnectionNetworkFilter extends VanillaPacketFilter
* It prevents a rare error from logging and reduces the packet size
*/
private static ClientboundUpdateTagsPacket filterCustomTagTypes(ClientboundUpdateTagsPacket packet) {
Map<ResourceKey<? extends Registry<?>>, TagCollection.NetworkPayload> tags = packet.getTags()
Map<ResourceKey<? extends Registry<?>>, TagNetworkSerialization.NetworkPayload> tags = packet.getTags()
.entrySet().stream().filter(e -> !ForgeTagHandler.getCustomTagTypeNames().contains(e.getKey().location()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
return new ClientboundUpdateTagsPacket(tags);