forked from virt-mirrors/Sit
1.21.3 port
This commit is contained in:
parent
185dd93a2e
commit
77cec2ff8c
6 changed files with 20 additions and 20 deletions
|
@ -1,9 +1,9 @@
|
|||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id "com.modrinth.minotaur" version "2.+"
|
||||
id 'com.modrinth.minotaur' version '2.+'
|
||||
id 'net.darkhax.curseforgegradle' version '1.1.+'
|
||||
id 'co.uzzu.dotenv.gradle' version "4.0.0"
|
||||
id 'co.uzzu.dotenv.gradle' version '4.0.0'
|
||||
}
|
||||
|
||||
version = project.mod_version
|
||||
|
@ -30,7 +30,6 @@ dependencies {
|
|||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
modImplementation ("dev.isxander:yet-another-config-lib:${project.yacl_version}")
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
|
|
@ -4,10 +4,10 @@ org.gradle.parallel=true
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
min_minecraft_version=1.21
|
||||
minecraft_version=1.21.1
|
||||
yarn_mappings=1.21.1+build.1
|
||||
loader_version=0.15.11
|
||||
min_minecraft_version=1.21.3
|
||||
minecraft_version=1.21.3
|
||||
yarn_mappings=1.21.3+build.2
|
||||
loader_version=0.16.7
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.2.0.8+1.21-1.21.1
|
||||
|
@ -15,6 +15,5 @@ maven_group=one.oth3r
|
|||
file_name=sit!
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.102.0+1.21.1
|
||||
modmenu_version=11.0.0-beta.1
|
||||
yacl_version=3.5.0+1.21-fabric
|
||||
fabric_version=0.107.0+1.21.3
|
||||
modmenu_version=12.0.0-beta.1
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.tooltip.Tooltip;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
|
@ -20,13 +21,10 @@ public class ClickableImageWidget extends ButtonWidget {
|
|||
|
||||
@Override
|
||||
protected void renderWidget(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, this.alpha);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.enableDepthTest();
|
||||
context.drawTexture(image, this.getX(), this.getY(), 0.0f, 0.0f, this.getWidth(), this.getHeight(), this.getWidth(), this.getHeight());
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
context.drawTexture(RenderLayer::getGuiTextured, image,
|
||||
this.getX(), this.getY(), 0.0f, 0.0f, this.getWidth(), this.getHeight(), this.getWidth(), this.getHeight());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -5,8 +5,10 @@ import net.minecraft.client.gui.DrawContext;
|
|||
import net.minecraft.client.gui.screen.ConfirmLinkScreen;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.ColorHelper;
|
||||
import one.oth3r.sit.file.FileData;
|
||||
import one.oth3r.sit.utl.Data;
|
||||
|
||||
|
@ -58,6 +60,7 @@ public class ConfigScreen extends Screen {
|
|||
@Override
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
super.render(context, mouseX, mouseY, delta);
|
||||
|
||||
// todo fade in like the title screen on first load?
|
||||
renderBanner(context,width/2 - 64,this.height / 4 -38,1);
|
||||
}
|
||||
|
@ -68,12 +71,11 @@ public class ConfigScreen extends Screen {
|
|||
}
|
||||
|
||||
private void renderBanner(DrawContext context, int x, int y, float alpha) {
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, alpha);
|
||||
RenderSystem.enableBlend();
|
||||
|
||||
context.drawTexture(Identifier.of(Data.MOD_ID, "textures/gui/banner.png"), x, y, 0.0f, 0.0f, 128, 72, 128, 72);
|
||||
context.drawTexture(RenderLayer::getGuiTextured,Identifier.of(Data.MOD_ID, "textures/gui/banner.png"),
|
||||
x, y, 0.0f, 0.0f, 128, 72, 128, 72, ColorHelper.getWhite(alpha));
|
||||
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import net.minecraft.client.font.TextRenderer;
|
|||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.tooltip.Tooltip;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -29,7 +30,7 @@ public class TextureButtonWidget extends ButtonWidget {
|
|||
super.renderWidget(context, mouseX, mouseY, delta);
|
||||
int x = this.getX() + this.getWidth() / 2 - this.textureWidth / 2;
|
||||
int y = this.getY() + this.getHeight() / 2 - this.textureHeight / 2;
|
||||
context.drawGuiTexture(this.texture, x, y, this.textureWidth, this.textureHeight);
|
||||
context.drawGuiTexture(RenderLayer::getGuiTextured, this.texture, x, y, this.textureWidth, this.textureHeight);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.entity.decoration.DisplayEntity;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.consume.UseAction;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue