Skip to content

Commit

Permalink
Don't send tags for custom skulls
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
Kas-tle authored Nov 1, 2023
1 parent df48bca commit 2c0728c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,6 @@ public void translate(GeyserSession session, ClientboundLevelChunkWithLightPacke
continue;
}

BlockEntityTranslator blockEntityTranslator = BlockEntityUtils.getBlockEntityTranslator(entity.type);
bedrockBlockEntities.add(blockEntityTranslator.getBlockEntityTag(session, entity.type, pos.getX(), pos.getY(), pos.getZ(), tag, entity.javaId));

// Check for custom skulls
if (session.getPreferencesCache().showCustomSkulls() && entity.type == "Skull" && tag != null && tag.contains("SkullOwner")) {
BlockDefinition blockDefinition = SkullBlockEntityTranslator.translateSkull(session, tag, pos, entity.javaId);
Expand All @@ -450,9 +447,13 @@ public void translate(GeyserSession session, ClientboundLevelChunkWithLightPacke
sections[bedrockSectionY] = bedrockSection;
}
bedrockSection.setFullBlock(pos.getX() & 0xF, pos.getY() & 0xF, pos.getZ() & 0xF, 0, blockDefinition.getRuntimeId());
continue;
}
}
}

BlockEntityTranslator blockEntityTranslator = BlockEntityUtils.getBlockEntityTranslator(entity.type);
bedrockBlockEntities.add(blockEntityTranslator.getBlockEntityTag(session, entity.type, pos.getX(), pos.getY(), pos.getZ(), tag, entity.javaId));
}

// Find highest section
Expand Down

0 comments on commit 2c0728c

Please sign in to comment.