Updated mod to 1.21.5

This commit is contained in:
2025-03-26 16:45:19 +01:00
parent f17519a547
commit 8cebb278b8
2 changed files with 6 additions and 34 deletions

View File

@ -4,8 +4,8 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
minecraft_version=1.21.5
yarn_mappings=1.21.5+build.1
loader_version=0.16.10
# Mod Properties
@ -14,4 +14,4 @@ maven_group=wtf.hak.survivalfabric
archives_base_name=survivalfabric
# Dependencies
fabric_version=0.119.0+1.21.4
fabric_version=0.119.5+1.21.5

View File

@ -1,12 +1,11 @@
package wtf.hak.survivalfabric.sharedenderchest;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.Inventories;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.collection.DefaultedList;
import java.util.Iterator;
public class SharedInventory implements Inventory {
private final DefaultedList<ItemStack> stacks;
@ -19,28 +18,6 @@ public class SharedInventory implements Inventory {
this.stacks = dl;
}
/*
@Override
public void onClose(PlayerEntity player) {
Inventory.super.onClose(player);
EnderChestBlockEntity blockEntity = enderChests.remove(player);
if (blockEntity != null)
blockEntity.onClose(player);
}
@Override
public void onOpen(PlayerEntity player) {
Inventory.super.onOpen(player);
EnderChestBlockEntity blockEntity = enderChests.get(player);
if (blockEntity != null)
blockEntity.onOpen(player);
}
public void setBlockEntity(PlayerEntity player, EnderChestBlockEntity be) {
enderChests.put(player, be);
}
*/
public DefaultedList<ItemStack> getList(DefaultedList<ItemStack> dl) {
dl = stacks;
@ -54,7 +31,7 @@ public class SharedInventory implements Inventory {
@Override
public boolean isEmpty() {
Iterator<ItemStack> var1 = this.stacks.iterator();
var var1 = this.stacks.iterator();
ItemStack itemStack_1;
do {
@ -62,7 +39,7 @@ public class SharedInventory implements Inventory {
return true;
}
itemStack_1 = (ItemStack)var1.next();
itemStack_1 = var1.next();
} while(itemStack_1.isEmpty());
return false;
@ -76,10 +53,6 @@ public class SharedInventory implements Inventory {
@Override
public ItemStack removeStack(int int_1, int int_2) {
ItemStack itemStack_1 = Inventories.splitStack(this.stacks, int_1, int_2);
if (!itemStack_1.isEmpty()) {
//this.container.onContentChanged(this);
}
return itemStack_1;
}
@ -91,7 +64,6 @@ public class SharedInventory implements Inventory {
@Override
public void setStack(int i, ItemStack itemStack) {
this.stacks.set(i, itemStack);
//this.container.onContentChanged(this);
}
@Override