Skip to content

Commit

Permalink
feat: Update to Minecraft 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Nov 26, 2024
1 parent af5eb43 commit ccae762
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package net.blay09.mods.trashslot.client;

import com.mojang.datafixers.util.Pair;
import net.blay09.mods.trashslot.TrashSlot;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.Container;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.InventoryMenu;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;

public class TrashSlotSlot extends Slot {

private static final ResourceLocation ICON = ResourceLocation.withDefaultNamespace("container/slot/trashslot");

public static class TrashInventory implements Container {
private ItemStack currentStack = ItemStack.EMPTY;

Expand Down Expand Up @@ -84,16 +82,12 @@ public void clearContent() {
}
}

private final Pair<ResourceLocation, ResourceLocation> backgroundPair;

public TrashSlotSlot() {
super(new TrashInventory(), 0, 0, 0);
backgroundPair = Pair.of(InventoryMenu.BLOCK_ATLAS, ResourceLocation.fromNamespaceAndPath(TrashSlot.MOD_ID, "item/trashcan"));
}

@Nullable
@Override
public Pair<ResourceLocation, ResourceLocation> getNoItemIcon() {
return backgroundPair;
public ResourceLocation getNoItemIcon() {
return ICON;
}
}

0 comments on commit ccae762

Please sign in to comment.