Skip to content

Commit

Permalink
1.2.1 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brainage04 committed Jan 24, 2024
1 parent 5c145e6 commit e2db889
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx2g
baseGroup = com.github.brainage04.togglesprint
mcVersion = 1.8.9
modid = togglesprint
version = 1.2.0
version = 1.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ object EquipmentTracker {
}
}

else -> currentLine += equipmentList[i].item.getItemStackDisplayName(equipmentList[i]) // name (1)
else -> { // name (1)
currentLine += if (equipmentList[i].hasDisplayName()) equipmentList[i].displayName.trim()
else equipmentList[i].item.getItemStackDisplayName(equipmentList[i]).trim()
}
}

if (equipmentList[i].isItemStackDamageable) { // if item has durability:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ object PlayerRotationTracker {
private val guiElements get() = ToggleSprintMain.config.guiElements

private fun formatYaw(yaw: Float): String {
val positiveYaw = (((yaw + 180) % 360) - 180).round(guiElements.rotationTracker.decimals)
val negativeYaw = (((yaw - 180) % 360) + 180).round(guiElements.rotationTracker.decimals)
val positiveYaw = (((yaw + 180.0f) % 360.0f) - 180.0f).round(guiElements.rotationTracker.decimals)
val negativeYaw = (((yaw - 180.0f) % 360.0f) + 180.0f).round(guiElements.rotationTracker.decimals)

var returnString: String = if (yaw > 0.0) {
var returnString = if (yaw > 0.0f) {
"${GUIUtils.primaryChars}Yaw: $positiveYaw"
} else {
"${GUIUtils.primaryChars}Yaw: $negativeYaw"
}

if (guiElements.rotationTracker.showTrueYaw && !(yaw == positiveYaw || yaw == negativeYaw)) {
if (guiElements.rotationTracker.showTrueYaw && !(yaw > -180.0f && yaw < 180.0f)) {
returnString += " (${yaw.round(guiElements.rotationTracker.decimals)})"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class TPSTracker {
private var ignoreFirstTicks = waitAfterWorldSwitch
private var hasPacketReceived = false

/*
init {
fixedRateTimer(name = "brainage04-togglesprint-tps-counter-seconds", period = 1_000L) {
if (!guiElements.tpsTracker.coreSettings.isEnabled) return@fixedRateTimer
Expand Down Expand Up @@ -83,6 +84,7 @@ class TPSTracker {
}
}
}
*/

@SubscribeEvent
fun onWorldChange(event: Event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RenderGuiData {
foodTracker()
realTimeTracker()
pingTracker()
tpsTracker()
//tpsTracker()
entityTracker()

GlStateManager.popMatrix()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object FoodTracker {
"${GUIUtils.secondaryChars}Food:"
)

textArray.addAll(trackInventoryItems(itemList))
textArray.addAll(trackInventoryItems(itemList, guiElements.foodTracker.includeArrays))

if (textArray.size < 2) textArray[0] += "${ChatUtils.redChar} N/A"

Expand Down

0 comments on commit e2db889

Please sign in to comment.