Skip to content

Commit

Permalink
Fixed casting crash, closes #44
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Feb 28, 2024
1 parent bccdfe7 commit 1e5027b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ public static void register() {
}).subscribe();
EventManager.mod(EntityRenderersEvent.AddLayers.class).process(event -> {
for (String skin : event.getSkins()) {
PlayerRenderer renderer = event.getSkin(skin);
renderer.addLayer(new ContributorsBackRender(renderer));
var renderer = event.getSkin(skin);
if (renderer instanceof PlayerRenderer playerRenderer) {
playerRenderer.addLayer(new ContributorsBackRender(playerRenderer));
}
}
}).subscribe();
EventManager.mod(EntityRenderersEvent.RegisterLayerDefinitions.class).process(event -> {
Expand Down

0 comments on commit 1e5027b

Please sign in to comment.