Skip to content

Commit

Permalink
Update to v0.4.0
Browse files Browse the repository at this point in the history
Support for Minecraft 1.21.2
  • Loading branch information
manuelgrabowski committed Oct 22, 2024
1 parent 4c7928e commit 992d109
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
org.gradle.jvmargs=-Xmx4G

# Fabric Properties
minecraft_version=1.21
yarn_mappings=1.21+build.2
loader_version=0.16.2
minecraft_version=1.21.2
yarn_mappings=1.21.2+build.1
loader_version=0.16.7

#Fabric api
fabric_version=0.102.0+1.21
# Fabric API
fabric_version=0.106.1+1.21.2

# Mod Properties
mod_version=0.3.1
mod_version=0.4.0
maven_group=net.manu_faktur
archives_base_name=KeepInventorySortedSimple

4 changes: 2 additions & 2 deletions src/main/java/net/manu_faktur/kiss/SortCases.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ private static String getSortString(ItemStack stack, SortType sortType) {

if (component != null && component.contains(DataComponentTypes.PROFILE))
sortString = playerHeadCase(stack, sortType);
if (item instanceof EnchantedBookItem)
if (stack.isOf(Items.ENCHANTED_BOOK))
sortString = enchantedBookNameCase(stack, sortType);
if (item instanceof ToolItem)
if (item instanceof MiningToolItem)
sortString = toolDurabilityCase(stack, sortType);
if (component != null && item instanceof BlockItem blockItem && blockItem.getBlock() instanceof ShulkerBoxBlock){
sortString = shulkerBoxCase(stack, sortType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import net.minecraft.client.gui.screen.ButtonTextures;
import net.minecraft.client.gui.widget.TexturedButtonWidget;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.gl.ShaderProgramKeys;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.registry.Registries;
import net.minecraft.text.ClickEvent;
import net.minecraft.text.MutableText;
Expand Down Expand Up @@ -64,13 +65,13 @@ public void onPress() {

@Override
public void renderWidget(DrawContext context, int int_1, int int_2, float float_1) {
RenderSystem.setShader(GameRenderer::getPositionProgram);
RenderSystem.setShader(ShaderProgramKeys.POSITION);
RenderSystem.enableDepthTest();
context.getMatrices().push();
context.getMatrices().scale(.5f, .5f, 1);
context.getMatrices().translate(getX(), getY(), 0);

context.drawTexture(TEXTURES.get(true, isSelected() || isHovered()), getX(), getY(), 0, 0, 20, 18, 20, 18);
context.drawTexture(RenderLayer::getGuiTextured, TEXTURES.get(true, isSelected() || isHovered()), getX(), getY(), 0, 0, 20, 18, 20, 18);
this.renderTooltip(context, int_1, int_2);
context.getMatrices().pop();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
]
},
"depends": {
"fabricloader": ">=0.15.11",
"fabricloader": ">=0.16.7",
"fabric": "*",
"fabric-api": "*",
"minecraft": ">=1.21",
"minecraft": ">=1.21.2",
"java": ">=21"
},
"recommends": {
Expand Down

0 comments on commit 992d109

Please sign in to comment.