FireworkEntity: don't process if item is null (#1160)

This commit is contained in:
Camotoy 2020-08-16 15:25:35 -04:00 committed by GitHub
parent 0e91475c62
commit 78e8792a2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,9 @@ public class FireworkEntity extends Entity {
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
if (entityMetadata.getId() == 7) {
ItemStack item = (ItemStack) entityMetadata.getValue();
if (item == null) {
return;
}
CompoundTag tag = item.getNbt();
if (tag == null) {