mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 00:47:39 +01:00
Remove no longer needed empty item check in entity data
Also fixes bad null values being set there
This commit is contained in:
parent
c07adfddb2
commit
b77d0fedd9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user