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
18 changes: 7 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'net.fabricmc.fabric-loom-remap' version '1.14-SNAPSHOT'
id "net.fabricmc.fabric-loom" version "1.16-SNAPSHOT"
id 'java-library'
id 'maven-publish'
}
Expand Down Expand Up @@ -33,15 +33,11 @@ repositories {
}
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${project.parchment_minecraft_version}:${project.parchment_mappings_version}@zip")
}

modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
implementation "com.terraformersmc:modmenu:${project.modmenu_version}"

// modImplementation "io.github.ladysnake:satin:${satin_version}"
// include "io.github.ladysnake:satin:${satin_version}"
Expand Down Expand Up @@ -107,7 +103,7 @@ processResources {
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 21
it.options.release = 25
}

java {
Expand All @@ -116,8 +112,8 @@ java {
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}

jar {
Expand Down
15 changes: 7 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/develop/
minecraft_version=1.21.11
parchment_minecraft_version=1.21.11
parchment_mappings_version=2025.12.20
loader_version=0.18.4
minecraft_version=26.1.2
loader_version=0.19.2
fabric_version=0.146.1+26.1.2

# Mod Properties
mod_version=1.15+mc1.21.11
mod_version=1.15+mc26.1.2
maven_group=me.juancarloscp52
archives_base_name=Entropy
# Dependencies
fabric_version=0.141.1+1.21.11

modmenu_version=17.0.0-beta.1
# Dependencies
modmenu_version=18.0.0-alpha.8
pircbotx_version=2.3.1
slf4j_version=1.7.36
jda_version=5.6.1
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#Fri Apr 24 20:12:10 EEST 2026
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import me.juancarloscp52.entropy.events.Event;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -91,7 +91,7 @@ public void tick(short eventCountDown) {
}
}

public void render(GuiGraphics drawContext, DeltaTracker tickCounter) {
public void render(GuiGraphicsExtractor drawContext, DeltaTracker tickCounter) {
// Render active event effects
currentEvents.forEach(event -> {
if (!event.hasEnded() && !client.player.isSpectator())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.juancarloscp52.entropy.client;

import me.juancarloscp52.entropy.server.ConstantColorDustParticleOptions;
import net.fabricmc.fabric.api.client.particle.v1.FabricSpriteProvider;
import net.fabricmc.fabric.api.client.particle.v1.FabricSpriteSet;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.DustParticleBase;
import net.minecraft.client.particle.Particle;
Expand All @@ -25,7 +25,7 @@ protected float randomizeColor(float colorComponent, float multiplier) {
public static class Factory implements ParticleProvider<ConstantColorDustParticleOptions> {
private final SpriteSet spriteProvider;

public Factory(FabricSpriteProvider spriteProvider) {
public Factory(FabricSpriteSet spriteProvider) {
this.spriteProvider = spriteProvider;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import me.juancarloscp52.entropy.events.Event;
import me.juancarloscp52.entropy.events.EventType;
import me.juancarloscp52.entropy.mixin.FogRendererAccessor;
import me.juancarloscp52.entropy.mixin.GameRendererAccessor;
import me.juancarloscp52.entropy.networking.ClientboundJoinSync;
import me.juancarloscp52.entropy.networking.NetworkingConstants;
import me.juancarloscp52.entropy.networking.ServerboundJoinHandshake;
Expand All @@ -36,7 +35,7 @@
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
import net.fabricmc.fabric.api.client.particle.v1.ParticleProviderRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;
import net.fabricmc.loader.api.FabricLoader;
import net.fabricmc.loader.api.ModContainer;
Expand Down Expand Up @@ -170,15 +169,14 @@ public void onInitializeClient() {
});

ClientLifecycleEvents.CLIENT_STARTED.register(client -> {
GameRendererAccessor gameRenderer = (GameRendererAccessor) client.gameRenderer;
List<FogEnvironment> fogEnvironments = ((FogRendererAccessor) gameRenderer.getFogRenderer()).getFogEnvironments();
List<FogEnvironment> fogEnvironments = FogRendererAccessor.getFogEnvironments();
fogEnvironments.addFirst(new HerobrineFogEnvironment());
fogEnvironments.add(1, new RainbowFogEnvironment());
});

//Registry.registerReference()
Registry.register(BuiltInRegistries.SOUND_EVENT, herobrineAmbienceID, herobrineAmbience);
ParticleFactoryRegistry.getInstance().register(Entropy.CONSTANT_COLOR_DUST, ConstantColorDustParticle.Factory::new);
ParticleProviderRegistry.getInstance().register(Entropy.CONSTANT_COLOR_DUST, ConstantColorDustParticle.Factory::new);
}

public void loadSettings() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.juancarloscp52.entropy.client;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.renderer.RenderPipelines;
import net.minecraft.resources.Identifier;

public class EntropyClientUtils {
public static void renderOverlay(GuiGraphics guiGraphics, Identifier texture, int color) {
public static void renderOverlay(GuiGraphicsExtractor guiGraphics, Identifier texture, int color) {
guiGraphics.blit(
RenderPipelines.GUI_TEXTURED,
texture,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import me.juancarloscp52.entropy.EntropySettings.VotingMode;
import me.juancarloscp52.entropy.client.EntropyClient;
import me.juancarloscp52.entropy.client.Screens.Widgets.EntropySliderWidget;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.components.AbstractSliderButton;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.CycleButton;
Expand Down Expand Up @@ -93,15 +93,15 @@ protected void init() {
this.addRenderableWidget(done);
}

public void render(GuiGraphics drawContext, int mouseX, int mouseY, float delta) {
super.render(drawContext, mouseX, mouseY, delta);
public void extractRenderState(GuiGraphicsExtractor drawContext, int mouseX, int mouseY, float delta) {
super.extractRenderState(drawContext, mouseX, mouseY, delta);

drawLogo(drawContext);
Component title = Component.translatable("entropy.options.title");
drawContext.drawString(this.font, title, this.width / 2 - font.width(title)/2, 10, CommonColors.WHITE);
drawContext.text(this.font, title, this.width / 2 - font.width(title)/2, 10, CommonColors.WHITE);
}

public static void drawLogo(final GuiGraphics drawContext) {
public static void drawLogo(final GuiGraphicsExtractor drawContext) {
Matrix3x2fStack matrices = drawContext.pose();
matrices.pushMatrix();
matrices.scale(0.2f, 0.2f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import me.juancarloscp52.entropy.client.EntropyClient;
import me.juancarloscp52.entropy.events.Event;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.screens.WinScreen;

public class EntropyCreditsScreen extends WinScreen {
Expand All @@ -36,8 +36,8 @@ public boolean shouldCloseOnEsc() {
}

@Override
public void render(GuiGraphics drawContext, int mouseX, int mouseY, float delta) {
super.render(drawContext, mouseX, mouseY, delta);
public void extractRenderState(GuiGraphicsExtractor drawContext, int mouseX, int mouseY, float delta) {
super.extractRenderState(drawContext, mouseX, mouseY, delta);
EntropyClient.getInstance().clientEventHandler.render(drawContext, minecraft.getDeltaTracker());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package me.juancarloscp52.entropy.client.Screens;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.CommonComponents;
Expand Down Expand Up @@ -46,12 +46,12 @@ protected void init() {
}

@Override
public void render(GuiGraphics drawContext, int mouseX, int mouseY, float delta) {
super.render(drawContext, mouseX, mouseY, delta);
public void extractRenderState(GuiGraphicsExtractor drawContext, int mouseX, int mouseY, float delta) {
super.extractRenderState(drawContext, mouseX, mouseY, delta);
List<FormattedCharSequence> lines = font.split(message, this.width / 2);
for (int i = 0; i < lines.size(); i++) {
FormattedCharSequence line = lines.get(i);
drawContext.drawString(font, line, this.width / 4, this.height / 2 - (lines.size() * 9 / 2) + i * 9, CommonColors.WHITE);
drawContext.text(font, line, this.width / 4, this.height / 2 - (lines.size() * 9 / 2) + i * 9, CommonColors.WHITE);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import me.juancarloscp52.entropy.client.Screens.Widgets.EntropyEventListWidget;
import me.juancarloscp52.entropy.client.Screens.Widgets.EntropyEventListWidget.FilterMode;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.CycleButton;
import net.minecraft.client.gui.components.EditBox;
Expand Down Expand Up @@ -80,9 +80,9 @@ protected void init() {
}

@Override
public void render(GuiGraphics drawContext, int mouseX, int mouseY, float delta) {
super.render(drawContext, mouseX, mouseY, delta);
drawContext.drawString(font, this.title, this.width / 2 - font.width(this.title) / 2, 12, 0xFFE0E0E0);
public void extractRenderState(GuiGraphicsExtractor drawContext, int mouseX, int mouseY, float delta) {
super.extractRenderState(drawContext, mouseX, mouseY, delta);
drawContext.text(font, this.title, this.width / 2 - font.width(this.title) / 2, 12, 0xFFE0E0E0);
EntropyConfigurationScreen.drawLogo(drawContext);
}

Expand Down Expand Up @@ -125,4 +125,4 @@ private void onUncheckAll() {
public void onClose() {
this.minecraft.setScreen(this.parent);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected void init() {

public void repositionElements() {
if (tabNavigationBar != null) {
tabNavigationBar.setWidth(width);
tabNavigationBar.updateWidth(width);
tabNavigationBar.arrangeElements();
final int bottom = tabNavigationBar.getRectangle().bottom();
ScreenRectangle screenRectangle = new ScreenRectangle(0, bottom, width, height - layout.getFooterHeight() - bottom);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import net.fabricmc.api.Environment;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.components.Checkbox;
import net.minecraft.client.gui.components.ContainerObjectSelectionList;
import net.minecraft.client.gui.components.Tooltip;
Expand Down Expand Up @@ -124,9 +124,9 @@ private static boolean isEventDisabledInSettings(Holder.Reference<EventType<?>>
}

@Override
public void renderContent(GuiGraphics drawContext, int mouseX, int mouseY, boolean isHovering, float tickDelta) {
public void extractContent(GuiGraphicsExtractor drawContext, int mouseX, int mouseY, boolean isHovering, float tickDelta) {
checkbox.setPosition(getX() + 32, getY());
checkbox.render(drawContext, mouseX, mouseY, tickDelta);
checkbox.extractContents(drawContext, mouseX, mouseY, tickDelta);

if(!eventInfo.typeReference.value().isEnabled()) {
drawContext.blitSprite(RenderPipelines.GUI_TEXTURED, ICON_OVERLAY_LOCATION, getX(), getY() - 6, 32, 32);
Expand Down Expand Up @@ -175,4 +175,4 @@ public boolean allowsVisibility(ButtonEntry buttonEntry) {
}

public record EventInfo(String name, Holder.Reference<EventType<?>> typeReference) {}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package me.juancarloscp52.entropy.client.UIStyles;

import me.juancarloscp52.entropy.client.VotingClient;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.util.ARGB;
import net.minecraft.util.Mth;

Expand All @@ -13,7 +13,7 @@ public GTAVUIRenderer(VotingClient votingClient) {
}

@Override
public void renderTimer(GuiGraphics drawContext, int width, double time, double timerDuration) {
public void renderTimer(GuiGraphicsExtractor drawContext, int width, double time, double timerDuration) {
drawContext.fill(0, 0, width, 10, 150 << 24);
drawContext.fill(0, 0, Mth.floor(width * (time / timerDuration)), 10, (this.votingClient != null ? votingClient.getColor(255) : ARGB.color(255,70,150,70)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@

import me.juancarloscp52.entropy.mixin.BossHealthOverlayAccessor;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.components.LerpingBossEvent;
import net.minecraft.network.chat.Component;
import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource;
import net.minecraft.world.BossEvent;
import java.util.UUID;

public class MinecraftUIRenderer implements UIRenderer {
private final LerpingBossEvent bar;

public MinecraftUIRenderer() {
UUID uuid = Mth.createInsecureUUID();
UUID uuid = Mth.createInsecureUUID(RandomSource.create());
this.bar=new LerpingBossEvent(uuid,Component.translatable("entropy.title"), 0, BossEvent.BossBarColor.GREEN, BossEvent.BossBarOverlay.NOTCHED_20,false,false, false);
((BossHealthOverlayAccessor) Minecraft.getInstance().gui.getBossOverlay()).getEvents().put(uuid,bar);
}

@Override
public void renderTimer(GuiGraphics drawContext, int width, double time, double timerDuration) {
public void renderTimer(GuiGraphicsExtractor drawContext, int width, double time, double timerDuration) {

this.bar.setProgress((float)(time / timerDuration));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.juancarloscp52.entropy.client.UIStyles;

import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.GuiGraphicsExtractor;

public interface UIRenderer {
public void renderTimer(GuiGraphics drawContext, int width, double time, double timerDuration);
void renderTimer(GuiGraphicsExtractor drawContext, int width, double time, double timerDuration);
// TODO renderPoll and renderEventQueue
}

Expand Down
Loading