Skip to content

Commit

Permalink
Do not shadow variables, fixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
Noaaan committed Mar 17, 2024
1 parent 2fc04d6 commit e31a9c7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
10 changes: 2 additions & 8 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# 0.6.0
# 0.6.1

- Fixed a bug where the Stormyx Chain would not animate correctly.
- Chests now extend ChestBlocks instead of AbstractChestBlocks. This should improve compatibility and reduce the amount of crashes.
- Chests screens no longer force scrolling when leaking by an extra row (thanks glisco!).
- Chest recipes now use the `c:wooden_chests` tag for crafting recipes.
- Added a block set for Hydrargym (Storage Block, Anvil, nuggets).
- Add load conditions for nugget-related recipes. This prevents errors in logs if they are disabled.
- Updated and fixed attributes on crowns
- Update and fix Lithium compat
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.7
# Mod Properties
mod_version=0.6.0+1.20.3
mod_version=0.6.1+1.20.3
maven_group=nourl
archives_base_name=mythicmetals-decorations
# Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ protected DefaultedList<ItemStack> method_11282() {
return inventory;
}

public DefaultedList<ItemStack> getMythicChestInventory() {
return inventory;
}

@Override
protected void setInvStackList(DefaultedList<ItemStack> list) {
inventory = list;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,21 @@
import me.jellysquid.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
private int size;

@Shadow
private DefaultedList<ItemStack> inventory;

@Override
public int size() {
return this.size;
MythicChestBlock block = (MythicChestBlock) ((MythicChestBlockEntity) (Object) this).getCachedState().getBlock();
return block.getSize();
}

@Override
public DefaultedList<ItemStack> getInventoryLithium() {
return this.inventory;
return ((MythicChestBlockEntity) (Object) this).getMythicChestInventory();
}
}

0 comments on commit e31a9c7

Please sign in to comment.