Fix multiple bar-related bugs
This commit is contained in:
@@ -9,17 +9,23 @@ object BridgeMixins {
|
||||
}
|
||||
|
||||
fun getStrNum0(): String {
|
||||
if (num0 != 0) {
|
||||
return num0.toString()
|
||||
}
|
||||
return "1"
|
||||
}
|
||||
fun getStrNum1(): String {
|
||||
if (num1 != 0) {
|
||||
val strNum1 = num1 + 20
|
||||
return strNum1.toString()
|
||||
}
|
||||
return "1"
|
||||
}
|
||||
|
||||
fun setNum0(number: Int) {
|
||||
num0 = number - 1
|
||||
num0 = number
|
||||
}
|
||||
fun setNum1(number: Int) {
|
||||
num1 = number - 1
|
||||
num1 = number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ class Bars {
|
||||
if (MinecraftClient.getInstance().networkHandler?.serverInfo?.address == "51.222.121.148:25599") {
|
||||
if (barsToggle) {
|
||||
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR_TEXTURE)
|
||||
buffer.vertex(positionMatrix, 240F, 460F, 0F).color(1f, 1f, 1f, 1f).texture(0f, 0f).next()
|
||||
buffer.vertex(positionMatrix, 240F, 500F, 0F).color(1f, 1f, 1f, 1f).texture(0f, 1f).next()
|
||||
buffer.vertex(positionMatrix, 280F, 500F, 0F).color(1f, 1f, 1f, 1f).texture(1f, 1f).next()
|
||||
buffer.vertex(positionMatrix, 280F, 460F, 0F).color(1f, 1f, 1f, 1f).texture(1f, 0f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-120, MinecraftClient.getInstance().window.scaledHeight.toFloat() - 40, 0F).color(1f, 1f, 1f, 1f).texture(0f, 0f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-120, MinecraftClient.getInstance().window.scaledHeight.toFloat(), 0F).color(1f, 1f, 1f, 1f).texture(0f, 1f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-80, MinecraftClient.getInstance().window.scaledHeight.toFloat(), 0F).color(1f, 1f, 1f, 1f).texture(1f, 1f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-80, MinecraftClient.getInstance().window.scaledHeight.toFloat() - 40, 0F).color(1f, 1f, 1f, 1f).texture(1f, 0f).next()
|
||||
|
||||
RenderSystem.setShader { GameRenderer.getPositionColorTexProgram() }
|
||||
|
||||
@@ -35,10 +35,10 @@ class Bars {
|
||||
tessellator.draw()
|
||||
|
||||
buffer.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR_TEXTURE)
|
||||
buffer.vertex(positionMatrix, 215F, 460F, 0F).color(1f, 1f, 1f, 1f).texture(0f, 0f).next()
|
||||
buffer.vertex(positionMatrix, 215F, 500F, 0F).color(1f, 1f, 1f, 1f).texture(0f, 1f).next()
|
||||
buffer.vertex(positionMatrix, 255F, 500F, 0F).color(1f, 1f, 1f, 1f).texture(1f, 1f).next()
|
||||
buffer.vertex(positionMatrix, 255F, 460F, 0F).color(1f, 1f, 1f, 1f).texture(1f, 0f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-140, MinecraftClient.getInstance().window.scaledHeight.toFloat() - 40, 0F).color(1f, 1f, 1f, 1f).texture(0f, 0f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-140, MinecraftClient.getInstance().window.scaledHeight.toFloat(), 0F).color(1f, 1f, 1f, 1f).texture(0f, 1f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-100, MinecraftClient.getInstance().window.scaledHeight.toFloat(), 0F).color(1f, 1f, 1f, 1f).texture(1f, 1f).next()
|
||||
buffer.vertex(positionMatrix, MinecraftClient.getInstance().window.scaledWidth.toFloat()/2-100, MinecraftClient.getInstance().window.scaledHeight.toFloat() - 40, 0F).color(1f, 1f, 1f, 1f).texture(1f, 0f).next()
|
||||
|
||||
RenderSystem.setShader { GameRenderer.getPositionColorTexProgram() }
|
||||
if (BridgeMixins.getNum0() < 10) {
|
||||
|
||||
@@ -18,7 +18,7 @@ class Watermark {
|
||||
MinecraftClient.getInstance().networkHandler?.serverInfo?.address == "minehut.com") {
|
||||
if (watermarkToggle) {
|
||||
val minecraftClient = MinecraftClient.getInstance()
|
||||
drawContext?.drawTextWithShadow(minecraftClient.textRenderer,"§nSciFy v0.1.3",minecraftClient.window.scaledWidth - minecraftClient.textRenderer.getWidth("SciFy v0.1.3") - 5, minecraftClient.window.scaledHeight - minecraftClient.textRenderer.fontHeight - 5, 0xff00ff)
|
||||
drawContext?.drawTextWithShadow(minecraftClient.textRenderer,"§nSciFy v0.1.4",minecraftClient.window.scaledWidth - minecraftClient.textRenderer.getWidth("SciFy v0.1.4") - 5, minecraftClient.window.scaledHeight - minecraftClient.textRenderer.fontHeight - 5, 0xff00ff)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user