Skip to content

Commit

Permalink
v1.7.9-unstable.19w34a - Ported to 19w34a
Browse files Browse the repository at this point in the history
  • Loading branch information
Prospector committed Aug 23, 2019
1 parent 5a577d3 commit c4560e7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
org.gradle.jvmargs=-Xmx1G

mod_version=1.7.9
mod_version=1.7.9-unstable.19w34a
maven_group=io.github.prospector
archive_name=modmenu

minecraft_version=1.14.4
yarn_mappings=1.14.4+build.2
loader_version=0.4.8+build.157
fabric_version=0.3.0+build.200
minecraft_version=19w34a
yarn_mappings=19w34a+build.6
loader_version=0.4.8+build.159
fabric_version=0.3.1+build.208

fabric_modules=fabric-resource-loader-v0:0.1.1+7495ea2842
fabric_modules=fabric-resource-loader-v0:0.1.2+232e294c42
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.prospector.modmenu.gui;

import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.prospector.modmenu.ModMenu;
import io.github.prospector.modmenu.util.BadgeRenderer;
import io.github.prospector.modmenu.util.FabricHardcodedBsUtil;
Expand Down Expand Up @@ -45,11 +45,11 @@ public ModListEntry(ModContainer container, ModListWidget list) {
public void render(int index, int y, int x, int rowWidth, int rowHeight, int mouseX, int mouseY, boolean isSelected, float delta) {
x += getXOffset();
rowWidth -= getXOffset();
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindIconTexture();
GlStateManager.enableBlend();
RenderSystem.enableBlend();
DrawableHelper.blit(x, y, 0.0F, 0.0F, 32, 32, 32, 32);
GlStateManager.disableBlend();
RenderSystem.disableBlend();
String name = FabricHardcodedBsUtil.formatFabricModuleName(metadata.getName());
String trimmedName = name;
int maxNameWidth = rowWidth - 32 - 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.prospector.modmenu.ModMenu;
import io.github.prospector.modmenu.config.ModMenuConfigManager;
import io.github.prospector.modmenu.util.BadgeRenderer;
Expand Down Expand Up @@ -113,7 +113,7 @@ public void render(int mouseX, int mouseY, float delta) {

@Override
public void renderButton(int int_1, int int_2, float float_1) {
GlStateManager.color4f(1, 1, 1, 1f);
RenderSystem.color4f(1, 1, 1, 1f);
super.renderButton(int_1, int_2, float_1);
}
};
Expand Down Expand Up @@ -236,7 +236,7 @@ public void render(int mouseX, int mouseY, float delta) {
}
this.modList.render(mouseX, mouseY, delta);
this.searchBox.render(mouseX, mouseY, delta);
GlStateManager.disableBlend();
RenderSystem.disableBlend();
this.drawCenteredString(this.font, this.textTitle, this.modList.getWidth() / 2, 8, 16777215);
super.render(mouseX, mouseY, delta);
if (showModCount || !filterOptionsShown) {
Expand All @@ -245,11 +245,11 @@ public void render(int mouseX, int mouseY, float delta) {
if (selectedEntry != null) {
ModMetadata metadata = selectedEntry.getMetadata();
int x = rightPaneX;
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.selected.bindIconTexture();
GlStateManager.enableBlend();
RenderSystem.enableBlend();
blit(x, paneY, 0.0F, 0.0F, 32, 32, 32, 32);
GlStateManager.disableBlend();
RenderSystem.disableBlend();
int lineSpacing = font.fontHeight + 1;
int imageOffset = 36;
String name = metadata.getName();
Expand Down Expand Up @@ -291,7 +291,7 @@ public static void overlayBackground(int x1, int y1, int x2, int y2, int red, in
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBufferBuilder();
Objects.requireNonNull(MinecraftClient.getInstance()).getTextureManager().bindTexture(DrawableHelper.BACKGROUND_LOCATION);
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
buffer.begin(7, VertexFormats.POSITION_UV_COLOR);
buffer.vertex(x1, y2, 0.0D).texture(x1 / 32.0D, y2 / 32.0D).color(red, green, blue, endAlpha).next();
buffer.vertex(x2, y2, 0.0D).texture(x2 / 32.0D, y2 / 32.0D).color(red, green, blue, endAlpha).next();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.prospector.modmenu.gui;

import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.prospector.modmenu.ModMenu;
import io.github.prospector.modmenu.config.ModMenuConfigManager;
import io.github.prospector.modmenu.gui.entries.ChildEntry;
Expand Down Expand Up @@ -218,23 +218,23 @@ protected void renderList(int x, int y, int mouseX, int mouseY, float delta) {
if (this.renderSelection && this.isSelectedItem(index)) {
entryLeft = getRowLeft() - 2 + entry.getXOffset();
int selectionRight = x + rowWidth + 2;
GlStateManager.disableTexture();
RenderSystem.disableTexture();
float float_2 = this.isFocused() ? 1.0F : 0.5F;
GlStateManager.color4f(float_2, float_2, float_2, 1.0F);
RenderSystem.color4f(float_2, float_2, float_2, 1.0F);
buffer.begin(7, VertexFormats.POSITION);
buffer.vertex((double) entryLeft, (double) (entryTop + entryHeight + 2), 0.0D).next();
buffer.vertex((double) selectionRight, (double) (entryTop + entryHeight + 2), 0.0D).next();
buffer.vertex((double) selectionRight, (double) (entryTop - 2), 0.0D).next();
buffer.vertex((double) entryLeft, (double) (entryTop - 2), 0.0D).next();
tessellator_1.draw();
GlStateManager.color4f(0.0F, 0.0F, 0.0F, 1.0F);
RenderSystem.color4f(0.0F, 0.0F, 0.0F, 1.0F);
buffer.begin(7, VertexFormats.POSITION);
buffer.vertex((double) (entryLeft + 1), (double) (entryTop + entryHeight + 1), 0.0D).next();
buffer.vertex((double) (selectionRight - 1), (double) (entryTop + entryHeight + 1), 0.0D).next();
buffer.vertex((double) (selectionRight - 1), (double) (entryTop - 1), 0.0D).next();
buffer.vertex((double) (entryLeft + 1), (double) (entryTop - 1), 0.0D).next();
tessellator_1.draw();
GlStateManager.enableTexture();
RenderSystem.enableTexture();
}

entryLeft = this.getRowLeft();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.prospector.modmenu.gui;

import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.util.Identifier;
Expand Down Expand Up @@ -38,8 +38,8 @@ protected void setPos(int x, int y) {
public void renderButton(int mouseX, int mouseY, float delta) {
MinecraftClient client = MinecraftClient.getInstance();
client.getTextureManager().bindTexture(this.texture);
GlStateManager.color4f(1, 1, 1, 1f);
GlStateManager.disableDepthTest();
RenderSystem.color4f(1, 1, 1, 1f);
RenderSystem.disableDepthTest();
int adjustedV = this.v;
if (!active) {
adjustedV += this.height * 2;
Expand All @@ -48,6 +48,6 @@ public void renderButton(int mouseX, int mouseY, float delta) {
}

blit(this.x, this.y, this.u, adjustedV, this.width, this.height, this.uWidth, this.vHeight);
GlStateManager.enableDepthTest();
RenderSystem.enableDepthTest();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.prospector.modmenu.gui.entries;

import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import io.github.prospector.modmenu.ModMenu;
import io.github.prospector.modmenu.gui.ModListEntry;
import io.github.prospector.modmenu.gui.ModListWidget;
Expand Down Expand Up @@ -54,7 +54,7 @@ public void render(int index, int y, int x, int rowWidth, int rowHeight, int mou
this.client.getTextureManager().bindTexture(PARENT_MOD_TEXTURE);
int xOffset = list.getParent().showModChildren.contains(getMetadata().getId()) ? 32 : 0;
int yOffset = hoveringIcon ? 32 : 0;
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
DrawableHelper.blit(x, y, xOffset, yOffset, 32 + xOffset, 32 + yOffset, 256, 256);
}
}
Expand Down

0 comments on commit c4560e7

Please sign in to comment.