3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 00:22:51 +01:00

Remove no longer needed empty item check in entity data

Also fixes bad null values being set there
Dieser Commit ist enthalten in:
Nassim Jahnke 2024-06-09 13:05:52 +02:00
Ursprung c07adfddb2
Commit b77d0fedd9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -419,14 +419,6 @@ public final class EntityPacketRewriter1_20_5 extends EntityRewriter<Clientbound
filter().dataType(Types1_20_5.ENTITY_DATA_TYPES.componentType).handler((event, meta) -> protocol.getComponentRewriter().processTag(event.user(), meta.value()));
filter().dataType(Types1_20_5.ENTITY_DATA_TYPES.optionalComponentType).handler((event, meta) -> protocol.getComponentRewriter().processTag(event.user(), meta.value()));
filter().dataType(Types1_20_5.ENTITY_DATA_TYPES.itemType).handler((event, meta) -> {
final Item item = meta.value();
if (item != null && item.amount() <= 0) {
// No longer accepted by the client, needs to be properly empty
meta.setValue(null);
}
});
filter().type(EntityTypes1_20_5.LIVING_ENTITY).index(10).handler((event, meta) -> {
final int effectColor = meta.value();
if (effectColor == 0) {