Skip to content

Commit

Permalink
Push :3
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Sep 12, 2024
1 parent 05bbfab commit e33319c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/dev/enjarai/blahajtotem/BlahajFlags.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package dev.enjarai.blahajtotem;

import dev.enjarai.blahajtotem.pond.BakedHuggableModel;
import net.fabricmc.fabric.api.renderer.v1.model.WrapperBakedModel;
import net.minecraft.client.MinecraftClient;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;

public class BlahajFlags {
public static boolean isHuggable(ItemStack itemStack, LivingEntity entity) {
var model = MinecraftClient.getInstance().getItemRenderer().getModel(itemStack, entity.getWorld(), entity, 0);
model = WrapperBakedModel.unwrap(model);
return model instanceof BakedHuggableModel huggableModel && huggableModel.blahaj_totem$isHuggable();
}
}

0 comments on commit e33319c

Please sign in to comment.