Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jun 18, 2024
1 parent 3998b7f commit 2326765
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ class ResourcePack: HudConfig("Resource Pack", "evergreenhud/resourcepack.json",
@SubscribeEvent
fun onEntityJoin(e: EntityJoinWorldEvent) {
if (e.entity.equals(mc.thePlayer)) {
pack = getPack()
pack = getResourcePack()
}
}

@SubscribeEvent
fun onPackChange(e: TextureStitchEvent.Post) {
pack = getPack()
pack = getResourcePack()
}

@Switch(name = "Ignore Overlay Pack", description = "Use only the first pack applied in the resource pack list.")
Expand All @@ -67,7 +67,7 @@ class ResourcePack: HudConfig("Resource Pack", "evergreenhud/resourcepack.json",
var iconPadding = 5

@Exclude
var pack: ResourcePackRepository.Entry? = getPack()
var pack: ResourcePackRepository.Entry? = getResourcePack()

@Exclude
val defaultIcon = mc.textureManager.getDynamicTextureLocation("texturepackicon", DynamicTexture(mc.resourcePackRepository.rprDefaultResourcePack.packImage))
Expand All @@ -92,7 +92,7 @@ class ResourcePack: HudConfig("Resource Pack", "evergreenhud/resourcepack.json",

override fun getHeight(scale: Float, example: Boolean): Float = iconSize * scale

fun getPack(): ResourcePackRepository.Entry? {
fun getResourcePack(): ResourcePackRepository.Entry? {
return mc.resourcePackRepository.repositoryEntries.getOrNull(if (ignoreOverlay) 0 else mc.resourcePackRepository.repositoryEntries.size - 1)
}

Expand Down

0 comments on commit 2326765

Please sign in to comment.