Migrate the Carpet codebase to Mojang Mappings
This commit is contained in:
346 files changed
+8353
-8492
No files matched your search
@@ -2,19 +2,19 @@ package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import carpet.helpers.InventoryHelper;
|
||||
import net.minecraft.block.ShulkerBoxBlock;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.ShulkerBoxBlock;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(Slot.class)
|
||||
public class Slot_stackableSBoxesMixin {
|
||||
@Redirect(method = "insertStack(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/item/ItemStack;", at = @At(
|
||||
@Redirect(method = "safeInsert(Lnet/minecraft/world/item/ItemStack;I)Lnet/minecraft/world/item/ItemStack;", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/screen/slot/Slot;getMaxItemCount(Lnet/minecraft/item/ItemStack;)I"
|
||||
target = "Lnet/minecraft/world/inventory/Slot;getMaxStackSize(Lnet/minecraft/world/item/ItemStack;)I"
|
||||
))
|
||||
private int getMaxCountForSboxesInSlot(Slot slot, ItemStack stack)
|
||||
{
|
||||
@@ -26,6 +26,6 @@ public class Slot_stackableSBoxesMixin {
|
||||
{
|
||||
return CarpetSettings.shulkerBoxStackSize;
|
||||
}
|
||||
return slot.getMaxItemCount(stack);
|
||||
return slot.getMaxStackSize(stack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user