mappings
This commit is contained in:
1 parent
419b739d5e
commit
43ff0e8c11
7 files changed
+39
-41
No files matched your search
@@ -13,7 +13,7 @@ import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.GlobalPos;
|
||||
import net.minecraft.util.dynamic.GlobalPos;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -263,11 +263,11 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
||||
|
||||
public static int validateSlot(int slot, Inventory inv)
|
||||
{
|
||||
int invSize = inv.getInvSize();
|
||||
int invSize = inv.size();
|
||||
if (slot < 0)
|
||||
slot = invSize + slot;
|
||||
if (slot < 0 || slot >= invSize)
|
||||
return inv.getInvSize(); // outside of inventory
|
||||
return inv.size(); // outside of inventory
|
||||
return slot;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user