Class Swap
java.lang.Object
com.hammy275.immersivemc.server.swap.Swap
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
doEnchanting
(int slot, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand) static com.mojang.datafixers.util.Pair<net.minecraft.world.item.ItemStack,
Integer> getAnvilOutput
(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack mid, net.minecraft.server.level.ServerPlayer player) static int
getPlaceAmount
(int handInSize, PlacementMode mode) static int
getPlaceAmount
(net.minecraft.world.item.ItemStack handIn, PlacementMode mode) static net.minecraft.world.item.ItemStack
getRecipeOutput
(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack[] stacksIn) static net.minecraft.world.item.ItemStack
getSmithingTableOutput
(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack mid, net.minecraft.world.item.ItemStack right, net.minecraft.server.level.ServerPlayer player) static void
givePlayerItemSwap
(net.minecraft.world.item.ItemStack toPlayer, net.minecraft.world.item.ItemStack fromPlayer, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand) static boolean
handleAnvilCraft
(AnvilStorage storage, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand) static void
handleBackpackCraftingSwap
(int slot, net.minecraft.world.InteractionHand hand, List<net.minecraft.world.item.ItemStack> items, net.minecraft.server.level.ServerPlayer player, ItemSwapAmount amount) static void
handleChest
(net.minecraft.world.level.block.entity.ChestBlockEntity chestIn, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand, int slot) static void
handleDoCraft
(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack[] stacksIn, net.minecraft.core.BlockPos tablePos) static void
handleEnderChest
(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, int slot) static void
handleInventorySwap
(net.minecraft.world.entity.player.Player player, int slot, net.minecraft.world.InteractionHand hand) static boolean
handleSmithingTableCraft
(SmithingTableStorage storage, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand)
-
Constructor Details
-
Swap
public Swap()
-
-
Method Details
-
doEnchanting
public static boolean doEnchanting(int slot, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand) -
handleBackpackCraftingSwap
public static void handleBackpackCraftingSwap(int slot, net.minecraft.world.InteractionHand hand, List<net.minecraft.world.item.ItemStack> items, net.minecraft.server.level.ServerPlayer player, ItemSwapAmount amount) -
handleAnvilCraft
public static boolean handleAnvilCraft(AnvilStorage storage, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand) -
handleSmithingTableCraft
public static boolean handleSmithingTableCraft(SmithingTableStorage storage, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand) -
getRecipeOutput
public static net.minecraft.world.item.ItemStack getRecipeOutput(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack[] stacksIn) -
handleDoCraft
public static void handleDoCraft(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack[] stacksIn, net.minecraft.core.BlockPos tablePos) -
handleInventorySwap
public static void handleInventorySwap(net.minecraft.world.entity.player.Player player, int slot, net.minecraft.world.InteractionHand hand) -
handleChest
public static void handleChest(net.minecraft.world.level.block.entity.ChestBlockEntity chestIn, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.InteractionHand hand, int slot) -
handleEnderChest
public static void handleEnderChest(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, int slot) -
getAnvilOutput
public static com.mojang.datafixers.util.Pair<net.minecraft.world.item.ItemStack,Integer> getAnvilOutput(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack mid, net.minecraft.server.level.ServerPlayer player) -
getSmithingTableOutput
public static net.minecraft.world.item.ItemStack getSmithingTableOutput(net.minecraft.world.item.ItemStack left, net.minecraft.world.item.ItemStack mid, net.minecraft.world.item.ItemStack right, net.minecraft.server.level.ServerPlayer player) -
getPlaceAmount
-
getPlaceAmount
-
givePlayerItemSwap
public static void givePlayerItemSwap(net.minecraft.world.item.ItemStack toPlayer, net.minecraft.world.item.ItemStack fromPlayer, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
-