Skip to content

Commit

Permalink
fix possible NPE in wing renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
UpcraftLP committed Apr 23, 2024
1 parent 2310d5d commit 2d04ce0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.cammiescorner.icarus.client;

import com.google.common.base.MoreObjects;
import dev.cammiescorner.icarus.util.IcarusHelper;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
Expand Down Expand Up @@ -30,7 +31,7 @@ public static void onPlayerTick(Player player) {

@ApiStatus.Internal
public static ItemStack getWingsForRendering(LivingEntity entity) {
return IcarusHelper.getEquippedWings(entity);
return MoreObjects.firstNonNull(IcarusHelper.getEquippedWings(entity), ItemStack.EMPTY);
}

@ApiStatus.Internal
Expand Down

0 comments on commit 2d04ce0

Please sign in to comment.