mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 18:24:10 +00:00
Fix Set Color
This commit is contained in:
1 parent
171dd65291
commit
4ee0e84475
1 file changed
+6
-5
@@ -168,10 +168,11 @@ public class ItemNpcTool extends Item {
|
||||
return tagCompound.getInteger(BRUSH_COLOR_TAG);
|
||||
}
|
||||
|
||||
public static int setColor(NBTTagCompound tagCompound, int color) {
|
||||
if (tagCompound == null || !tagCompound.hasKey(BRUSH_COLOR_TAG))
|
||||
return 0xFFFFFF;
|
||||
|
||||
return tagCompound.getInteger(BRUSH_COLOR_TAG);
|
||||
public static NBTTagCompound setColor(NBTTagCompound tagCompound, int color) {
|
||||
if (tagCompound == null) {
|
||||
tagCompound = new NBTTagCompound();
|
||||
}
|
||||
tagCompound.setInteger(BRUSH_COLOR_TAG, color);
|
||||
return tagCompound;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user