diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-12 15:27:11 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-12 15:27:11 +0100 |
commit | a4712d5570d2fe6e95c923ac8a125f45d053856f (patch) | |
tree | 8cfdfa8fa256d61a160a34b0e5d500b599a27d4d /src/main/java/at/hannibal2 | |
parent | bf8eb0c6fecbe1a12766fc1bdf52a10f5f5674f4 (diff) | |
download | skyhanni-a4712d5570d2fe6e95c923ac8a125f45d053856f.tar.gz skyhanni-a4712d5570d2fe6e95c923ac8a125f45d053856f.tar.bz2 skyhanni-a4712d5570d2fe6e95c923ac8a125f45d053856f.zip |
Added support for `item cost in garden NPC` from NotEnoughUpdates.
Made Visitor Price in the visitor gui default disabled since this exist already in NEU.
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Garden.java | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java index f826ef313..9abeab19d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Garden.java @@ -85,10 +85,10 @@ public class Garden { public boolean visitorInventory = false; @Expose - @ConfigOption(name = "Visitor Price", desc = "Show the bazaar price of the items required for the visitors.") + @ConfigOption(name = "Visitor Price", desc = "Show the bazaar price of the items required for the visitors. (Like in NEU)") @ConfigEditorBoolean @ConfigAccordionId(id = 4) - public boolean visitorShowPrice = true; + public boolean visitorShowPrice = false; @Expose @ConfigOption(name = "Amount and Time", desc = "Show the exact item amount and the remaining time when farmed manually. Especially useful for ironman.") diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt index 63dc2dd1c..a7bee0a59 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenVisitorFeatures.kt @@ -16,6 +16,7 @@ import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand import net.minecraft.network.play.client.C02PacketUseEntity import net.minecraftforge.event.entity.player.ItemTooltipEvent +import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent import java.util.* @@ -122,7 +123,7 @@ class GardenVisitorFeatures { return newDisplay } - @SubscribeEvent + @SubscribeEvent(priority = EventPriority.HIGH) fun onTooltip(event: ItemTooltipEvent) { if (!GardenAPI.inGarden()) return if (!inVisitorInventory) return @@ -164,9 +165,9 @@ class GardenVisitorFeatures { e.printStackTrace() return } + val price = NEUItems.getPrice(internalName) * amount + totalPrice += price if (config.visitorShowPrice) { - val price = NEUItems.getPrice(internalName) * amount - totalPrice += price val format = NumberUtil.format(price) list[i+ itemsWithSpeedCounter] = "$line §7(§6$format§7)" } |