From 8075cab01167cad3c3655e38afe3784cc69eb8e5 Mon Sep 17 00:00:00 2001 From: TheMode Date: Fri, 20 Aug 2021 06:49:13 +0200 Subject: [PATCH] Add ItemHideFlag#HIDE_DYE --- .../minestom/server/item/ItemHideFlag.java | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/net/minestom/server/item/ItemHideFlag.java b/src/main/java/net/minestom/server/item/ItemHideFlag.java index 5d05cbb28..a90cf5972 100644 --- a/src/main/java/net/minestom/server/item/ItemHideFlag.java +++ b/src/main/java/net/minestom/server/item/ItemHideFlag.java @@ -4,18 +4,15 @@ package net.minestom.server.item; * Represents a hide flag which can be applied to an {@link ItemStack} using {@link ItemMetaBuilder#hideFlag(int)}. */ public enum ItemHideFlag { - HIDE_ENCHANTS(1), - HIDE_ATTRIBUTES(2), - HIDE_UNBREAKABLE(4), - HIDE_DESTROYS(8), - HIDE_PLACED_ON(16), - HIDE_POTION_EFFECTS(32); + HIDE_ENCHANTS, + HIDE_ATTRIBUTES, + HIDE_UNBREAKABLE, + HIDE_DESTROYS, + HIDE_PLACED_ON, + HIDE_POTION_EFFECTS, + HIDE_DYE; - private final int bitFieldPart; - - ItemHideFlag(int bit) { - this.bitFieldPart = bit; - } + private final int bitFieldPart = 1 << this.ordinal(); public int getBitFieldPart() { return bitFieldPart;