mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 05:35:38 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
ef276b8145
5 files changed
+32
-34
No files matched your search
@@ -15,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import noppes.npcs.client.ClientProxy;
|
||||
import noppes.npcs.client.gui.player.GuiAuctionInterface;
|
||||
import noppes.npcs.controllers.MagicController;
|
||||
import noppes.npcs.controllers.data.Magic;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -230,12 +231,12 @@ public class AttributeItemUtil {
|
||||
* Returns the item tooltip.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static List<String> getToolTip(List<String> original, NBTTagCompound compound) {
|
||||
public static List<String> getToolTip(List<String> original, NBTTagCompound compound, boolean override) {
|
||||
List<String> tooltip = new ArrayList<>(original);
|
||||
// Get the RPGCore compound and then the Attributes compound.
|
||||
NBTTagCompound rpgCore = compound.hasKey(TAG_RPGCORE) ? compound.getCompoundTag(TAG_RPGCORE) : new NBTTagCompound();
|
||||
NBTTagCompound attrTag = rpgCore.hasKey(TAG_ATTRIBUTES) ? rpgCore.getCompoundTag(TAG_ATTRIBUTES) : new NBTTagCompound();
|
||||
if (Keyboard.isKeyDown(ClientProxy.NPCButton.getKeyCode())) {
|
||||
if (Keyboard.isKeyDown(ClientProxy.NPCButton.getKeyCode()) || override) {
|
||||
List<String> newTooltips = new ArrayList<>();
|
||||
if (!tooltip.isEmpty()) {
|
||||
newTooltips.add(tooltip.get(0));
|
||||
|
||||
Reference in new issue
Block a user