Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 21 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'fabric-loom' version '1.1.9'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

Expand All @@ -30,31 +26,35 @@ dependencies {
compileOnly 'com.google.code.findbugs:jsr305:+'
}

base {
archivesName = project.archives_base_name
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
}

// from(sourceSets.main.resources.srcDirs) {
// exclude "fabric.mod.json"
// }
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
it.options.encoding = "UTF-8"
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jar {
Expand All @@ -74,10 +74,4 @@ publishing {
}
}
}

// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
}
}
}
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.13
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
loader_version=0.14.19


# Mod Properties
mod_version = 1.2.6
mod_version = 1.2.7
maven_group = net.entityoutliner
archives_base_name = entity-outliner



# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.73.0+1.19.3
modmenu_version=5.0.2
fabric_version=0.78.0+1.19.4
modmenu_version=6.2.0
7 changes: 0 additions & 7 deletions src/main/java/net/entityoutliner/ui/ColorWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

import java.util.Map;

import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
import net.minecraft.client.gui.widget.PressableWidget;
import net.minecraft.client.util.math.MatrixStack;
Expand Down Expand Up @@ -44,15 +41,11 @@ public void onPress() {
}

public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) {
MinecraftClient minecraftClient = MinecraftClient.getInstance();
RenderSystem.setShaderTexture(0, TEXTURE);
RenderSystem.enableDepthTest();
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA);
drawTexture(matrices, this.getX(), this.getY(), this.isFocused() ? 20.0F : 0.0F, this.color.ordinal() * 20, 20, 20, 40, 180);
this.renderBackground(matrices, minecraftClient, mouseX, mouseY);
}

public enum Color {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/entityoutliner/ui/EntityListWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.fabricmc.api.Environment;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.Selectable;
import net.minecraft.client.gui.widget.CheckboxWidget;
Expand Down Expand Up @@ -152,7 +151,7 @@ public static EntityListWidget.HeaderEntry create(SpawnGroup category, TextRende
}

public void render(MatrixStack matrices, int i, int j, int k, int l, int m, int n, int o, boolean bl, float f) {
DrawableHelper.drawCenteredText(matrices, this.font, this.title, this.width / 2, j + (this.height / 2) - (this.font.fontHeight / 2), 16777215);
drawCenteredTextWithShadow(matrices, this.font, this.title, this.width / 2, j + (this.height / 2) - (this.font.fontHeight / 2), 16777215);
}

public List<? extends Element> children() {
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/entityoutliner/ui/EntitySelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {

// Render our search bar
this.setFocused(this.searchField);
this.searchField.setTextFieldFocused(true);
this.searchField.render(matrices, mouseX, mouseY, delta);

// Render buttons
Expand Down
9 changes: 4 additions & 5 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@
],

"depends": {
"fabricloader": ">=0.7.4",
"fabric": "*",
"fabric-lifecycle-events-v1": "*",
"fabric-key-binding-api-v1": "*",
"minecraft": ">=1.19"
"fabricloader": ">=0.14.17",
"fabric-api": "*",
"minecraft": "~1.19.4",
"java": ">=17"
},
"suggests": {
"flamingo": "*"
Expand Down