Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.4 #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ea
Voxxin committed Feb 20, 2024
commit d658c8db6e8f41e5155f2d65590bfc0100df6328
6 changes: 1 addition & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -8,11 +8,7 @@ yarn_mappings=1.20.4+build.3
loader_version=0.15.1

# Mod Properties
<<<<<<< Updated upstream
mod_version=2.2.0
=======
mod_version=2.2.0-1.20.4
>>>>>>> Stashed changes
mod_version=2.2.1-1.20.4
maven_group=com.github.voxxin.cape_cacher
archives_base_name=cape_cacher

Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
import com.google.gson.reflect.TypeToken;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.util.math.ColorHelper;
import org.apache.logging.log4j.Level;

import java.io.File;
import java.io.FileNotFoundException;
@@ -156,8 +157,12 @@ public static void exportCapeConfig() {
}

private static void setupCapeConfig() {
CapeCacher.LOGGER.log(Level.ERROR, "Empty! -- At Startup");
CapeCacher.LOGGER.log(Level.INFO, "Size of capesJsonObject: " + StaticValues.capesJsonObject.size());

for (JsonElement capeObj : StaticValues.capesJsonObject) {
JsonObject cape = capeObj.getAsJsonObject();

String capeName = cape.get("title").getAsString();
String capeURL = cape.get("url").getAsString();
String capeType = cape.get("type").getAsString();
@@ -174,7 +179,7 @@ private static void setupCapeConfig() {
ArrayList<String> capeAlts = new ArrayList<>();

JsonObject capeObject = new JsonObject();
capeObject.addProperty("name", capeName);
capeObject.addProperty("title", capeName);
capeObject.addProperty("url", capeURL);
capeObject.addProperty("type", capeType);
capeObject.addProperty("colour", capeColour);
@@ -195,6 +200,7 @@ private static void setupCapeConfig() {
capeObject.add("alts", altsArray);

StaticValues.settingCapes.add(gson.fromJson(capeObject, CapesObject.class));
CapeCacher.LOGGER.log(Level.INFO, gson.fromJson(capeObject, CapesObject.class).title);
}

exportCapeConfig();
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ public CapesObject(@NotNull String URL, @NotNull String type, int colour, @NotNu
}

public CapeSettingsB getSettingB(String key) {
if (settingsB.containsKey(key)) return settingsB.get(key);
if (settingsB != null && settingsB.containsKey(key)) return settingsB.get(key);
else return new CapeSettingsB(true, key);
}

Original file line number Diff line number Diff line change
@@ -65,29 +65,6 @@ protected void renderWidget(DrawContext context, int mouseX, int mouseY, float d
context.drawTextWithShadow(CapeCacher.client().textRenderer, title.getString(), this.pos[0] + sizeX + 10, this.pos[1] - sizeY / 2, 0xFFFFFF);
}

// @Override
// public void renderButton(DrawContext context, int mouseX, int mouseY, float delta) {
// int sizeX = this.size[0] / 2;
// int sizeY = this.size[1] / 2;
// boolean overlaying = WidgetUtil.overlaying(mouseX, mouseY, this.pos[0] - sizeX, this.pos[1] - sizeY, this.pos[0] + sizeX, this.pos[1] + sizeY);
//
// if (KEYBOARD_MANAGER.isMouseKey(GLFW.GLFW_MOUSE_BUTTON_LEFT)
// && overlaying) {
// clicked();
// }
//
// if (this.buttonOptionType != null) {
// if (!overlaying) {
// context.drawTexture(this.texture, this.pos[0] - sizeX, this.pos[1] - sizeY, 0, 0, 20, 20, 20, 20);
// } else {
// context.drawTexture(this.overlayTexture, this.pos[0] - sizeX, this.pos[1] - sizeY, 0, 0, 20, 20, 20, 20);
// }
// }
//
// // Text
// context.drawTextWithShadow(CapeCacher.client().textRenderer, title.getString(), this.pos[0] + sizeX + 10, this.pos[1] - sizeY / 2, 0xFFFFFF);
// }

@Override
protected void appendClickableNarrations(NarrationMessageBuilder builder) {
}