Remove no longer needed empty item check in entity data

Also fixes bad null values being set there
This commit is contained in:
Nassim Jahnke 2024-06-09 13:05:52 +02:00
parent c07adfddb2
commit b77d0fedd9
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -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) {