Skip to content

Commit

Permalink
Merge pull request #26 from muon-rw
Browse files Browse the repository at this point in the history
Update Lithium support
  • Loading branch information
Noaaan authored Jan 2, 2025
2 parents 51a7756 + 6d44dff commit 16a3e1d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://fabricmc.net/develop/
minecraft_version=1.21
minecraft_version=1.21.1
yarn_mappings=1.21+build.2
loader_version=0.15.11
loader_version=0.16.9
# Mod Properties
mod_version=0.7.2+1.21
maven_group=nourl
archives_base_name=mythicmetals-decorations
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.102.0+1.21
fabric_version=0.110.0+1.21.1
# https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items/files/
# https://maven.shedaniel.me/me/shedaniel/RoughlyEnoughItems-fabric/
rei_version=16.0.729
Expand All @@ -26,7 +26,7 @@ mm_version=0.20.0+1.21
# Alloy Forgery: https://modrinth.com/mod/alloy-forgery
af_version=2.4.1+1.21
# leethium moment
leetheum_version=mc1.21-0.13.0
leetheum_version=mc1.21.1-0.14.3-fabric
# Additional Entity Attributes
# https://modrinth.com/mod/additionalentityattributes
aea_version=1.8.0+1.21
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
package nourl.mythicmetalsdecorations.mixin;

import me.jellysquid.mods.lithium.api.inventory.LithiumInventory;
import net.caffeinemc.mods.lithium.api.inventory.LithiumInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.collection.DefaultedList;
import nourl.mythicmetalsdecorations.blocks.chest.MythicChestBlock;
import nourl.mythicmetalsdecorations.blocks.chest.MythicChestBlockEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

@Mixin(MythicChestBlockEntity.class)
public abstract class MythicChestBlockEntityLithiumCompatMixin implements LithiumInventory {

@Shadow(remap = false)
private DefaultedList<ItemStack> inventory;

@Override
public int size() {
MythicChestBlock block = (MythicChestBlock) ((MythicChestBlockEntity) (Object) this).getCachedState().getBlock();
Expand All @@ -20,4 +24,9 @@ public int size() {
public DefaultedList<ItemStack> getInventoryLithium() {
return ((MythicChestBlockEntity) (Object) this).getMythicChestInventory();
}

@Override
public void setInventoryLithium(DefaultedList<ItemStack> inventory) {
this.inventory = inventory;
}
}

0 comments on commit 16a3e1d

Please sign in to comment.