fix consumables being moved
This commit is contained in:
@@ -6,7 +6,7 @@ minecraft_version=1.21.8
|
||||
yarn_mappings=1.21.8+build.1
|
||||
loader_version=0.17.2
|
||||
# Mod Properties
|
||||
mod_version=1.2
|
||||
mod_version=1.3
|
||||
maven_group=com.kasetoatz
|
||||
archives_base_name=biggerhotbar
|
||||
# Dependencies
|
||||
|
@@ -6,7 +6,6 @@ import net.minecraft.client.network.ClientPlayerInteractionManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.screen.GenericContainerScreenHandler;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
|
@@ -9,7 +9,6 @@ import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
import net.minecraft.util.Pair;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
|
@@ -4,7 +4,6 @@ import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.client.network.ClientPlayerInteractionManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.screen.slot.Slot;
|
||||
import net.minecraft.screen.slot.SlotActionType;
|
||||
@@ -13,7 +12,6 @@ import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import static com.kasetoatz.biggerhotbar.state.StateManager.isFlipped;
|
||||
|
||||
@@ -25,7 +23,7 @@ public abstract class ScreenHandlerMixin
|
||||
@Inject(method="setStackInSlot", at=@At("HEAD"))
|
||||
public void setStackInSlot(int slot, int revision, ItemStack stack, CallbackInfo ci)
|
||||
{
|
||||
if ((slot > 8 && slot < 27) || (isFlipped() && slot > 35 && slot < 45))
|
||||
if ((slot > 8 && slot < 27) || (isFlipped() && slot > 35 && slot < 45) && getSlot(slot).getStack().isEmpty())
|
||||
{
|
||||
for (int i = 27; i < 36; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user