Skip to content

Commit

Permalink
feat: update to 1.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalam360 committed Oct 24, 2024
1 parent 35edc8b commit dc26d21
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.components.Tooltip;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.resources.ResourceLocation;
Expand All @@ -28,6 +29,6 @@ protected void renderWidget(GuiGraphics guiGraphics, int i, int j, float f) {
int x = this.getX() + (this.width - this.textureWidth) / 2;
int y = this.getY() + (this.height - this.textureHeight) / 2;

guiGraphics.blit(this.texture, x, y, this.textureWidth, this.textureHeight, 0.0F, 0.0F, this.textureWidth, this.textureHeight, this.textureWidth, this.textureHeight);
guiGraphics.blit(RenderType::guiTextured, this.texture, x, y, this.textureWidth, this.textureHeight, this.textureWidth, this.textureHeight, this.textureWidth, this.textureHeight);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import net.minecraft.client.gui.navigation.CommonInputs;
import net.minecraft.client.gui.navigation.FocusNavigationEvent;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.resources.language.I18n;
import net.minecraft.client.sounds.SoundManager;
import net.minecraft.network.chat.CommonComponents;
Expand Down Expand Up @@ -194,7 +195,7 @@ public void setTexture(ResourceLocation texture) {

@Override
public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float delta) {
graphics.blit(this.texture, this.getX(), this.getY(), this.getWidth(), this.getHeight(), 0.0F, 0.0F, this.getWidth(), this.getHeight(), this.getWidth(), this.getHeight());
graphics.blit(RenderType::guiTextured, this.texture, this.getX(), this.getY(), this.getWidth(), this.getHeight(), this.getWidth(), this.getHeight(), this.getWidth(), this.getHeight());
}

@Override
Expand Down Expand Up @@ -266,15 +267,13 @@ public void updateWidgetNarration(NarrationElementOutput narrationElementOutput)

public void renderWidget(GuiGraphics guiGraphics, int i, int j, float f) {
Minecraft minecraft = Minecraft.getInstance();
guiGraphics.setColor(1.0F, 1.0F, 1.0F, this.alpha);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.enableDepthTest();
guiGraphics.blitSprite(this.getSprite(), this.getX(), this.getY(), this.getWidth(), this.getHeight());
guiGraphics.blitSprite(RenderType::guiTextured, this.getSprite(), this.getX(), this.getY(), this.getWidth(), this.getHeight());
double position = (this.value) / (this.max - this.min);
double handleX = this.getX() + position * (this.getWidth() - 8);
guiGraphics.blitSprite(this.getHandleSprite(), (int) handleX, this.getY(), 8, this.getHeight());
guiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F);
guiGraphics.blitSprite(RenderType::guiTextured, this.getHandleSprite(), (int) handleX, this.getY(), 8, this.getHeight());
int k = this.active ? 16777215 : 10526880;
this.renderScrollingString(guiGraphics, minecraft.font, 2, k | Mth.ceil(this.alpha * 255.0F) << 24);
}
Expand Down
4 changes: 2 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ publishing {
processResources {
filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"minecraft_version": project.minimum_minecraft_version,
"fabric_api_version": libs.versions.fabric.api.get(),
"architectury_version": libs.versions.architectury.get()
}

inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "minecraft_version", project.minimum_minecraft_version
inputs.property "fabric_api_version", libs.versions.fabric.api.get()
inputs.property "architectury_version", libs.versions.architectury.get()
}
Expand Down
9 changes: 5 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.parallel=true
version=1.2.1+1.21.1
minecraft_version=1.21.1
additional_minecraft_versions=1.21
branch=1.21.1
version=1.2.1+1.21.3
minecraft_version=1.21.3
additional_minecraft_versions=1.21.2
minimum_minecraft_version=1.21.2
branch=main
group=io.github.jamalam360
mod_name=JamLib
mod_id=jamlib
Expand Down
8 changes: 4 additions & 4 deletions libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
# https://modrinth.com/mod/architectury-api/versions
architectury = "13.0.6"
architectury = "14.0.3"

# https://parchmentmc.org/docs/getting-started
parchment-minecraft = "1.21"
parchment = "2024.07.28"

# https://projects.neoforged.net/neoforged/neoforge
neoforge = "21.1.72"
neoforge = "21.3.1-beta"

# https://fabricmc.net/develop
fabric-loader = "0.16.7"
fabric-api = "0.106.0+1.21.1"
fabric-api = "0.106.1+1.21.3"

# https://modrinth.com/mod/modmenu/versions
modmenu = "11.0.1"
modmenu = "12.0.0-beta.1"

# https://github.com/falkreon/Jankson/releases/latest
jankson = "1.2.3"
Expand Down
4 changes: 2 additions & 2 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ publishing {

processResources {
filesMatching("neoforge.mods.toml") {
expand "minecraft_version": project.minecraft_version,
expand "minecraft_version": project.minimum_minecraft_version,
"architectury_version": libs.versions.architectury.get()
}

inputs.property "minecraft_version", project.minecraft_version
inputs.property "minecraft_version", project.minimum_minecraft_version
inputs.property "architectury_version", libs.versions.architectury.get()
}

Expand Down

0 comments on commit dc26d21

Please sign in to comment.