Skip to content

Commit

Permalink
feat: allow for enchantment lighting
Browse files Browse the repository at this point in the history
  • Loading branch information
bruberu committed Jul 5, 2024
1 parent f4ec77d commit c505209
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/gregtechfoodoption/item/GTFOMetaItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -1204,12 +1204,30 @@ public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStac
}
}

@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack stack) {
GTFOMetaValueItem item = this.getItem(stack);
if (item != null) {
return this.getItem(stack).hasEnchantmentSheen();
}
return false;
}

public class GTFOMetaValueItem extends MetaItem<?>.MetaValueItem {

private boolean kitchenBlacklisted;
protected GTFOMetaValueItem(int metaValue, String unlocalizedName) {
super(metaValue, unlocalizedName);
}
private boolean hasEnchantmentSheen;

public void setHasEnchantmentSheen(boolean hasEnchantmentSheen) {
this.hasEnchantmentSheen = hasEnchantmentSheen;
}

public boolean hasEnchantmentSheen() {
return hasEnchantmentSheen;
}

protected GTFOMetaValueItem blacklistKitchen() {
kitchenBlacklisted = true;
Expand Down

0 comments on commit c505209

Please sign in to comment.